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-video-release

v1.0.4

Published

This package for video player & mini video player

Downloads

13

Readme

react-native-video-release

Warning: This package use for react native typescript templates (.tsx) only. This package for personal use.

1. Installing

using yarn:

yarn add react-native-video-release

2. Install dependencies

Using yarn:

yarn add react-native-video @react-native-community/slider @openspacelabs/react-native-zoomable-view react-native-paper react-native-vector-icons @react-native-async-storage/async-storage react-native-keep-awake react-native-orientation-locker react-native-fullscreen-chz @react-navigation/native

3. Install types for dependencies

Using yarn:

yarn add @types/react-native-video @types/react-native-vector-icons @types/react-native-keep-awake

4. IOS Install dependencies

Using npx:

npx pod-install

5. Please follow document of dependencies

react-native-video-release was custom from react-native-video package by Brent Vatne.

Overview

This package support current play history too. Now we're not support with cache storage but we work with video buffing quality (Android only). Enjoy with our customization, get new experience and fast performance from now. Thanks.

Example Usages

For VideoPlayer can use multiple videos

import React from "react";
import { View,Text } from "react-native";
import {VideoPlayer, useFullScreen } from 'react-native-video-release';

const Example = () => {
  const { getFullScreen } = useFullScreen();

  return (
    <View style={{ flex: 1 }}>
        <VideoPlayer
            navigationRef={navigationRef}
            source={[
              {
                title: 'This is my video 1',
                url: 'https://www.w3schools.com/html/mov_bbb.mp4',
                },
              },
              {
                title: 'This is my video 2',
                url: 'https://www.w3schools.com/html/mov_bbb.mp4',
                },
              },
            ]}
        />

         {/* check full screen (When full screen all content will be hidden)  */}
        {!getFullScreen && (
            <Text>This is content</Text>
        )}
    </View>
  );
};
export default Example;

For VideoMiniPlayer can use only one video

import React from "react";
import { View,Text } from "react-native";
import {VideoMiniPlayer, useFullScreen } from 'react-native-video-release';

const Example = () => {
  const { getFullScreen } = useFullScreen();

  return (
    <View style={{ flex: 1 }}>
        <VideoMiniPlayer
            navigationRef={navigationRef}
            source={{
                title: 'This is my video 1',
                url: 'https://www.w3schools.com/html/mov_bbb.mp4',
                },
              }}
        />

         {/* check full screen (When full screen all content will be hidden)  */}
        {!getFullScreen && (
          <Text>This is content</Text>
        )}
    </View>
  );
};
export default Example;

VideoPlayerProps

| Props | Type | Description | Default | | ----------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------- | | navigationRef | ref | This navigation use for go back with React Navigation | undefined | | pauseOnNavigate | boolean | pause video on navigate to new screen | true | | source | VideoItem[] | Video items you want to play (Allow multiple videos) | required | | initialIndex | number | Which video you want to play | 0 | | options | OptionProps | Show control on your video | {} | | disablePanOnInitialZoom | boolean | Disable on video zoom or not (it effect when full screen) | false | | minimumTrackTintColor | string | Color code of minimum track color | '#f05a28' | | thumbTintColor | string | Color code of thumb color | '#f05a28' | | backgroundColor | string | Background color of container and video | '#1e1a1d' | | titleColor | string | Title color of video | '#f6f6f6' | | playbackHistory | boolean | If you want to playback history of your video | false | | videoHeight | number | You can set height of your video (only work on portrait) | height of 1280 x 720 Ratio | | videoWidth | number | You can set width of your video (only work on portrait) | full width | | videoHeightRatio | number | You can set height ratio of your video (only work on portrait) | 720 Ratio | | videoWidthRatio | number | You can set width ratio of your video (only work on portrait) | 1280 Ratio | | VideoProperty | Inherited VideoProperty props... | You can use property from react-native-video also time | any |

VideoMiniPlayerProps

| Props | Type | Description | Default | | --------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------- | | navigationRef | ref | This navigation use for go back with React Navigation | undefined | | pauseOnNavigate | boolean | pause video on navigate to new screen | true | | source | VideoItem | Video item you want to play (Only one video) | required | | options | OptionProps | Show control on your video | {} | | minimumTrackTintColor | string | Color code of minimum track color | '#f05a28' | | thumbTintColor | string | Color code of thumb color | '#f05a28' | | backgroundColor | string | Background color of container and video | '#1e1a1d' | | titleColor | string | Title color of video | '#f6f6f6' | | playbackHistory | boolean | If you want to playback history of your video | false | | videoHeight | number | You can set height of your video (only work on portrait) | height of 1280 x 720 Ratio | | videoWidth | number | You can set width of your video (only work on portrait) | full width | | videoHeightRatio | number | You can set height ratio of your video (only work on portrait) | 720 Ratio | | videoWidthRatio | number | You can set width ratio of your video (only work on portrait) | 1280 Ratio | | VideoProperty | Inherited VideoProperty props... | You can use property from react-native-video also time | any |

VideoItemProps

| Props | Type | Description | Default | | --------- | ---------------- | --------------------------------- | ------------ | | title | string | Title of video | "" | | url | string | Url of your video | "" | | thumbnail | { url : string } | Thumbnail Image url of your video | { url : "" } |

OptionsProps

| Props | Type | Description | Default | | ------------------------ | ------- | ---------------------------------------------- | ------- | | showFullScreenButton | boolean | Show full screen button | true | | showVolumeButton | boolean | Show volume button | true | | showResizeButton | boolean | Show resize button | true | | showProgressBar | boolean | Show progress bar duration | true | | showDuration | boolean | Show duration time | true | | showTitle | boolean | Show title of video | true | | showPoster | boolean | Show poster before load video | true | | showBackButton | boolean | Show back button (Portrait) | false | | showNextButton | boolean | Show next button (VideoPlayer only) | true | | showPreviousButton | boolean | Show previous button (VideoPlayer only) | true | | showReplayNextButton | boolean | Show replay next button (VideoPlayer only) | true | | showReplayPreviousButton | boolean | Show replay previous button (VideoPlayer only) | true | | showSpeedButton | boolean | Show speed button (VideoPlayer only) | true | | showSettingButton | boolean | Show setting button (VideoPlayer only) | true | | showRepeatButton | boolean | Show repeat button (VideoPlayer only) | true |

Hooks for layout

useFullScreen()

Use inside your body component only

import React from "react";
import { View, Text } from "react-native";
import { useFullScreen } from "react-native-video-release";

const Example = () => {
  const { width, height, screen, getFullScreen } = useFullScreen();

  return (
    <View style={{ flex: 1 }}>
      <Text>This is full screen: {getFullScreen}</Text>
    </View>
  );
};
export default Example;
  • width (number): width of screen without notch header or footer
  • height (number): height of screen without notch header or footer
  • screen { width , height } (number): screen with notch header or footer
  • getFullScreen (boolean): check your screen is full screen or not

License

This project is licensed under the MIT License.

Contact Me