HTML5 Video JavaScript Listener

Are there any libraries that will assist in allowing a video played in html5 video tag to be listened to and fire a JavaScript function when a certain tone or series of tones are played in the video?  Or could added data to the stream be read and fire a JavaScript function based on the data.  

I am trying to fire a script on the client/browser side of a live stream.  We have a custom encoding/streaming application and would like it when our moderators click a button in the application it is timed with the video stream on the client end.  I realize this can be done with streaming players like Silverlight and flash, but I would like this to work on all devices including mobile phones.
SitewizardAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

skijCommented:
I understand what you are trying to accomplish.

It is not possible to trigger a JavaScript function based on a certain tone or a series of streamed tones without the use a a third-party application like Flash or Silverlight.  Even if it were possible (which is is not) it would be extremely inefficient for JavaScript to process the streaming data, and the process would be so resource-intensive that it would be unreliable.

You asked it data could be added to the stream that could fire a JavaScript function.  Fortunately,  HTML5 WebSockets provide a reliable way to accomplish this.  Any browser that supports HTML5 video should also support HTML5 WebSockets.

Here is an example demonstration of  videos being controlled through the use of HTML5 WebSockets:
https://www.youtube.com/watch?v=r90ti4MbecM

You asked if there are any libraries that would assist with this.  I recommend Popcorn.js:
http://popcornjs.org/

Here is a story, along with sample code that is relevant:
http://blog.kaazing.com/2014/01/23/extreme-html5-video-interactivity-sending-websocket-messages-with-popcorn-js/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.