Stream Player API not working for play/pause functions

Hi there,

I’m currently using the Stream player and trying to programmatically pause it, but am having issues. It seems that properties and events on the player object are working, but triggering play() or pause() doesn’t seem to work.

I’ve created this codepen from the Stream player API example (https://codepen.io/superzordon/pen/rNYKOOW), but when I click the button I’ve created to trigger the player to pause, the player doesn’t seem to pause, even though the player object that is logged seems accurate.

Thanks for your help!

@zordonclout sorry to hear of the troubles!

I noticed the SDK is being initialized in the button’s click handler, and it should only be initialized once on the iframe. Moving the initialization out of the click handler seems to make everything work correctly.

That said, I would still expect this to work at least the first time the pause button’s handler is called. We’ll dig in and see if we can get to the bottom of that. Thanks for reporting!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.