mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
do not proxy hls on supported browser
This commit is contained in:
parent
68552b6d65
commit
0cb442d40e
3 changed files with 10 additions and 1 deletions
|
@ -41,8 +41,16 @@ var shareOptions = {
|
|||
embedCode: "<iframe id='ivplayer' width='640' height='360' src='" + embed_url + "' style='border:none;'></iframe>"
|
||||
}
|
||||
|
||||
videojs.Hls.xhr.beforeRequest = function(options) {
|
||||
if (options.uri.indexOf('local=true') === -1) {
|
||||
options.uri = options.uri + '?local=true';
|
||||
}
|
||||
return options;
|
||||
};
|
||||
|
||||
var player = videojs('player', options);
|
||||
|
||||
|
||||
if (location.pathname.startsWith('/embed/')) {
|
||||
player.overlay({
|
||||
overlays: [{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue