re-enable video and audio looping

This commit is contained in:
balzack 2023-03-05 11:17:41 -08:00
parent 780dd226f0
commit 335a11c129
3 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ export function AudioAsset({ topicId, asset, dismiss }) {
<Icons name="window-close" size={32} color={Colors.text} /> <Icons name="window-close" size={32} color={Colors.text} />
</TouchableOpacity> </TouchableOpacity>
{ state.url && ( { state.url && (
<Video ref={player} source={{ uri: state.url }} isLooping={true} <Video ref={player} source={{ uri: state.url }} repeat={true}
paused={!state.playing} onLoad={actions.loaded} style={styles.player} /> paused={!state.playing} onLoad={actions.loaded} style={styles.player} />
)} )}
</View> </View>

View File

@ -23,6 +23,7 @@ export const styles = StyleSheet.create({
top: 0, top: 0,
paddingLeft: 48, paddingLeft: 48,
paddingRight: 48, paddingRight: 48,
color: Colors.text,
}, },
close: { close: {
position: 'absolute', position: 'absolute',

View File

@ -18,7 +18,7 @@ export function VideoAsset({ topicId, asset, dismiss }) {
{ state.url && ( { state.url && (
<Video source={{ uri: state.url }} style={{ width: state.width, height: state.height }} resizeMode={'cover'} <Video source={{ uri: state.url }} style={{ width: state.width, height: state.height }} resizeMode={'cover'}
onReadyForDisplay={(e) => { console.log(e) }} onReadyForDisplay={(e) => { console.log(e) }}
onLoad={actions.loaded} isLooping={true} paused={!state.playing} resizeMode="contain" /> onLoad={actions.loaded} repeat={true} paused={!state.playing} resizeMode="contain" />
)} )}
{ (!state.playing || state.controls) && ( { (!state.playing || state.controls) && (
<View style={{ ...styles.overlay, width: state.width, height: state.height }} /> <View style={{ ...styles.overlay, width: state.width, height: state.height }} />