Describe the Bug
Expo video won't start playback when react-native-track-player@5.0.0-alpha0 is installed on Android. No JS errors shown, video stays paused.
Steps To Reproduce
Use the expo video example component and install react-native-track-player version 5.0.0-alpha0
- Create new Expo app
- npm install expo-video react-native-track-player@5.0.0-alpha0
- npx expo run:android
- Open the example screen using expo-video and press Play
Expected behavior
Video should start playing.
Actual behavior
Play button does nothing; video does not start. Removing react-native-track-player makes video play normally.
Code To Reproduce
Expo video example app
import { useEvent } from "expo";
import { useVideoPlayer, VideoView } from "expo-video";
import { StyleSheet, View, Button } from "react-native";
const videoSource =
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";
export default function VideoScreen() {
const player = useVideoPlayer(videoSource, (player) => {
player.loop = true;
player.play();
});
const { isPlaying } = useEvent(player, "playingChange", {
isPlaying: player.playing,
});
return (
<View style={styles.contentContainer}>
<VideoView style={styles.video} player={player} />
<View style={styles.controlsContainer}>
<Button
title={isPlaying ? "Pause" : "Play"}
onPress={() => {
if (isPlaying) {
player.pause();
} else {
player.play();
}
}}
/>
</View>
</View>
);
}
const styles = StyleSheet.create({
contentContainer: {
flex: 1,
padding: 10,
alignItems: "center",
justifyContent: "center",
paddingHorizontal: 50,
},
video: {
width: 350,
height: 275,
},
controlsContainer: {
padding: 10,
},
});
Replicable on Example App?
Had trouble setting up the example app, but a default expo project with the expo video example component will replicate the issue on an Android Simulator.
When removing react-native-track-player, the video plays normally
Environment Info:
- OS: Windows 11
- Node: 23.4.0
- npm: 11.4.2
- Expo SDK: 53.0.22
- react-native: 0.79.6
- react-native-track-player: 5.0.0-alpha0
- expo-video: 2.2.2
Describe the Bug
Expo video won't start playback when react-native-track-player@5.0.0-alpha0 is installed on Android. No JS errors shown, video stays paused.
Steps To Reproduce
Use the expo video example component and install react-native-track-player version 5.0.0-alpha0
Expected behavior
Video should start playing.
Actual behavior
Play button does nothing; video does not start. Removing react-native-track-player makes video play normally.
Code To Reproduce
Expo video example app
Replicable on Example App?
Had trouble setting up the example app, but a default expo project with the expo video example component will replicate the issue on an Android Simulator.
When removing react-native-track-player, the video plays normally
Environment Info: