diff --git a/lib/Controller/VideoController.php b/lib/Controller/VideoController.php index 48c2b389..d677b68f 100644 --- a/lib/Controller/VideoController.php +++ b/lib/Controller/VideoController.php @@ -74,6 +74,7 @@ class VideoController extends ApiBase // Make upstream request $ch = curl_init("http://localhost:9999/vod/$path/$profile"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_HEADER, 0); $data = curl_exec($ch); $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); diff --git a/src/components/PsVideo.ts b/src/components/PsVideo.ts index d28b32a7..12ede6aa 100644 --- a/src/components/PsVideo.ts +++ b/src/components/PsVideo.ts @@ -87,6 +87,7 @@ class VideoContentSetup { type: "application/x-mpegURL", }); + const overrideNative = !videojs.browser.IS_SAFARI; content.videojs = videojs(content.videoElement, { fluid: true, autoplay: true, @@ -98,12 +99,15 @@ class VideoContentSetup { }, ], preload: "metadata", - inactivityTimeout: 0, + playbackRates: [0.5, 1, 1.5, 2], + responsive: true, html5: { vhs: { - overrideNative: !videojs.browser.IS_SAFARI, + overrideNative: overrideNative, withCredentials: false, }, + nativeAudioTracks: !overrideNative, + nativeVideoTracks: !overrideNative, }, }); @@ -115,6 +119,8 @@ class VideoContentSetup { this.src({ src: e.slide.data.src, }); + this.options().html5.nativeAudioTracks = true; + this.options().html5.nativeVideoTracks = true; } } });