Skip to content

Commit

Permalink
Prevent fullscreen video source in iOS (#11067)
Browse files Browse the repository at this point in the history
  • Loading branch information
rreusser authored Oct 1, 2021
1 parent 2452af7 commit ba69792
Showing 1 changed file with 3 additions and 0 deletions.
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 ba69792

Please sign in to comment.