@grfzhl/vue-hls-player 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -219,7 +219,7 @@ async function startFullscreen() {
|
|
|
219
219
|
try {
|
|
220
220
|
if (vpVideoBlock.requestFullscreen) {
|
|
221
221
|
await vpVideoBlock.requestFullscreen();
|
|
222
|
-
} else if (
|
|
222
|
+
} else if (document.querySelector('video').webkitRequestFullscreen) {
|
|
223
223
|
vpVideoBlock = document.querySelector('video');
|
|
224
224
|
await vpVideoBlock.webkitRequestFullscreen(); // Safari
|
|
225
225
|
} else if (vpVideoBlock.mozRequestFullScreen) {
|
|
@@ -227,7 +227,6 @@ async function startFullscreen() {
|
|
|
227
227
|
} else if (vpVideoBlock.msRequestFullscreen) {
|
|
228
228
|
await vpVideoBlock.msRequestFullscreen(); // IE/Edge
|
|
229
229
|
}
|
|
230
|
-
|
|
231
230
|
if (screen.orientation && screen.orientation.lock) {
|
|
232
231
|
try {
|
|
233
232
|
await screen.orientation.lock("landscape");
|
|
@@ -241,6 +240,7 @@ async function startFullscreen() {
|
|
|
241
240
|
console.error("Fullscreen could not be activated", error);
|
|
242
241
|
isFullscreen.value = false;
|
|
243
242
|
}
|
|
243
|
+
|
|
244
244
|
video.value.currentTime = currentTime;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -251,7 +251,6 @@ function onSubtitleError(link) {
|
|
|
251
251
|
|
|
252
252
|
function onFullscreenChange(e) {
|
|
253
253
|
e.preventDefault();
|
|
254
|
-
|
|
255
254
|
// hide intro title after x seconds
|
|
256
255
|
if(isFullscreen.value === true) {
|
|
257
256
|
setTimeout(() => {
|
|
@@ -278,7 +277,7 @@ function onOrientationChange(e) {
|
|
|
278
277
|
let isPortrait = angle === 0 || angle === 180;
|
|
279
278
|
let isLandscape = angle === 90 || angle === -90;
|
|
280
279
|
|
|
281
|
-
if (
|
|
280
|
+
if (document.fullscreenElement && isPortrait) {
|
|
282
281
|
setTimeout(async () => {
|
|
283
282
|
if (!document.fullscreenElement) {
|
|
284
283
|
startFullscreen();
|