videojs-fairplay icon indicating copy to clipboard operation
videojs-fairplay copied to clipboard

Support for custom `fetchLicense` method

Open boushley opened this issue 7 years ago • 1 comments

Would you be open to a PR that allows someone to pass a custom fetchLicense method as an option?

I have to needs that this would address:

  1. My license URL endpoint requires the value of the skd:// url to be appended as a URL parameter. This value is generally not available when setting the video source, so can't be provided in the normal options.

  2. License acquisition calls will fail in with my DRM backend unless a "viewing session" is active. Viewing sessions are torn down after the video is paused for some period of time. So when the user requests the video to play again I setup a new viewing session and then can process license acquisition calls. By having a custom function I can pass in, I can manage all of this logic without needing to modify the core DRM solution.

If we added an option to override the fetchLicense method we would probably want to update the options passed to the fetchLicense method to include a success and error handler provided by the library.

If this is something you're open to, I'll write it up and open a PR so we can discuss the exact details.

boushley avatar Nov 08 '16 17:11 boushley

GG, I apologize for not responding.

I have been away from video for quite some time. If you haven't forked this already and are still interested in opening a PR, please do. Feel free to email me as I do not always get notifications from Github.

chemoish avatar Jan 10 '18 05:01 chemoish