track you tube video - asp.net

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.

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!

Open related video from IFrame Player in the same page

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?

Possible to destroy a running game and then rerun it or run a different game

I noticed that the PlayN doc says that you can only call Playn.run once. Here is my scenario and I'm looking for advice on how to tackle it.
Let's say I have a list of games to choose from in a menu on my web page. Upon clicking a game, I call PlayN.run on that game and it runs on my web page inside the playn-root div. Now lets say I want the user to be able to stop and load a new game by selecting a different one in the game list and load that into the div and play that.
How would I go about tackling that? Do I need to re-register the HtmlPlatform all over again and the play the new game? Or is there a way to destroy the current game and then play the new game using the existing platform which is already registered in PlayN?
The easiest route would be to just use normal HTML links and have each PlayN game be on its own web page (which could be in an iframe if you don't want the URL to change at the top of the browser).
Trying to clear out and reinitialize everything internally is just a big waste of effort when the web browser will take care of all of that for you when you reload the web page.

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.

Synchronize flash video on multiple PC's?

For an event we need the following setup:
Multiple computers running a kinda of quiz (in asp.net). Every one of them plays a video as background (in the browser), sorta like a screensaver (with advertising). When moving the mouse a div pops up which allows the user to choose a quiz in fill out the forms. The catch is that the video needs to be synchronized on all the PCs.
These are the constraints:
The asp.net code is already there, so writing it completely in flash is no option.
We know .NET, javascript, html, the standard webdev stuff best, so investing time is something new is a last resort.
Any suggestions?
The way I see it, you have a couple options here:
1) Hack together synchronicity using a server-side timestamp passed to the Flash clients. Give the client the current time (server-side) and the time you want playback to begin (server-side, also). Then have the client wait that many milliseconds.
2) Configure your media server to stream the video as though it were a live feed. I am 90% sure this is possible with Flash Media Server, but I've never had the budget to manage my own video server.

Resources