Skip to content

Commit 0b0fed8

Browse files
Backport video source fix for iOS into v1.13.3 (#12524)
* Prevent fullscreen video source in iOS (#11067) Co-authored-by: Ricky Reusser <[email protected]>
1 parent 4c7e345 commit 0b0fed8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### 🐞 Bug fixes
44

55
* Fix incorrect billing when `customAccessToken` is provided along with non-Mapbox tiles ([#12520](https://github.com/mapbox/mapbox-gl-js/issues/12520))
6+
* Prevent video sources from entering fullscreen on iOS Safari ([#11067](https://github.com/mapbox/mapbox-gl-js/issues/11067))
67
* Upgrade minimist to ^1.2.7 to avoid [CVE-2021-44906](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44906) ([#12442](https://github.com/mapbox/mapbox-gl-js/issues/12442)) (h/t @Spasfonx)
78

89
## 1.13.2

src/source/video_source.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ class VideoSource extends ImageSource {
7979
this.video = video;
8080
this.video.loop = true;
8181

82+
// Prevent the video from taking over the screen in iOS
83+
this.video.setAttribute('playsinline', '');
84+
8285
// Start repainting when video starts playing. hasTransition() will then return
8386
// true to trigger additional frames as long as the videos continues playing.
8487
this.video.addEventListener('playing', () => {

0 commit comments

Comments
 (0)