mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-02 10:54:59 +03:00
removed unused youtube screen references
This commit is contained in:
parent
4692a401dd
commit
86876c2923
@ -30,7 +30,6 @@ export default {
|
||||
ACCOUNT_BOOST: `AccountBoost${SCREEN_SUFFIX}`,
|
||||
COMMUNITY: `Community${SCREEN_SUFFIX}`,
|
||||
COMMUNITIES: `Communities${SCREEN_SUFFIX}`,
|
||||
YOUTUBE: `YouTube${SCREEN_SUFFIX}`,
|
||||
WEB_BROWSER: `WebBrowser${SCREEN_SUFFIX}`,
|
||||
},
|
||||
DRAWER: {
|
||||
|
@ -40,7 +40,6 @@ import {
|
||||
Communities,
|
||||
WebBrowser,
|
||||
} from '../screens';
|
||||
import YoutubePlayer from '../screens/youtube/youtubePlayer';
|
||||
|
||||
const bottomTabNavigator = createBottomTabNavigator(
|
||||
{
|
||||
@ -152,7 +151,6 @@ const stackNavigator = createStackNavigator(
|
||||
[ROUTES.SCREENS.ACCOUNT_BOOST]: { screen: AccountBoost },
|
||||
[ROUTES.SCREENS.COMMUNITY]: { screen: Community },
|
||||
[ROUTES.SCREENS.COMMUNITIES]: { screen: Communities },
|
||||
[ROUTES.SCREENS.YOUTUBE]: { screen: YoutubePlayer },
|
||||
[ROUTES.SCREENS.WEB_BROWSER]: { screen: WebBrowser },
|
||||
},
|
||||
{
|
||||
|
@ -1,40 +0,0 @@
|
||||
import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
import YouTube from 'react-native-youtube';
|
||||
|
||||
const YoutubePlayer = ({navigation}) => {
|
||||
|
||||
const videoId = navigation.getParam('videoId');
|
||||
|
||||
if(!videoId){
|
||||
throw new Error("Please pass videoId");
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{flex:1, backgroundColor:'black', justifyContent:'center', alignItems:'center'}} >
|
||||
<YouTube
|
||||
videoId={videoId} // The YouTube video ID
|
||||
play // control playback of video with true/false
|
||||
fullscreen // control whether the video should play in fullscreen or inline
|
||||
onReady={e => {
|
||||
|
||||
}}
|
||||
onChangeFullscreen={(e)=>{
|
||||
if(!e.isFullscreen){
|
||||
navigation.goBack();
|
||||
}
|
||||
}}
|
||||
onError={e => {
|
||||
navigation.goBack();
|
||||
}}
|
||||
style={{ alignSelf: 'stretch', height: '90%', backgroundColor:'black' }}
|
||||
origin="http://www.youtube.com"
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
export default YoutubePlayer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user