react-player icon indicating copy to clipboard operation
react-player copied to clipboard

Switch to Streamable iFrame player

Open lawlmart opened this issue 9 years ago • 9 comments

We’ve removed the files attribute from our API. In the future all videos must be played using our iframe player (similar to YouTube). The embed code is now returned by the API.

lawlmart avatar Sep 15 '17 07:09 lawlmart

@lawlmart This is quite a shame.. Is there a way to programmatically control the iframe player and receive events? Otherwise there is not much point for ReactPlayer to support Streamable videos.

cookpete avatar Sep 15 '17 10:09 cookpete

Yes, we support player.js.

https://github.com/embedly/player.js/

lawlmart avatar Sep 15 '17 11:09 lawlmart

Thanks @lawlmart. I've just hooked it up but annoyingly there is a bug in the Streamable iframe when calling play() after the ready event where the thumbnail overlay remains on top of the playing video. It requires a user click to remove the overlay.

See example fiddle using pretty much the exact example code from the player.js readme.

cookpete avatar Sep 15 '17 12:09 cookpete

Thanks for catching that, I’ll get that fixed ASAP.

lawlmart avatar Sep 15 '17 13:09 lawlmart

Fiddle looks good now.

lawlmart avatar Sep 15 '17 16:09 lawlmart

Nice work on the fix @lawlmart. Next issue is that the player seems to fail karma tests when run in Travis (see failing build). I've had to skip the tests for the time being. The tests seem fine when run locally. That are pretty straightforward tests that pass on certain events/callbacks (see example test). Any ideas why this would happen?

cookpete avatar Sep 16 '17 15:09 cookpete

What browser are you testing in?

On Sat, Sep 16, 2017 at 5:57 PM Pete Cook [email protected] wrote:

Nice work on the fix @lawlmart https://github.com/lawlmart. Next issue is that the player seems to fail karma tests when run in Travis (see failing build https://travis-ci.org/CookPete/react-player/builds/276018886). I've had to skip the tests for the time being. The tests seem fine when run locally. That are pretty straightforward tests that pass on certain events/callbacks (see example test https://github.com/CookPete/react-player/blob/master/test/specs/ReactPlayer.js#L97-L120). Any ideas why this would happen?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CookPete/react-player/issues/237#issuecomment-329977072, or mute the thread https://github.com/notifications/unsubscribe-auth/AKelVhzZfJQtYgNgPm3_0OjljLJ2LqTPks5si-_9gaJpZM4PYnQC .

lawlmart avatar Sep 16 '17 17:09 lawlmart

CI tests currently run in Chromium 60.0.3112 on Ubuntu.

cookpete avatar Sep 16 '17 19:09 cookpete

I'd figure one of the events isn't being called judging by the timeout, but it's hard to tell which. The player is passing the playerjs tester so I'm not sure what the issue is on our end. Which URL are you testing it with?

Edit: Chromium recently disabled autoplaying without user interaction. Perhaps this is an issue?

lawlmart avatar Sep 16 '17 19:09 lawlmart