我有一个React Native视频播放器应用程序,其中集成了rtmp实时流,但是这里的问题是,即使我移至该应用程序的其他页面,音频也不会暂停
我尝试添加所有可用于ksy视频的道具,但是它不起作用
render() {
return (
<View >
<KSYVideo
source={{
uri: "rtmp://103.130.188.26:1935/ntv/live/live1"
}} // Can be a URL or a local file.
ref={ref => {
this.player = ref;
}} // Store reference
volume={1.0}
muted={false}
paused={this.state.paused} // Pauses playback entirely.
resizeMode="cover" // Fill the whole screen at aspect ratio.*
repeat={true} // Repeat forever.
playInBackground={false} // Audio continues to play when app
entering background.
progressUpdateInterval={250.0}
onLoadStart={this.loadStart} // Callback when video
starts to load
onLoad={this.setDuration} // Callback when video
loads
onError={this.videoError} // Callback when video
cannot be loaded
onEnd={this.onEnd} // Callback when playback
finishes
style={{
height: 350,
}}
/>