From c991a0e8f73572689cec379250667c11450046d8 Mon Sep 17 00:00:00 2001 From: KrzysztofMoch Date: Mon, 18 Sep 2023 16:20:14 +0200 Subject: [PATCH] chore: update basic example --- examples/basic/src/VideoPlayer.android.tsx | 500 +++++++++++---------- examples/basic/src/VideoPlayer.ios.tsx | 329 ++++++++------ 2 files changed, 462 insertions(+), 367 deletions(-) diff --git a/examples/basic/src/VideoPlayer.android.tsx b/examples/basic/src/VideoPlayer.android.tsx index a3206a84..a62ac563 100644 --- a/examples/basic/src/VideoPlayer.android.tsx +++ b/examples/basic/src/VideoPlayer.android.tsx @@ -1,8 +1,6 @@ 'use strict'; -import React, { - Component -} from 'react'; +import React, {Component, createRef} from 'react'; import { StyleSheet, @@ -14,12 +12,11 @@ import { ToastAndroid, } from 'react-native'; -import { Picker } from '@react-native-picker/picker' +import {Picker} from '@react-native-picker/picker'; -import Video, { VideoDecoderProperties, TextTrackType } from 'react-native-video'; +import Video, {TextTrackType, VideoDecoderProperties} from 'react-native-video'; class VideoPlayer extends Component { - state = { rate: 1, volume: 1, @@ -46,7 +43,7 @@ class VideoPlayer extends Component { showRNVControls: false, }; - seekerWidth = 0 + seekerWidth = 0; srcList = [ require('./broadchurch.mp4'), @@ -60,99 +57,95 @@ class VideoPlayer extends Component { }, { description: '(hls|live) red bull tv', - uri: 'https://rbmn-live.akamaized.net/hls/live/590964/BoRB-AT/master_928.m3u8' + uri: 'https://rbmn-live.akamaized.net/hls/live/590964/BoRB-AT/master_928.m3u8', }, { description: '(mp4|subtitles) demo with sintel Subtitles', - uri: - 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0', + uri: 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0', type: 'mpd', }, { description: 'invalid URL', - uri: - 'mmt://www.youtube.com', + uri: 'mmt://www.youtube.com', type: 'mpd', }, - { description: '(no url) Stopped playback', uri: undefined }, + {description: '(no url) Stopped playback', uri: undefined}, { description: '(no view) no View', noView: true, }, - ] + ]; - video: Video; + video = createRef