video: minor tweaks
parent
dc89f0e95b
commit
3229ee32f0
|
@ -74,6 +74,7 @@ class VideoController extends ApiBase
|
||||||
// Make upstream request
|
// Make upstream request
|
||||||
$ch = curl_init("http://localhost:9999/vod/$path/$profile");
|
$ch = curl_init("http://localhost:9999/vod/$path/$profile");
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
$data = curl_exec($ch);
|
$data = curl_exec($ch);
|
||||||
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
|
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
|
||||||
|
|
|
@ -87,6 +87,7 @@ class VideoContentSetup {
|
||||||
type: "application/x-mpegURL",
|
type: "application/x-mpegURL",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const overrideNative = !videojs.browser.IS_SAFARI;
|
||||||
content.videojs = videojs(content.videoElement, {
|
content.videojs = videojs(content.videoElement, {
|
||||||
fluid: true,
|
fluid: true,
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
|
@ -98,12 +99,15 @@ class VideoContentSetup {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
preload: "metadata",
|
preload: "metadata",
|
||||||
inactivityTimeout: 0,
|
playbackRates: [0.5, 1, 1.5, 2],
|
||||||
|
responsive: true,
|
||||||
html5: {
|
html5: {
|
||||||
vhs: {
|
vhs: {
|
||||||
overrideNative: !videojs.browser.IS_SAFARI,
|
overrideNative: overrideNative,
|
||||||
withCredentials: false,
|
withCredentials: false,
|
||||||
},
|
},
|
||||||
|
nativeAudioTracks: !overrideNative,
|
||||||
|
nativeVideoTracks: !overrideNative,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -115,6 +119,8 @@ class VideoContentSetup {
|
||||||
this.src({
|
this.src({
|
||||||
src: e.slide.data.src,
|
src: e.slide.data.src,
|
||||||
});
|
});
|
||||||
|
this.options().html5.nativeAudioTracks = true;
|
||||||
|
this.options().html5.nativeVideoTracks = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue