SafeVideo player for react native apps
yarn add react-native-video
yarn add react-native-google-cast
yarn add react-native-music-control
yarn add react-native-safevideo-player
- See the installation steps for all the added dependencies to get it running. Some libs need extra configuration for android and iOS.
import SafevideoPlayer from "react-native-safevideo-player";
// ...
<SafeVideoPlayer
title='SaveVideo player example'
onError={handleError}
style={StyleSheet.absoluteFill}
source={{ uri: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8' }}
/>
- title
- artist
- artwork
- castId
- progressBarColor
- textColor
- startAt
- backgroundColor
- onEnterFullscreen
- onExitFullscreen
- containerStyle
- controlsStyle
- onSeekStart
- onSeekEnd
- menuOption
- disableFullscreen
- disableCast
- disableOptions
- playOnStart
- playInBackground
- Every prop from react-native-video
The text that will be shown in the player's header and the music card if the playInBackground prop is true
- string
Platforms: All
The text that will be shown in the music card if the playInBackground prop is true
- string
Platforms: All
The text url that will be shown in the music card if the playInBackground prop is true
- string
Platforms: All
The id used to verify if the video is already been played. If not set, every time the player is initiated it will restart the video while connected to a chromecast. If set and the id is the same of the current one been casted, the player will continue the current video and show it's progress
- string
Platforms: All
The color that will override the default player's progressBar color
- string
Default: #FEC92D
Platforms: All
The color that will override the default player's menu background color
- string
Default: #000
Platforms: All
The time in seconds the video will start when the player finish load
- int
Default: 0
Platforms: All
The color that will override the default player's menu text and icons color
- string
Default: #FFF
Platforms: All
Callback executed when the player enters full screen
- () => void
Platforms: All
Callback executed when the player exit full screen
- () => void
Platforms: All
The style applied to the player view
- ViewStyle
Platforms: All
The style applied to the view that wraps the player and the controls
- ViewStyle
Platforms: All
The style applied to the player controls view
- ViewStyle
Platforms: All
Callback executed when the user start the sliding or tap of the progressBar
- () => void
Platforms: All
Callback executed when the user end the sliding or tap of the progressBar
- () => void
Platforms: All
The options that will be add to the player's menu
- any | any[]
Platforms: All
Hide the player's fullscreen button
- boolean
Platforms: All
Hide the player's cast button
- boolean
Platforms: All
Can be a boolean to disable all the options and hide the player's options button or an string array with the options to be disabled
- boolean | [<quality> | <rate>]
Platforms: All
Platforms: All
Hide the player's close button
- boolean
Platforms: All
Callback executed when the close button is click by the user
- () => void
Tells the player to start playing when the video has loaded
- any | any[]
Platforms: All
Play the video audio in background and creates a music card to control the audio via notification or in the lockscreen
- boolean
Platforms: All
# Android app
yarn example android
# iOS app
yarn example ios
MIT