-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
45 lines (42 loc) · 1.03 KB
/
App.tsx
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
import * as React from 'react';
import {Text, View, StyleSheet} from 'react-native';
import Video from 'react-native-video';
const App = () => {
return (
<View style={s.container}>
<Text style={s.title}>🎬 VisionOS Example for React Native Video ⚛</Text>
<Video
source={{
uri: 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
title: 'Sintel',
subtitle: 'Example Video',
description: 'Example Video to test VisionOS video player',
customImageUri:
'https://bitdash-a.akamaihd.net/content/sintel/poster.png',
}}
style={s.video}
controls={true}
resizeMode={'contain'}
/>
</View>
);
};
export default App;
const s = StyleSheet.create({
container: {
flex: 1,
padding: 20,
justifyContent: 'center',
alignItems: 'center',
},
video: {
width: '90%',
height: '70%',
},
title: {
fontSize: 30,
marginBottom: 20,
fontWeight: 'bold',
color: 'white',
},
});