Merge pull request #2847 from iv-org/hls-to-vhs

rename hls to vhs in the player
This commit is contained in:
Samantaz Fox 2022-01-30 23:22:19 +01:00 committed by GitHub
commit be92bfd4af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ var options = {
}, },
html5: { html5: {
preloadTextTracks: false, preloadTextTracks: false,
hls: { vhs: {
overrideNative: true overrideNative: true
} }
} }
@ -50,7 +50,7 @@ var shareOptions = {
embedCode: "<iframe id='ivplayer' width='640' height='360' src='" + embed_url + "' style='border:none;'></iframe>" embedCode: "<iframe id='ivplayer' width='640' height='360' src='" + embed_url + "' style='border:none;'></iframe>"
} }
videojs.Hls.xhr.beforeRequest = function(options) { videojs.Vhs.xhr.beforeRequest = function(options) {
if (options.uri.indexOf('videoplayback') === -1 && options.uri.indexOf('local=true') === -1) { if (options.uri.indexOf('videoplayback') === -1 && options.uri.indexOf('local=true') === -1) {
options.uri = options.uri + '?local=true'; options.uri = options.uri + '?local=true';
} }