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

@nghinv/react-native-vlc

v1.1.0

Published

A `VLCPlayer` component for react-native project clone from `react-native-yz-vlcplayer`

Downloads

165

Readme

@nghinv/react-native-vlc

A VLCPlayer component for react-native project clone from react-native-yz-vlcplayer

Installation

Installing the package

  • Use yarn
yarn add @nghinv/react-native-vlc
  • Use npm
npm install @nghinv/react-native-vlc

Dependencies

  • react-native-vector-icons

  • react-native-slider

android

  • With autolinking (react-native 0.60+)

  • Pre 0.60

Run react-native link @nghinv/react-native-vlc

ios

  • With autolinking (react-native 0.60+)

Run cd ios && pod install

  • Pre 0.60

Use framework

  1. cd to ios

  2. run pod init

  3. add pod 'MobileVLCKit', '3.3.10' to pod file

  4. run pod install

  • Enable Bitcode

In root project select Build Settings ---> find Bitcode and select Enable Bitcode

  • Remove DSYM

In root project select Build Settings --> Build Options --> Debug Information is set to DWARF.

Example

  (1) import { VLCPlayer, VlCPlayerView } from '@nghinv/react-native-vlc';

  (2) 
    <VLCPlayer
      ref={ref => (this.vlcPlayer = ref)}
      style={[styles.video]}
      videoAspectRatio="16:9"
      paused={this.state.paused}
      source={{ uri: this.props.uri}}
      onProgress={this.onProgress.bind(this)}
      onEnd={this.onEnded.bind(this)}
      onBuffering={this.onBuffering.bind(this)}
      onError={this._onError}
      onStopped={this.onStopped.bind(this)}   
      onPlaying={this.onPlaying.bind(this)}
      onPaused={this.onPaused.bind(this)}      
    />
  (3) or use
    <VlCPlayerView
      autoplay={false}
      url={this.state.url}
      Orientation={Orientation}      
      BackHandle={BackHandle}
      showTitle={true}
      title=""
      showBack={true}
      onLeftPress={()=>{}}
      startFullScreen={() => {      
        this.setState({
        isFull: true,
        });
      }}
      closeFullScreen={() => {
        this.setState({
        isFull: false,
        });
      }}
    />

Property

VLCPlayer component

| Property | Type | Default | Description | |----------|:----:|:-------:|-------------| | rate | number | | | | seek | number | | | | resume | boolean | | | | position | number | | | | snapshotPath | string | | | | paused | boolean | | | | autoAspectRatio | boolean | | | | videoAspectRatio | string | 16:9 | | | volume | number | | from 0 to 200 | | volumeUp | number | | | | volumeDown | number | | | | repeat | boolean | | | | muted | boolean | | | | hwDecoderForced | number | 0, 1 | (Only android) need use with hwDecoderForced | | hwDecoderEnabled | number | 0, 1 | Only android) need use with hwDecoderEnabled | | style | ViewStyle | | | | onVideoLoadStart | func | | | | onVideoStateChange | func | | | | onVideoProgress | func | | | | onSnapshot | func | | | | onIsPlaying | func | | | | onOpen | func | | | | onLoadStart | func | | | | source | oject, number | | | | play | func | | | | snapshot | func | | | | onError | func | | | | onProgress | func | | { currentTime:1000,duration:1000 } unit:ms | | onEnded | func | | | | onStopped | func | | | | onPlaying | func | | | | onPaused | func | | | | scaleX | number | | | | scaleY | number | | | | translateX | number | | | | translateY | number | | | | rotation | number | | |

VlCPlayerView component

| Property | Type | Default | Description | |----------|:----:|:-------:|-------------| | style | ViewStyle | | | | videoStyle | ViewStyle | | | | initPaused | boolean | false | | | source | oject, number | | { uri: 'http:...' } | | seek | number | 0 | | | playInBackground | boolean | false | | | isAd | boolean | false | | | showAd | boolean | false | | | adUrl | string | | | | autoplay | boolean | true | | | fullVideoAspectRatio | string | | | | videoAspectRatio | string | | | | errorTitle | string | Video playback error, please reload | | | height | number | 250 | | | url | string | | url of video | | showBack | boolean | false | | | showTitle | boolean | false | | | title | string | | | | showGoLive | boolean | false | | | showLeftButton | boolean | true | | | showMiddleButton | boolean | true | | | showRightButton | boolean | true | | | animationLayout | boolean | true | | | titleGolive | string | Go live | show when showGoLive true | | onEnd | func | | | | onAdEnd | func | | | | startFullScreen | func | | | | closeFullScreen | func | | | | onLeftPress | func | | | | onGoLivePress | func | | | | onReplayPress | func | | | | onVLCProgress | func | | | | onVLCEnded | func | | | | onVLCError | func | | | | onVLCBuffering | func | | | | BackHandle | | undefined | BackAndroid | | Orientation | | undefined | react-native-orientation-locker |

Supported formats

Supported formats mp4, m3u8, flv,mov, rtsp, rtmp, etc.