chore(android): move contentStartTime into source prop (#4160)

This commit is contained in:
Olivier Bouillet
2024-09-14 19:53:54 +02:00
committed by GitHub
parent b74cb59602
commit 24d90e9ec8
9 changed files with 40 additions and 19 deletions

View File

@@ -34,7 +34,12 @@ import Video, {
} from 'react-native-video';
import styles from './styles';
import {type AdditionalSourceInfo} from './types';
import {bufferConfig, isAndroid, srcList, textTracksSelectionBy} from './constants';
import {
bufferConfig,
isAndroid,
srcList,
textTracksSelectionBy,
} from './constants';
import {Overlay, toast, VideoLoader} from './components';
import * as NavigationBar from 'expo-navigation-bar';
@@ -224,7 +229,7 @@ const VideoPlayer: FC<Props> = ({}) => {
const onVideoBandwidthUpdate = (data: OnBandwidthUpdateData) => {
console.log('onVideoBandwidthUpdate', data);
}
};
const onFullScreenExit = () => {
// iOS pauses video on exit from full screen
@@ -284,7 +289,10 @@ const VideoPlayer: FC<Props> = ({}) => {
bufferingStrategy={BufferingStrategyType.DEFAULT}
debug={{enable: true, thread: true}}
subtitleStyle={{subtitlesFollowVideo: true}}
controlsStyles={{hideNavigationBarOnFullScreenMode: true, hideNotificationBarOnFullScreenMode: true}}
controlsStyles={{
hideNavigationBarOnFullScreenMode: true,
hideNotificationBarOnFullScreenMode: true,
}}
/>
</TouchableOpacity>
)}

View File

@@ -12,7 +12,7 @@ import {Platform} from 'react-native';
// This constant allows to change how the sample behaves regarding to texts selection.
// You can change it to change how selector will use tracks information.
// by default, index will be displayed and index will be applied to selected tracks.
// You can also use LANGUAGE or TITLE
// You can also use LANGUAGE or TITLE
export const textTracksSelectionBy = SelectedTrackType.INDEX;
export const isIos = Platform.OS === 'ios';