How can I add youtube autoplay to a [embed=videolink] code? - youtube

How can I add youtube autoplay to this embedded code?
[embed=videolink]{"video":"http://www.youtube.com/watch?v=CDVQvme5tb0","width":"400","height":"225"}[/embed]

This should work:
[embed=videolink]{"video":"http://www.youtube.com/watch?v=CDVQvme5tb0&autoplay=1","width":"400","height":"225"}[/embed]
I added "&autoplay=1" to the end of the link.

Related

"...?ecver=x..." parameter on the youtube embed URL

I've Noticed when embedding Youtube videos the following 2 URLs achieve the same result:
https://www.youtube.com/embed/ML1AyQC2HKM?ecver=2&modestbranding=1&rel=0
https://www.youtube.com/embed/kwdRYaBUco4?modestbranding=1&rel=0
embeded youtube video with parameter set
What does the ecver parameter on the youtube embed URL set ?
After checking The Documentation and searching the internet I couldn't seem to find anything to explain this parameter.
The name would suggest its setting the Ecmascript version? but this is just a stab in the dark and i can't seem to find anything to confirm this.
ecver=1 can be deleted. This is a forced display at the top of the video title, + watch later, + share.
The ecver=2 is for getting rid of ads on pausing the video - like the rel=0 is for having no ads at the end of the video, but this seems to work no more.

How do you embed a YouTube video into an Anki Card

I am trying to make an Anki card that includes how to complete a specific type of task, and a description or collection of pictures isn't quite cutting it. I'd like to include a YouTube video into the card answer to test myself on how well I can perform the procedure. From my understanding I could download the YouTube video and include it directly, but I would really prefer not to store the video locally for storage-space reasons.
I've attempted to embed the video using the "Edit HTML" option in the Anki card generator, and can get the YouTube frame to appear in the card, but it reports that "Playback isn't supported on this device" (see attached image).
Is there a way to embed the video as I'm trying to do?
This is what worked for me:
Simply go to the video that you want to include, and click on "Share" and go to the "embed" option::
. You should get a link with this format:
<iframe width="560" height="315" src="https://www.youtube.com/embed/dmcfsEEogxs?start=30" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Copy the link, go to the card that you want to embed the video in, and press Ctrl + Shift + X to open the HTML Editor.
Paste the embed link in the editor and close the window.
You'll be able to see the YouTube video now in your anki card:
If this is what you tried before, try it again. It seems to work with the latest version of anki (mine is ⁨2.1.38).
I'm not sure if this helps, but you can format a link to a Youtube video in Anki Cards with something like:
Play Video
With {{Video}} being a field in your Notes that contains the remainder of the YouTube URL after
"https://youtube.be/"
To start at a particular point in a YouTube video, right click the video and select "Copy video URL at current time" and paste the part after the "/" into your {{Video}} field.
Seems to work in Linux Version 2.0.32 of Anki Desktop and in Anki Mobile.
I couldn't find any documentation, so I opened up my test profile and determined that YouTube is right. Playback isn't supported on that device. The video tag isn't implemented in the web browser behind Anki, so you can't use YouTube directly.
The <canvas> tag, however, is implemented (even if only partially), so in theory you could get at least the video part of the... erm... video up and running by decoding it using JavaScript.
This sounds like an interesting project. I'm not saying I'll commit to it... but if I don't update this answer regularly feel free to comment on this answer to poke me about it.
There seems to be partial support for flash objects (width and height are acknowledged, and right-clicking doesn't work) but I can't get it to display anything, so that seems like a dead end.

Youtube ?rel=0 tag no longer working

I was trying to share a Youtube link and wanted the person to just see that clip without any of the irrelevant suggestions that pop up next to it. I knew that adding ?rel=0 (or &rel=0) at the end of the URL used to achieve this, but this doesn't seem to be working anymore. After googling a bit, I found suggestions to use the youtu.be domain instead of youtube.com, but suggestions were shown nonetheless, or the URL gave an error. How else can I share this link and have no 'related' clips shown on the side? Thanks!
rel=0 is used to disable related videos shown at the end of a video, not to remove the suggested videos in the sidebars.
You can use the embed URL to access the video on it's own - http://youtube.com/embed/dQw4w9WgXcQ. Add ?rel=0 to disable the related videos at the end too.
Note, that rel=0 no longer works if you are signed into your Google account (YouTube, Gmail, etc).
&rel=0 only works when not signed in. However, you can get around this by using the enhanced privacy mode:
https://www.youtube-nocookie.com/embed/[id]?rel=0
As of August 23, 2018,
The behavior for the rel parameter is changing on or after September
25, 2018. The effect of the change is that you will not be able to
disable related videos. However, you will have the option of
specifying that the related videos shown in the player should be from
the same channel as the video that was just played.
To be more specific:
Prior to the change, if the parameter's value is set to 0, then the player does not show related videos.
After the change, if the rel parameter is set to 0, the player will show related videos that are from the same channel as the video that was just played.

YouTube API to get the most recent videos (with share URL) from a given channel

can some help me in drafting the right API call to get the most recent video form channel with shared URL (URL which i can embed in my web site)
I was able to get the title and description using the YouTube API version 3. But i am not able to get the "share this video URL".
Thank you
If this is not what you want, I apologize.
If you are asking what I think you are asking. I would just go to the next tab to the right ("Embed"). There is box there with the full embed code for your website. You can either use that code or copy the url out of it.
Just to save you some trouble, here is the code for that particluar video:
<iframe width="420" height="315" src="//www.youtube.com/embed/HhHhacseGw0" frameborder="0" allowfullscreen></iframe>
And the url:
http://www.youtube.com/embed/HhHhacseGw0
If that is not what you are looking for, please let me know.

Youtube API inside Chrome App

I'm trying to implement a chrome app in which I need to show a embed youtube video.
I tried to use a sandbox html page which use the youtube iframe api but it failed. I got the follow error: Uncaught unload is not available in packaged apps.
Can anyone help me with this problem?
You can do it using a webview. Simply take your embed code and swap the iframe tag for webview. No sandbox required :)
<webview width="560" height="315" src="http://www.youtube.com/embed/ZnuwB35GYMY?rel=0" frameborder="0" allowfullscreen></webview>

Resources