-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
38 lines (34 loc) · 958 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React, { useState } from 'react';
import {
Button,
SafeAreaView,
StyleSheet,
ScrollView,
Text,
StatusBar,
} from 'react-native';
import { NodePlayerView } from 'react-native-nodemediaclient';
const App: () => React$Node = () => {
let videoPlay;
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView>
<ScrollView
contentInsetAdjustmentBehavior="automatic">
<Text>Player View</Text>
<NodePlayerView
style={{ height: 400, width: 300 }}
ref={(viewRef) => { videoPlay = viewRef }}
inputUrl={"https://1fc659412734.us-east-1.playback.live-video.net/api/video/v1/us-east-1.289791315264.channel.THY7TZ55gz2B.m3u8"}
scaleMode={"ScaleAspectFit"}
bufferTime={300}
maxBufferTime={1000}
autoplay={true}
/>
</ScrollView>
</SafeAreaView>
</>
);
};
export default App;