Skip to content

Commit

Permalink
fix: support legacy hls option for overrideNative (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev authored Nov 16, 2021
1 parent cf9451f commit 4f9ce7a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/videojs-http-streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,14 @@ const VhsSourceHandler = {
return tech.vhs;
},
canPlayType(type, options = {}) {
const { vhs: { overrideNative = !videojs.browser.IS_ANY_SAFARI } } = videojs.mergeOptions(videojs.options, options);
const {
vhs: { overrideNative = !videojs.browser.IS_ANY_SAFARI } = {},
hls: { overrideNative: legacyOverrideNative = false } = {}
} = videojs.mergeOptions(videojs.options, options);

const supportedType = simpleTypeFromSourceType(type);
const canUseMsePlayback = supportedType &&
(!Vhs.supportsTypeNatively(supportedType) || overrideNative);
(!Vhs.supportsTypeNatively(supportedType) || legacyOverrideNative || overrideNative);

return canUseMsePlayback ? 'maybe' : '';
}
Expand Down

0 comments on commit 4f9ce7a

Please sign in to comment.