streamroot / videojs-hlsjs-plugin

hls.js Source Handler for video.js 5
http://www.streamroot.io
MIT License
155 stars 80 forks source link

How to modify options of a http request? #109

Closed sethurv closed 4 years ago

sethurv commented 4 years ago

videojs.Hls.xhr.beforeRequest can be used to parse a http request. Where the handler is not invoked when the plugin is used. Let me know how this can be achieved.

tri170391 commented 4 years ago

You can do that with Hls.js equivalent: https://github.com/video-dev/hls.js/blob/master/docs/API.md#xhrsetup

You can set config for the Hls.js instance via: https://github.com/streamroot/videojs-hlsjs-plugin#passing-configuration-options-to-hlsjs

sethurv commented 4 years ago

I could make use of xhrsetup function to modify the http request. Thanks!