1.0.0 • Published 6 years ago

react-native-wistia-player v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

React Native Wistia Player

Wistia video player component for React Native

Introduction

React Native Wistia Player is a WebView wrapper component on wistia player. This component make use of common video player use-cases such as playing, pausing, modifying callback speed, etc.

Installation

npm install react-native-wistia-player --save

Usage

import React from 'react';
import WistiaPlayer from 'react-native-wistia-player';

const MyComponent = (
  <WistiaPlayer
    videoId={YOUR_WISTIA_VIDEO_ID}
  />
);

Props

PropRequiredDescription
videoIdYESset which video to play
styleNOadd additional style to WebView player
onMessageNOfunction to handle onMessage WebView event

Methods

  • togglePlaying() toggle the play/pause state of the video.

  • setPlaybackSpeed(speed: Number) sets the playback speed of the video. Defaults 1.

License

MIT