Skip to content

Commit

Permalink
Use the browser's native HLS support
Browse files Browse the repository at this point in the history
If the browser has native HLS support, use it, more info here
video-dev/hls.js#2954
  • Loading branch information
Joel2B committed Jul 31, 2021
1 parent a8a44cb commit ede7325
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/modules/menu/menu.js
Expand Up @@ -79,7 +79,11 @@ export default function (self) {
};

self.removeOption = (option) => {
if (self.domRef.controls[option] == null) {
return;
}
self.domRef.controls[option].remove();
self.domRef.controls[option] = null;
self.menu.height -= self.menu.option.height;
self.restartMenu();
}
Expand Down
6 changes: 5 additions & 1 deletion src/modules/streaming.js
Expand Up @@ -223,7 +223,11 @@ export default function (self, options) {
};

self.initialiseHls = () => {
if (Hls.isSupported()) {
if (self.domRef.player.canPlayType('application/vnd.apple.mpegurl')) {
if (!self.multipleVideoSources && self.isEnabledModule('qualityLevels')) {
self.removeOption('qualitySelector');
}
} else if (Hls.isSupported()) {
const defaultOptions = {
debug: typeof FP_DEBUG !== 'undefined' && FP_DEBUG === true,
// autoStartLoad: i,
Expand Down

0 comments on commit ede7325

Please sign in to comment.