@grfzhl/vue-hls-player 1.1.8 → 1.1.9

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
- vpVideoBlock = document.querySelector('video');
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.removeAttribute("playsinline");
230
- vpVideoBlock.removeAttribute("webkit-playsinline");
231
- await vpVideoBlock.webkitRequestFullscreen(); // iOS snot
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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grfzhl/vue-hls-player",
3
3
  "private": false,
4
- "version": "1.1.8",
4
+ "version": "1.1.9",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"