Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-true-sight

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-true-sight

A cross-platform video player with customizable controls for React Native.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Native True Sight

A cross-platform video player with customizable controls.

This library provide a fully customisable video player that work both on Android and iOS. It also come with common use case documentation of things that you would like to implements.

By default there are two controls slots that are displayed respectively on different part of the parent container and you can use default components provided by this library:

  • Middle. Contain by default a grid display two buttons:
    • One with play / pause alternating.
    • Another that will restart the video.
  • Bottom. Contain the video current time, a progress bar and the total duration.
  • Loader. There is also a loader that will trigger while video is charging (network issues, bootstraping, ...).

Documentation

  • Installation chapter
  • Render a FullScreen Video player
  • Implement your own controls bar

Quick documentation

This is simple as that.

VideoPlayer ship around any video component, but fits well with react-video. In v2 you've total control on the video component.

  • autoStart - Whether or not the video should start when rendered (Default to true).
  • mainControl - The component used to render the main control bar, you can use the default one provided by this lib or your own.
  • bottomControl - The component used to render the bottom control bar, you can use the default one provided by this lib or your own.

For advanced configuration, such as infinite loop, check the rest of the documentation and custom controls bar.

import React, { Component } from "react";
import { View } from "react-native";
import { VideoPlayer, DefaultMainControl, DefaultBottomControlsBar } from "react-native-true-sight";

export default class HomeScreen extends Component {
  render() {
    return (
      <VideoPlayer
          autoStart={false}
          mainControl={args => <DefaultMainControl {...args} />}
          bottomControl={args => <DefaultBottomControlsBar {...args} />}
        >
          {args => (
            <VideoFrame
              ref={args.playerRef}
              source={{ uri: data.videoUrl }}
              paused={args.videoPaused}
              onLoad={args.onLoad}
              onProgress={args.onProgress}
              onEnd={args.onEnd}
            />
          )}
        </VideoPlayer>
    );
  }
}

Keywords

FAQs

Package last updated on 11 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc