@grfzhl/vue-hls-player 1.1.8 → 1.1.10
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.
|
@@ -214,9 +214,7 @@ async function startFullscreen() {
|
|
|
214
214
|
}
|
|
215
215
|
await document.exitFullscreen();
|
|
216
216
|
if (/iPhone|iPad|AppleWebKit/i.test(navigator.userAgent)) {
|
|
217
|
-
|
|
218
|
-
vpVideoBlock.addAttribute("playsinline");
|
|
219
|
-
vpVideoBlock.addAttribute("webkit-playsinline");
|
|
217
|
+
document.webkitExitFullscreen();
|
|
220
218
|
}
|
|
221
219
|
isFullscreen.value = false;
|
|
222
220
|
} else {
|
|
@@ -225,10 +223,16 @@ async function startFullscreen() {
|
|
|
225
223
|
if (vpVideoBlock.requestFullscreen) {
|
|
226
224
|
await vpVideoBlock.requestFullscreen();
|
|
227
225
|
} else if (/iPhone|iPad|AppleWebKit/i.test(navigator.userAgent)) {
|
|
228
|
-
vpVideoBlock = document.querySelector('video');
|
|
229
|
-
vpVideoBlock.
|
|
230
|
-
vpVideoBlock.
|
|
231
|
-
|
|
226
|
+
vpVideoBlock = document.querySelector('video.hls-player');
|
|
227
|
+
await vpVideoBlock.webkitEnterFullScreen(); // iOS snot
|
|
228
|
+
vpVideoBlock.addEventListener("webkitendfullscreen", () => {
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
vpVideoBlock.style.width = "100%";
|
|
231
|
+
vpVideoBlock.style.height = "auto";
|
|
232
|
+
}, 100);
|
|
233
|
+
isFullscreen.value = false;
|
|
234
|
+
vpVideoBlock.removeEventListener("webkitendfullscreen")
|
|
235
|
+
});
|
|
232
236
|
} else if (vpVideoBlock.mozRequestFullScreen) {
|
|
233
237
|
await vpVideoBlock.mozRequestFullScreen(); // Firefox
|
|
234
238
|
} else if (vpVideoBlock.msRequestFullscreen) {
|
|
@@ -414,7 +418,6 @@ function initVideo() {
|
|
|
414
418
|
*/
|
|
415
419
|
const observer = new MutationObserver((mutationsList, observer) => {
|
|
416
420
|
const mediaTheme = document.querySelector('.video-player-theme-container');
|
|
417
|
-
|
|
418
421
|
if (mediaTheme && mediaTheme.shadowRoot) {
|
|
419
422
|
const fullscreenButton = mediaTheme.shadowRoot.querySelector('media-fullscreen-button');
|
|
420
423
|
const playbackRateButton = mediaTheme.shadowRoot.querySelector('media-playback-rate-menu');
|
|
@@ -465,6 +468,9 @@ defineExpose({ startFullscreen });
|
|
|
465
468
|
text-indent: -999%;
|
|
466
469
|
color: transparent;
|
|
467
470
|
background-color: transparent;
|
|
471
|
+
text-shadow: none !important;
|
|
472
|
+
visibility: hidden !important;
|
|
473
|
+
opacity: 0 !important;
|
|
468
474
|
}
|
|
469
475
|
|
|
470
476
|
.custom-subtitles {
|