Ad

iphone-inline-video: Inline video playback on iPhone

iphone-inline-video enables inline video playback on iOS devices (iPhone & iPod Touch) by utilizing the `playsinline` attribute, preventing automatic fullscreen playback. It supports silent video autoplay and works with existing video players.
Screenshot of fregante/iphone-inline-video homepage

iphone-inline-video enables inline video playback on iPhone and iPod Touch devices by leveraging the native playsinline attribute introduced in iOS 10. This library provides a polyfill for iOS 8 and 9, allowing videos to play inline without automatically entering fullscreen mode. It supports silent video autoplay and integration with existing video players. The core problem addressed is the default behavior of iOS requiring videos to enter fullscreen when played.

The project's key strength is its minimal footprint (under 2KB) and ease of use – requiring only a simple script inclusion or npm installation. It necessitates no custom API calls for playback, allowing standard video element methods like video.play() to be used. This is a significant advantage over more complex video player solutions. It provides a straightforward way to achieve inline video playback without disrupting existing web page layouts.

  • Small Size: Less than 2KB makes it efficient for performance-sensitive applications.
  • Easy Integration: Simple script inclusion or npm installation.
  • Standard API: Uses existing HTML video element methods (e.g., video.play()).
  • Silent Autoplay: Supports autoplay for muted videos.
  • No Frameworks Needed: Standalone, requires no external dependencies.
  • Existing Player Compatibility: Works with existing video player implementations.
  • iPad Support: Enables autoplay and muted video behavior on iPad.

The project is archived and no longer actively maintained, reflecting the native support added by Apple in iOS 10 and 11. While it remains functional on older iOS versions, its need has diminished. The project has a decent number of stars and forks, indicating past popularity. However, the recent commits are infrequent, and the focus has shifted to native iOS capabilities.

Developers can use iphone-inline-video to easily control how videos are displayed on iPhones (iOS 8-9), ensuring they play inline rather than automatically entering fullscreen. This is valuable for creating more controlled and user-friendly video experiences within web applications. It is most beneficial when developers need to ensure videos remain within their designated container and avoid interruptions to the user's browsing flow.

Languages:
Summarize:
Share:
Stars
2,043
Forks
292
Issues
9
Created
10 years ago
Commit
4 years ago
License
MIT
Archived
Yes
Updated 3 days ago

Similar Repositories