teyuto-react-native-player Github
TeyutoPlayer
is a React Native library that allows you to embed a Teyuto video player in a React Native app using react-native-webview
.
Installation
Make sure you have react-native-webview
installed in your React Native project.
npm install react-native-webview
Then, install TeyutoPlayerSdk:
npm install @teyuto/react-native-player
Usage
import React, { Component } from 'react';
import TeyutoPlayerSdk from '@teyuto/react-native-player;
import { Button, View } from 'react-native';
export default class App extends Component {
render() {
return (
<View style={{ flex: 1 }}>
<TeyutoPlayer
ref={(r) => (this.player = r)}
channel="<CHANNEL_PUBLIC>" //required
id="<VIDEO_ID>" //required
controls='on'
muted='off'
autoplay='on'
loop='on'
playbackRates="off"
qualitySelector="on"
captions="on"
seekButtons="on"
playerColor="#000"
lowLatency="on"
token=''
/>
<Button onPress={() => this.player.play()} title="Play" />
<Button onPress={() => this.player.pause()} title="Pause" />
</View>
)
}
}
Replace <VIDEO_ID> with your Teyuto video ID. Replace <CHANNEL_PUBLIC> with your Channel (public).