Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Option to make it lazy (detect more browsers) #34

Closed
fregante opened this issue May 6, 2016 · 2 comments
Closed

Option to make it lazy (detect more browsers) #34

fregante opened this issue May 6, 2016 · 2 comments
Milestone

Comments

@fregante
Copy link
Owner

fregante commented May 6, 2016

  1. Some Android browsers force the video fullscreen, but which ones?
  2. IIV could actually be break things if enabled where not tested and there's no easy way to detect whether the video is not being updated.
  3. Feature detection means that users will see a video flash fullscreen for up to a second, this is true at least on iOS

Possible options:

  • whitelist, only iPhone/iPod now, but could be extended
  • whitelist+lazy, like above but also watch for automatic fullscreen to detect point #​1
  • lazy only: always watch for automatic fullscreen, it lets webkit-playsinline-enabled browsers work without this IIV, but point #​3

Possible API, default options:

enableInlineVideo(video, {
    enabled: 'auto',
    lazy: false // ideally this would default to true, but point #2
});
@fregante fregante added this to the Version 2 milestone May 6, 2016
@fregante
Copy link
Owner Author

fregante commented May 6, 2016

It might just be a better idea to keep this feature as an external module, like:

// equivalent to enabled: 'auto'
enableInlineVideo(video);

// equivalent to lazy: true
supportsInlineVideo(video).then(
    video => console.log(video, 'is playing inline'),
    video => enableInlineVideo(video, {enabled: 'always'})
);
video.play();

@fregante fregante mentioned this issue May 17, 2016
13 tasks
@fregante
Copy link
Owner Author

fregante commented Jun 1, 2016

This is not advised, IIV could work on Chrome/Android but the video element is not updated on seek and thus the playback would be broken.

The only thing that could be done is the detection module above that tracks and perhaps blocks the fullscreen, to allow the setup of a fallback.

@fregante fregante closed this as completed Jun 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant