Open related video from IFrame Player in the same page - youtube-iframe-api

When a YouTube video stops playing, related videos are often shown at the end in a grid (depending on the video owner's preference). I have an IFrame Player embedded on a web page that plays public YouTube videos. When a related videos at the end is clicked, a new page is opened playing the related video. I've scoured the API docs and although there doesn't seem to be a solution, I'm going to ask anyway in case I've missed something or some perspective. Is there an API setting that allows the video to play on the same iframe instead of opening a new page, or some solution that could be worked out?

Related

Youtube IFrame API Cannot Cue Specific Playlists; no Error?

I've been using the YouTube IFrame API to shuffle multiple of my playlists together. I've got a very bare-bones HTML page with a 'next' and 'previous' button, and a bunch of javascript that loads up and plays videos and handles the button events.
The general order of events when the script loads is
* Wait for page load
* Wait for iframe API to load
* Create player
* For each playlist in [my playlists]
* Cue Playlist
* Wait for event CUED
* Add all loaded videos to list of all videos
* Shuffle list of all videos
* Play the videos
This page worked just fine for all the playlists I regularly play until today. Suddenly, when loading specific playlists, I am no longer getting a CUED event (or any event, for that matter), it just hangs, waiting for the playlist to be cued; however, I can press the 'play' button on the iframe and play the first video in the playlist. Additionally, I don't get any events triggering the onError handler from the player; as far as I can tell, I get no feedback after calling cuePlaylist
The playlists in question are all personal playlists that are publicly available under my user.
Here's an example of a playlist that exhibits this behavior:
https://www.youtube.com/playlist?list=PLuh_GoPmqJB7ADc9_T0HtCQ1oQ3_rutjx
And here's an example of a playlist that does not; if I try to load this one, it works as expected (and as it did with the other playlist just yesterday):
https://www.youtube.com/playlist?list=PLuh_GoPmqJB7wclmbu-qicy5uLwnsTSHO
I wonder if maybe the issue is related to the content of the playlist; like it fails if one of the videos isn't allowed to be played in my country or something. But previously when that was the case, it would load just fine and then skip those videos during playback. I don't think the issue is related to the length of the playlist, because the working playlist example is significantly longer than the non-working one.
This issue appears to have resolved itself. I suspect it was a bug in the iframe api or maybe the youtube backend which has been fixed by the youtube engineers. So iframe team, if you see this, thanks!

Detecting progress on a Youtube video to change the state of a Wordpress page

On my Wordpress page, I have multiple Youtube videos embedded on 1 page per video. I would like to change something on the page if a Youtube video has been watched for at least 80%
This feature should work no matter if the video was watched on Youtube directly or in the embedded player.
Is that possible to implement and if yes, how?

is it possible to replace Youtube's Iframe Video Ads

is it possible to replace Youtube's embedded Video's Ads with my own video ads.
maybe using a video player to do that but how can i do?
for example. someone is embedding youtube videos somewhere else. he wants to show some video ads on those videos. how can he do that?
I doubt it is impossible. It is, however, illegal to do so. When using the YouTube Data API or the JS API you agree to their terms of service, which explicitly state that you may not alter or remove in-player ads of embedded videos (section II, paragraph 7).
Is it possible to replace Youtube's embedded Video's ads with my own video ads?
If you own the video the answer is YES, but if it's own by someone, the answer is NO. Only the owner/author of the video have rights to the ads of these video.
For more information, you can check this related SO question. It might give you an idea about your problem.
Also from the YouTube Help, it is stated here that:
You will automatically be opted into showing ads on embedded videos if
you've associated your YouTube and AdSense accounts and have enabled
your videos for embedding. Note that embedded videos will honor the
same ad enablement settings as videos on youtube.com.
If you don't want to show ads on your embedded videos, there is no way
to directly disable ads on just embedded videos, however, you may
disable your videos for embedding altogether.

track you tube video

I need to track youtube video status.I need to check the video is played till the end or not.After clicking an play button,user has to see the video till the end. Depending upon this i need to issue a certificate to my user. For this task i need to track the status of youtue video. how can i do this in asp.net?
I doubt you can do it for certain, best I imagine you could do is with some Javascript, start an embedded youtube video playing (set it to autoplay and it will start as soon as the page has loaded), then start a timer in Javascript for the same length of time as the video takes to play.
If the time gets to the end, and the user is still on the page, then they might have watched the whole video. In which case you could make a call back to the server (Ajax or to a ashx handler) saying that is is complete. Then redirect the viewer to the certificate page.
You'll never know for certain as they could start teh video running then walk away to make coffee or something. And I doubt Youtube expose this data themselves (ie, did the end of the video play).
This can be done using Youtube Javascript API. Learn more at YouTube guide for dot net developers. Also see YouTube JavaScript Player API Reference and especially the section on event handlers.

Forcing Wordpress Header to not refresh on page load

I developed a band website using wordpress, and I placed a flash MP3 player that autoplays in the header. Whenever you click on a link, the entire page refreshes and the mp3 player starts playing the first song all over again. I wish to have the entire header including the mp3 player) stay constant while the content/sidebar/footer reloads when you click a link. That way the music will continue playing while the rest of the page loads, and the user can have a real listening experience.
To all of your knowledge, is there any way to do this without making the rest of the site completely dynamic?
Thanks in advance
There are acutally only two ways to do this without Ajax:
Use a frameset (which is a very bad idea nowadays)
Use a pop-up which holds the player
I know that pop-ups might be blocked, but this is the only way that users will accept. many large sites with audio players use pop-ups for such a functionality.

Resources