01-07-2021 07:37 AM
01-07-2021 07:37 AM
I'm looking to use the Streams platform in a few custom events, with the player embedded into our enterprise portal. I need to be able to do just basic things like load and unload the player, start playing when the event begins, and capture data about the player status (playing, paused, stopped, error).
All I've been able to find is a simple embed with an iframe. Are there hooks to monitor the player so that we can get real-time data with Ajax, for example?
01-07-2021 02:57 PM
@phil444 From what I understand there aren't any API hooks for this. We only have some details on the embed here:
For future planning what things are you interested in? When you see it is stopped or paused to do you want to put an overlay? Are you trying to see if stopped at 55% of the way through? If you had some hooks what you would want to do with it? What are you building on top of the Stream videos if I may ask? Thank you for the feedback.
01-08-2021 12:00 PM
We have our own system that we developed 22 years ago. I want to enable the community to use new tools as they become available, and to integrate with other technologies. I could see some scientists wanting to do their own one-off videos using Streams, but also taking advantage of our massive user base, and intelligent search algorithms and countless other reasons...
We already have tested streaming from our system TO Streams. That was easy. But now I want to be able to take someone's Streams event and be able to host it on OUR platform, in real time. I can do with other platforms, for example YouTube, as they have a hooks in their iframe player that let me control it and get feedback about it's status. That's basically all I need and I can take it from there.
If I just use the simple embed code Streams gives me, it plays, but I have absolutely no control over it, and no way to update my database with real-time statistics, and so on.
Here's a little code snippet from my controller for a YouTube embedded player.
01-08-2021 12:12 PM
@Daniel Escapa When you see it is stopped or paused to do you want to put an overlay?
I need to know if it is stopped or playing, so that I can update my live usage statistics database in real-time. Going the other way, when I have a scheduled event, for example, my player would show a clock and message before the event starts, then our TV operations center can send a command to start the event when the speaker is ready. So in the page, the Streams player needs to "start" when I fire the event at it. Also, maybe the event will end early, or late. Again, I need to be able to command the remote players to stop and unload if our producer ends the event.
This is simple stuff on your end to implement.
Maybe something like a function that receives "start", "stop".
And a listener that responds with "idle", "playing", "buffering", "error".