plyr
plyr copied to clipboard
Pass headers to the HTTP reuqest
It would be a great feature to add basic authentication to the video source.
Passing the credentials directly in the link has been dropped by Chrome and more will follow
so http://userb:[email protected]/elon_musk_riding_horse_backwards.mp4
won't pass the credentials any more.
const options = {
headers: {
'Authorization': 'Bearer iaf87h8fhd8idfidf=='
},
tooltips: {
controls: true,
seek: true
},
controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'fullscreen']
};
this.videoPlayer = new Plyr(this.videoPlayerEl.nativeElement, options);
Passing a header to the HTTP request can open all sorts of posibilities for private video streaming