vimeo / player.js

Interact with and control an embedded Vimeo Player.
https://player.vimeo.com/api/demo
MIT License
1.43k stars 261 forks source link

Support Vimeo OTT embeds #963

Closed TheOnlyTails closed 8 months ago

TheOnlyTails commented 9 months ago

Expected Behavior

https://embed.vhx.tv/ URLs should be recognized as Vimeo URLs by the isVimeoUrl function.

Actual Behavior

OTT video embeds use embed.vhx.tv as their iframe srcs, which means the Vimeo.Player constructor fails when trying to access them.

Steps to Reproduce

  1. Log into a Vimeo OTT platform, such as Dropout.tv
  2. Open a video
  3. In the devtools, add a script tag to import the player.js script
  4. run new Vimeo.Player(document.querySelector("iframe")) in the console.

Alternate solutions

Add a new parameter to the Vimeo.Player constructor that allows users to pass in a custom isVimeoUrl function.

rkrishnan8594 commented 8 months ago

Hey @TheOnlyTails, thanks for bringing up this topic. We haven't configured this library to support OTT players because that product has its own SDK: https://dev.vhx.tv/player/

Let me know if you have any trouble using that solution and I can open this issue back up.

TheOnlyTails commented 8 months ago

Hi, @rkrishnan8594 thanks so much for your reply, I tried using the VHX API, but it seems that its subtitle methods are broken - running player.getSubtitles() returns undefined, and player.setSubtitles("en") does nothing (even though the video has English captions, both in the UI and in the internal iframe markup).

If you could help with that, that would be amazing.

rkrishnan8594 commented 8 months ago

Thanks for the additional information. I've shared this bug report with our OTT developers and they have captured it in an internal ticket. I'll make sure that this issue is updated when there's a resolution.

TheOnlyTails commented 8 months ago

Thank you so much!

arturparkhisenko commented 7 months ago

@rkrishnan8594 @TheOnlyTails Hi there, OTT updated the docs to represent the current state of things and restored the functionality of two methods related to the text tracks (subtitles).

TheOnlyTails commented 7 months ago

Awesome, that's incredible! Thank you so much!