removed unused youtube screen references

This commit is contained in:
Nouman Tahir 2021-08-11 23:32:28 +05:00
parent 4692a401dd
commit 86876c2923
3 changed files with 0 additions and 43 deletions

View File

@ -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: {

View File

@ -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 },
},
{

View File

@ -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