capacitor-video-player
v6.0.0
Published
custom Native Capacitor plugin to play a video
Downloads
12,360
Readme
Maintainers
| Maintainer | GitHub | Social | Active | | ----------------- | ------------------------------------------- | ------ | ------ | | Harmon Wood | harmonwood | | ✅ | | Quéau Jean Pierre | jepiqueau | | ❌ |
LATEST FOR CAPACITOR 5 (Master)
Browser Support
The plugin follows the guidelines from the Capacitor Team
,
meaning that it will not work in IE11 without additional JavaScript transformations, e.g. with Babel.
Installation
npm install --save capacitor-video-player
npx cap sync
npx cap sync @capacitor-community/electron
Build
Then build YOUR_APPLICATION
npm run build
npx cap copy
npx cap copy web
npx cap copy @capacitor-community/electron
npx cap open android
npx cap open ios
npx cap open @capacitor-community/electron
npx cap serve
Configuration
No configuration required for this plugin
Supported methods
| Name | Android | iOS | Electron | Web | | :--------------------------------- | :------ | :-- | :------- | :-- | | initPlayer (mode fullscreen) | ✅ | ✅ | ✅ | ✅ | | initPlayer (mode embedded) | ❌ | ❌ | ✅ | ✅ | | initPlayer (url assets) | ✅ | ✅ | ✅ | ✅ | | initPlayer (url internal) | ✅ | ✅ | ❌ | ❌ | | initPlayer (url application/files) | ✅ | ✅ | ❌ | ❌ | | initPlayer (subtitles) | ✅ | ✅ | ❌ | ❌ | | initPlayer (headers) | ✅ | ✅ | ❌ | ❌ | | initPlayer (title) | ✅ | ✅ | ❌ | ❌ | | initPlayer (smallTitle) | ✅ | ✅ | ❌ | ❌ | | initPlayer (accentColor) | ✅ | ❌ | ❌ | ❌ | | initPlayer (chromecast) | ✅ | ❌ | ❌ | ❌ | | initPlayer (artwork) | ✅ | ✅ | ❌ | ❌ | | isPlaying | ✅ | ✅ | ✅ | ✅ | | play | ✅ | ✅ | ✅ | ✅ | | pause | ✅ | ✅ | ✅ | ✅ | | getCurrentTime | ✅ | ✅ | ✅ | ✅ | | setCurrentTime | ✅ | ✅ | ✅ | ✅ | | getDuration | ✅ | ✅ | ✅ | ✅ | | getMuted | ✅ | ✅ | ✅ | ✅ | | setMuted | ✅ | ✅ | ✅ | ✅ | | getVolume | ✅ | ✅ | ✅ | ✅ | | setVolume | ✅ | ✅ | ✅ | ✅ | | stopAllPlayers | ✅ | ✅ | ✅ | ✅ | | getRate | ✅ | ✅ | ✅ | ✅ | | setRate | ✅ | ✅ | ✅ | ✅ | | showController | ✅ | ❌ | ❌ | ❌ | | isControllerIsFullyVisible | ✅ | ❌ | ❌ | ❌ | | exitPlayer | ✅ | ❌ | ❌ | ❌ |
Supported listeners
| Name | Android | iOS | Electron | Web | | :---------------------- | :------ | :-- | :------- | :-- | | jeepCapVideoPlayerReady | ✅ | ✅ | ✅ | ✅ | | jeepCapVideoPlayerPlay | ✅ | ✅ | ✅ | ✅ | | jeepCapVideoPlayerPause | ✅ | ✅ | ✅ | ✅ | | jeepCapVideoPlayerEnded | ✅ | ✅ | ✅ | ✅ | | jeepCapVideoPlayerExit | ✅ | ✅ | ✅ | ✅ |
Documentation
Tutorials Blog
Applications demonstrating the use of the plugin
Capacitor 5 Apps
Application Starter (Not yet updated to 5.0.0)
Usage 2.4.7
Usage > 3.0.0
Dependencies
- hls.js for HLS videos on Web and Electron platforms
- ExoPlayer for HLS, DASH, SmoothStreaming videos on Android platform
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!