npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-safevideo-player-fork

v0.2.54

Published

SafeVideo video player for react native apps

Downloads

35

Readme

react-native-safevideo-player

SafeVideo player for react native apps

Installation

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.

Usage

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' }}
/>

Configurable props

Event props

Methods

Configurable props

title

The text that will be shown in the player's header and the music card if the playInBackground prop is true

  • string

Platforms: All

artist

The text that will be shown in the music card if the playInBackground prop is true

  • string

Platforms: All

artwork

The text url that will be shown in the music card if the playInBackground prop is true

  • string

Platforms: All

castId

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

progressBarColor

The color that will override the default player's progressBar color

  • string

Default: #FEC92D

Platforms: All

textColor

The color that will override the default player's menu background color

  • string

Default: #000

Platforms: All

startAt

The time in seconds the video will start when the player finish load

  • int

Default: 0

Platforms: All

backgroundColor

The color that will override the default player's menu text and icons color

  • string

Default: #FFF

Platforms: All

onEnterFullscreen

Callback executed when the player enters full screen

  • () => void

Platforms: All

onExitFullscreen

Callback executed when the player exit full screen

  • () => void

Platforms: All

style

The style applied to the player view

  • ViewStyle

Platforms: All

containerStyle

The style applied to the view that wraps the player and the controls

  • ViewStyle

Platforms: All

controlsStyle

The style applied to the player controls view

  • ViewStyle

Platforms: All

onSeekStart

Callback executed when the user start the sliding or tap of the progressBar

  • () => void

Platforms: All

onSeekEnd

Callback executed when the user end the sliding or tap of the progressBar

  • () => void

Platforms: All

menuOption

The options that will be add to the player's menu

  • any | any[]

Platforms: All

disableFullscreen

Hide the player's fullscreen button

  • boolean

Platforms: All

disableCast

Hide the player's cast button

  • boolean

Platforms: All

disableOptions

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

disableCloseButton

Hide the player's close button

  • boolean

Platforms: All

onRequestClose

Callback executed when the close button is click by the user

  • () => void

playOnStart

Tells the player to start playing when the video has loaded

  • any | any[]

Platforms: All

playInBackground

Play the video audio in background and creates a music card to control the audio via notification or in the lockscreen

  • boolean

Platforms: All

Examples

# Android app
yarn example android
# iOS app
yarn example ios

License

MIT