I'm embedding a video on my website from YouTube and I want it to loop. To do that I have to use the loop and playlist parameters. I do that and it generates a link like this: https://www.youtube.com/embed/MegurLP8PxI?playlist=MegurLP8PxI&autoplay=1&controls=0&rel=0&enablejsapi=1&start=312&loop=1&widgetid=55. So the loop parameter is set to 1 and the playlist is set to the video id MegurLP8PxI.
The issue is that when I initially load the video it shows the This video is unavailable error. Refreshing the page fixes that but that's not ideal. What makes it hard to understand what's wrong is that this only happens sometimes, seemingly at random. Happens with other videos too.
Another fix that I found is removing the playlist parameter from the url. However than the video will not loop, which I really need it to. Any help would be really appreciated.
Related
I've encountered an issue with YouTube embed urls that have a large number of video ids in the playlist parameter. For example: https://www.youtube.com/embed/VIDEOID1?playlist=VIDEOID2,VIDEOID3,...,VIDEOID20
On the first load, it works, but if I refresh, it says "This video is unavailable". I then tried in other browsers, and on a different computer, and got the same error right away. I waited a few days and tried again, and it worked one time, and then went back to the error. Changing the videos in the list also has the same effect: for each unique list, it works once and then errors out. This only happens with a larger number of videos.
Digging into the html responses and doing a comparison between the times it works and the times it doesn't, I found that there is a PLAYER_VARS object in the JS on the page, and it contains a "list" property when it works, but that property is missing for the times the error occurs. I also found that the value of the "list" property can be used as a query string parameter to the embed url ("list" query string parameter), and that works consistently.
Is this a known bug and/or is there a way to work around it? The evidence seems to suggest some kind of server-side caching problem on the YouTube side.
The cause of this problem turned out to be the inclusion of a couple of videos marked private in the playlist.
Just at the title says, if I copy a link at a specific time, it gives m the time code t=###.
If I try to embed that video into wordpress, the video starts at the beginning.
Is there a way to start a facebook video at a specific time while embedded in Wordpress?
It seems the t= parameter works for facebook video url's too now: e.g.
https://www.facebook.com/watch/?v=265933184844091&t=49
This format rather than the &t= worked for me:
https://www.facebook.com/100003947034370/videos/1916436035164612/?t=1550
at least it works if you type or paste the url in your browser and I was able to send it via messenger, but if you try to post it on your timeline so that people can watch the video from the relevant point facebook in their infinite lack of wisdom replaces the time stamp with ?__tn__=R-R and the video plays from the beginning.
Does anyone know how I can speed up the load time on an embedded video, or at least force all frames to load last? Trying to optimize my site and finding that vimeo embeds are really holding me back. Advice you can give would be great. Here is the site I'm working on:
http://www.lcbcchurch.com
You could dynamically add the embeds to the page via JavaScript once the whole page has loaded.
I have an asp.net page with an iframe in it that shows a youtube video. I have buttons that use the youtube api to control the video. I'm finding that often the video doesn't show up, and I have to do a view-refresh to make it work. This problem is limited to Internet Explorer, I believe that Google chrome does not have the same problem.
I've been told not to use iframes at all by a tech support person at the server company that hosts my site. They say people are moving away from iframes, and that I should use other methods of embedding youtube videos.
I could certainly do that, but youtube recommends using iframes, because they are more flexible.
If I could make the 'refresh' problem predictable, I would submit it to Microsoft, but I can't figure out why it happens sometimes, but not other times.
I could also force a refresh.
My question is, does anyone have a clue why this bug is happening.
Thanks.
This happens a lot with IFRAME content. I believe it's to do with the way that Internet Explorer caches stuff, but to be perfectly honest, I'm not sure on the details.
What I can share is an old trick we used to use with dialog boxes.
Say your src attribute is "http://www.youtube.com/watch?v=1wL7RHoDnxs"
You can bang an extra parameter onto that GET string, like:-
"http://www.youtube.com/watch?v=1wL7RHoDnxs&doesntmatter=203933"
See the extra doesntmatter parameter there? The value is random, or based on a timestamp. Your choice. The trick is to give a different URL to IE each time. This'll stop it from trying to use a cache for your IFRAME content.
I am working on a webpage where i have to include an embedded video.The video is hosted on some other domain.I am able to embed the video and autoplay once the web page is loaded.However i have a requirement where i have to remove the div displaying the video once it is played , and in place of the video i have to now display some text.
The problem is i am able to do autoplay by the autostart variable in the embed tag...but how do i know that the video has ended.The hosting company only provides an embed tag and they donot have any player apis to use.
One way (or rather a workaround) that i feel is to start a eventlistener in the background and see for the total time of the video and when that time is reached remove the content.But the problem is what if the user pauses the video, then also the div would be deleted.
I am new to flash.Are there some standard variables or actions that we can pass as flashvars to a swf file to stop a running player or to know the state of the player (Note we are only getting an embed tag from the video hosting site so we donot own that code and they donot have much documenation to help me out with the code).
Thanks for your help.
If you know that the content is a movie, and thus probably has a linear frame progression, you could use the Flash javascript API. Pseudocode for one possibility:
everyHalfSecond {
currentFrame = movie.TCurrentFrame("/");
totalFrames = movie.TotalFrames();
if (currentFrame + 1 == totalFrames) {
doMovieComplete() // switch out your div
}
}
WRT your undefined object variable, that sounds like standard browser Javascript issues. To resolve that, can use your own browser-specific "getSWF" function (see getFlexApp in this blog entry for an example), or you can use something like swfobject.