Skip to content
Open

test #128

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/media-console/src/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const AnimatedVideoPlayer = (
onExitFullscreen = () => {},
onHideControls = () => {},
onShowControls = () => {},
onSetting = () => {},
name ="",
onPause,
onPlay,
onLoad,
Expand Down Expand Up @@ -213,6 +215,7 @@ const AnimatedVideoPlayer = (
onEnd: _onEnd,
onScreenTouch: _onScreenTouch,
onEnterFullscreen,
onSetting:onSetting,
onExitFullscreen,
onShowControls,
onHideControls,
Expand Down Expand Up @@ -432,6 +435,8 @@ const AnimatedVideoPlayer = (
onBack={events.onBack}
resetControlTimeout={resetControlTimeout}
showControls={showControls}
onSetting={events.onSetting}
name={name}
/>
<PlayPause
animations={animations}
Expand Down
15 changes: 14 additions & 1 deletion packages/media-console/src/components/TopControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
StyleSheet,
View,
GestureResponderHandlers,
Text,
} from 'react-native';
import {Volume} from './Volume';
import {Back} from './Back';
Expand All @@ -14,6 +15,7 @@ import type {VideoAnimations} from '../types';

interface TopControlProps {
showControls: boolean;
name: string;
panHandlers: GestureResponderHandlers;
animations: VideoAnimations;
disableBack: boolean;
Expand All @@ -22,6 +24,7 @@ interface TopControlProps {
volumeTrackWidth: number;
volumePosition: number;
onBack: () => void;
onSetting: () => void;
resetControlTimeout: () => void;
}

Expand All @@ -36,7 +39,9 @@ export const TopControls = memo(
volumePosition,
volumeTrackWidth,
onBack,
onSetting,
resetControlTimeout,
name,
}: TopControlProps) => {
const backControl = disableBack ? (
<NullControl />
Expand Down Expand Up @@ -68,7 +73,15 @@ export const TopControls = memo(
>
<SafeAreaView style={_styles.topControlGroup}>
{backControl}
<View style={_styles.pullRight}>{volumeControl}</View>
<View style={_styles.pullRight}>
{volumeControl}
<Text
style={{color: 'white', marginLeft: 10}}
onPress={onSetting}
>
{name}
</Text>
</View>
</SafeAreaView>
</ImageBackground>
</AnimatedView>
Expand Down