Skip to content

Commit

Permalink
Backport video source fix for iOS into v1.13.3 (#12524)
Browse files Browse the repository at this point in the history
* Prevent fullscreen video source in iOS (#11067)

Co-authored-by: Ricky Reusser <[email protected]>
  • Loading branch information
stepankuzmin and rreusser authored Jan 17, 2023
1 parent 4c7e345 commit 0b0fed8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 🐞 Bug fixes

* Fix incorrect billing when `customAccessToken` is provided along with non-Mapbox tiles ([#12520](https://github.com/mapbox/mapbox-gl-js/issues/12520))
* Prevent video sources from entering fullscreen on iOS Safari ([#11067](https://github.com/mapbox/mapbox-gl-js/issues/11067))
* 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)

## 1.13.2
Expand Down
3 changes: 3 additions & 0 deletions src/source/video_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ class VideoSource extends ImageSource {
this.video = video;
this.video.loop = true;

// Prevent the video from taking over the screen in iOS
this.video.setAttribute('playsinline', '');

// Start repainting when video starts playing. hasTransition() will then return
// true to trigger additional frames as long as the videos continues playing.
this.video.addEventListener('playing', () => {
Expand Down

0 comments on commit 0b0fed8

Please sign in to comment.