Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/components/VideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ async function loadVideo() {
streams.push(...props.video.videoStreams);

const MseSupport = window.MediaSource !== undefined || window.ManagedMediaSource !== undefined;
// Safari has limited MSE/DASH support, so we default to native HLS playback.
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);

const lbry = null;

Expand All @@ -600,7 +602,7 @@ async function loadVideo() {
props.video.audioStreams.length > 0 &&
!lbry &&
MseSupport &&
!getPreferenceBoolean("preferHls", false)
!getPreferenceBoolean("preferHls", isSafari)
) {
if (!props.video.dash) {
const dash = (await import("../utils/DashUtils.js")).generate_dash_file_from_formats(
Expand Down Expand Up @@ -638,7 +640,8 @@ async function loadVideo() {
return response.headers.get("Content-Type");
});
mime = contentType;
} else if (props.video.dash && !getPreferenceBoolean("preferHls", false)) {
// Safari defaults to HLS due to limited MSE/DASH support (see isSafari above).
} else if (props.video.dash && !getPreferenceBoolean("preferHls", isSafari)) {
uri = props.video.dash;
mime = "application/dash+xml";
} else if (props.video.hls) {
Expand Down
Loading