react-native-video/examples/exampletvOS/App.tsx

63 lines
36 KiB
TypeScript
Raw Normal View History

2023-08-11 15:16:10 -06:00
import React from 'react';
import {ActivityIndicator, StyleSheet} from 'react-native';
import Video from 'react-native-video';
export default function App() {
return (
<>
<ActivityIndicator style={styles.activityIndicator} size={'large'} />
<Video
source={{
2023-08-25 04:57:43 -06:00
uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
// uri: 'https://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8',
// type: 'm3u8',
metadata: {
title: 'Custom Title',
subtitle: 'Custom Subtitle',
description: 'Custom Description',
imageUri:
'https://pbs.twimg.com/profile_images/1498641868397191170/6qW2XkuI_400x400.png',
},
2023-08-11 15:16:10 -06:00
}}
style={[styles.fullScreen, StyleSheet.absoluteFillObject]}
controls
fullscreen
resizeMode={'contain'}
chapters={[
{
title: 'Chapter 1',
startTime: 0.0,
endTime: 20.0,
2023-08-13 16:16:41 -06:00
uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAABHNCSVQICAgIfAhkiAAAAGJ6VFh0UmF3IHByb2ZpbGUgdHlwZSBBUFAxAAB4nFXIsQ2AMAwAwd5TeIR3HBwyDkIBRUKAsn9BAQ1XnuztbKOveo9r60cTVVVVz5JrrmkBZl4GbhgJKF8t/ExEDQ8rHgYgD0i2FMl6UPBzAAAgAElEQVR4nOy9d5wkV3nv/X1OVff05J1N2rzapF0FkEiSiUJagRBJWASRDA6YZDC+mOt7X+PEdcC+Bl+DA8lGZAkkgQSSSBJCBIEQCBBahc05h5nZyd1V5/2jurordlf3dJhQv/30Tnf1Cc85fc6vnuc5zzklzHPojc9ZgplZg1ZLgEUoWYKtBxC6EelEkwNyQAeiO0GyoLPlv2TRmEAGwXTeC0DGU0vxvShEG2g0iAKM1rY2RYNggbYRBC3OewAk70mTBw1CAU0ByCMUgCmQKdDlv1rGgUlgAmECrcfRjKLk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jI5DJNKDsajWXYYqgNdxycDvDViE1D9sGAehRiHS2W5QUXmi0qRKZY41EprMT6eyoO75JA32ZLL84fYxvH91Tg08rClL83/mrEPqyWb56YAe7Tw/R1eQn0WV7ekr3DA1klCJv2Xxh76OMkfq02gYlORNNLlWwZhAyJpm8xYN/+uccLeTJxZjr2rbRWnPl3/8Nmb7e2OLO7NrN/R/8MNme7vg6RZgaHEKN5ME0YKo+0V3S+s3QSUyl2LpkDVj5uspSgE1Z2xGgJ5Pl9tFtvNSeYFOFvJOnzvCjf/wQ9uQUohS1qKyiFJNHj9PNANr
},
{
title: 'Chapter 2',
startTime: 20.0,
endTime: 40.0,
2023-08-13 16:16:41 -06:00
uri: 'https://pbs.twimg.com/profile_images/1498641868397191170/6qW2XkuI_400x400.png',
},
]}
2023-08-11 15:16:10 -06:00
/>
</>
);
}
const styles = StyleSheet.create({
fullScreen: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0,
},
activityIndicator: {
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,
},
});