-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.js
57 lines (53 loc) · 1.51 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React, { Component } from "react";
import { View, SafeAreaView, Text, TouchableOpacity } from "react-native";
import { WebView } from "react-native-webview";
import FastImage from "react-native-fast-image";
// import VideoModal from "@paraboly/react-native-video-modal";
import VideoModal from "./lib/src/VideoModal";
const logo = require("./assets/parabol_logo.png");
const source = {
uri:
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
};
export default class App extends Component {
renderWebview() {
return (
<View style={{ width: "100%", height: 200 }}>
<WebView
source={source}
useWebKit={true}
javaScriptEnabled
domStorageEnabled
startInLoadingState
originWhitelist={["*"]}
allowsInlineMediaPlayback={true}
style={{ width: "100%", height: "100%", marginTop: 24 }}
/>
</View>
);
}
render() {
return (
<SafeAreaView style={{ flex: 1, alignItems: "center" }}>
<View
style={{
marginTop: "30%",
alignItems: "center",
justifyContent: "center"
}}
>
<FastImage
source={logo}
resizeMode="contain"
style={{ width: 300, height: 100 }}
/>
</View>
<VideoModal
source={source}
title="Test Video Stream"
// customVideoComponent={this.renderWebview()}
/>
</SafeAreaView>
);
}
}