Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,好像没有全屏功能 #24

Open
dxhame opened this issue Aug 25, 2016 · 2 comments
Open

你好,好像没有全屏功能 #24

dxhame opened this issue Aug 25, 2016 · 2 comments

Comments

@dxhame
Copy link

dxhame commented Aug 25, 2016

你好,好像没有全屏功能,请问啥时支持?
你有QQ号或者QQ群吗?方便加一下你请教你 @ldn0x7dc

@KevinOfNeu
Copy link

@dxhame This body forked branch has fullscreen feature. https://github.com/chinaczy/react-native-media-kit

@super-ax
Copy link

@KevinOfNeu android平台下播放不了报错,帮我看一下,我代码有错没
是不是我哪写错了

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
TextInput,
ListView,
TouchableOpacity,
Image,
ScrollView,
Text,
Alert,
View,
Dimensions
} from 'react-native';
import {Video} from 'react-native-fullscreen-media-kit';

class Test4 extends Component {
fullScreen(){
this.forceUpdate() ; // 横屏强制刷新
}

render() {
let width = Dimensions.get('window').width ;
let height = width / (16/9) ;
let screenStatus = 1 ;
let bottomView ;
let videoStyle ;
if(this.video) //获取手机屏幕方向,0:横屏
screenStatus = this.video.getScreenStatus();
if(screenStatus == 0 ) {
videoStyle = {width:width , flex:1} ;
}else{
bottomView = (

i am a long string \r\n long \r\n long/n...can change line ?

);
videoStyle = {width:width,height:height} ;
}
//非全屏显示bottomView.
return (

<Video
style={videoStyle}
src={'http://v.yoai.com/femme_tampon_tutorial.mp4'}
autoplay={false}
preload={'none'}
loop={false}
controls={true}
muted={false}
ref={(video)=>this.video = video}
screenUpdate={this.fullScreen.bind(this)}
poster={'http://static.yoaicdn.com/shoppc/images/cover_img_e1e9e6b.jpg'}
videoTitle={"如何使用初密"}
/>
{bottomView}

);
}

}

const styles = StyleSheet.create({
backgroundVideo: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0,
},
container:{
flex:1
}
});

export default Test4;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants