added lite file page
This commit is contained in:
parent
381e780d8d
commit
b0c5b6f062
1 changed files with 27 additions and 32 deletions
|
@ -25,7 +25,6 @@ import uriBarStyle from 'styles/uriBar';
|
||||||
|
|
||||||
// This page will only be used for playing audio / video content from a remote stream URL
|
// This page will only be used for playing audio / video content from a remote stream URL
|
||||||
class LiteFilePage extends React.PureComponent {
|
class LiteFilePage extends React.PureComponent {
|
||||||
|
|
||||||
playerBackground = null;
|
playerBackground = null;
|
||||||
|
|
||||||
scrollView = null;
|
scrollView = null;
|
||||||
|
@ -35,11 +34,9 @@ class LiteFilePage extends React.PureComponent {
|
||||||
state = {
|
state = {
|
||||||
fullscreenMode: false,
|
fullscreenMode: false,
|
||||||
playerHeight: null,
|
playerHeight: null,
|
||||||
}
|
};
|
||||||
|
|
||||||
getStreamUrl = (uri) => {
|
getStreamUrl = uri => {};
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { contentUri } = this.props;
|
const { contentUri } = this.props;
|
||||||
|
@ -58,33 +55,31 @@ class LiteFilePage extends React.PureComponent {
|
||||||
{!this.state.fullscreenMode && <UriBar value={uri} navigation={navigation} />}
|
{!this.state.fullscreenMode && <UriBar value={uri} navigation={navigation} />}
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={
|
style={this.state.fullscreenMode ? filePageStyle.innerPageContainerFsMode : filePageStyle.innerPageContainer}
|
||||||
this.state.fullscreenMode ? filePageStyle.innerPageContainerFsMode : filePageStyle.innerPageContainer
|
onLayout={this.checkOrientation}
|
||||||
}
|
>
|
||||||
onLayout={this.checkOrientation}
|
|
||||||
>
|
|
||||||
<MediaPlayer
|
<MediaPlayer
|
||||||
claim={claim}
|
claim={claim}
|
||||||
assignPlayer={ref => {
|
assignPlayer={ref => {
|
||||||
this.player = ref;
|
this.player = ref;
|
||||||
}}
|
}}
|
||||||
uri={uri}
|
uri={uri}
|
||||||
source={this.playerUriForFileInfo(fileInfo)}
|
source={this.playerUriForFileInfo(fileInfo)}
|
||||||
style={playerStyle}
|
style={playerStyle}
|
||||||
autoPlay
|
autoPlay
|
||||||
onFullscreenToggled={this.handleFullscreenToggle}
|
onFullscreenToggled={this.handleFullscreenToggle}
|
||||||
onLayout={evt => {
|
onLayout={evt => {
|
||||||
if (!this.state.playerHeight) {
|
if (!this.state.playerHeight) {
|
||||||
this.setState({ playerHeight: evt.nativeEvent.layout.height });
|
this.setState({ playerHeight: evt.nativeEvent.layout.height });
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMediaLoaded={() => this.onMediaLoaded(channelName, title, uri)}
|
onMediaLoaded={() => this.onMediaLoaded(channelName, title, uri)}
|
||||||
onBackButtonPressed={this.onBackButtonPressed}
|
onBackButtonPressed={this.onBackButtonPressed}
|
||||||
onPlaybackStarted={this.onPlaybackStarted}
|
onPlaybackStarted={this.onPlaybackStarted}
|
||||||
onPlaybackFinished={this.onPlaybackFinished}
|
onPlaybackFinished={this.onPlaybackFinished}
|
||||||
thumbnail={thumbnail}
|
thumbnail={thumbnail}
|
||||||
position={position}
|
position={position}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue