fix Play icon being displayed for non-playable content #480
2 changed files with 27 additions and 24 deletions
|
@ -511,14 +511,16 @@ class FilePage extends React.PureComponent {
|
|||
onStartDownloadFailed={this.startDownloadFailed} />}
|
||||
{!fileInfo && <FilePrice uri={uri} style={filePageStyle.filePriceContainer} textStyle={filePageStyle.filePriceText} />}
|
||||
</View>
|
||||
{canLoadMedia && fileInfo && <View style={playerBgStyle}
|
||||
{(canLoadMedia && fileInfo && isPlayable) &&
|
||||
<View style={playerBgStyle}
|
||||
ref={(ref) => { this.playerBackground = ref; }}
|
||||
onLayout={(evt) => {
|
||||
if (!this.state.playerBgHeight) {
|
||||
this.setState({ playerBgHeight: evt.nativeEvent.layout.height });
|
||||
}
|
||||
}} />}
|
||||
{canLoadMedia && fileInfo && <MediaPlayer
|
||||
{(canLoadMedia && fileInfo && isPlayable) &&
|
||||
<MediaPlayer
|
||||
fileInfo={fileInfo}
|
||||
assignPlayer={(ref) => { this.player = ref; }}
|
||||
uri={uri}
|
||||
|
|
|
@ -139,6 +139,7 @@ const filePageStyle = StyleSheet.create({
|
|||
},
|
||||
containedPlayerBackground: {
|
||||
width: '100%',
|
||||
marginTop: 60,
|
||||
height: containedMediaHeight,
|
||||
},
|
||||
fullscreenPlayerBackground: {
|
||||
|
|
Loading…
Reference in a new issue