Explorar el Código

remove canvas from live

David hace 9 años
padre
commit
dd7df5ab1b
Se han modificado 2 ficheros con 21 adiciones y 58 borrados
  1. 0 21
      src/scenes/Live/Canvas.js
  2. 21 37
      src/scenes/LiveVideo.js

+ 0 - 21
src/scenes/Live/Canvas.js

@@ -1,21 +0,0 @@
-import React, { Component } from 'react';
-import { Image } from 'react-native';
-
-class Canvas extends Component  {
-	state = { url: '' };
-	diapoUrl(pdf, diapo) {
-		const ret = `https://plataforma.especificosba.com.ar/diapo/${pdf}/${diapo}.png`;
-		return ret;
-	}
-
-	render() {
-		return (
-		<Image
-			source={{ uri: this.diapoUrl(this.props.pdf, this.props.diapo) }}
-			style={[{ flex: 1, resizeMode: 'contain' }, this.props.style]}
-		/>
-		);
-	}
-}
-
-export default Canvas;

+ 21 - 37
src/scenes/LiveVideo.js

@@ -5,7 +5,6 @@ import {
 } from 'react-native';
 
 import Video from 'react-native-video';
-import Canvas from './Live/Canvas';
 import Socket from '../components/Socket';
 import Chat from './Live/Chat';
 
@@ -36,32 +35,27 @@ class LiveVideo extends Component {
 
 		return (
 			<View style={{ flex: 1 }}>
-			<ScrollableTabView renderTabBar={() => <View />} >
-			<View tabLabel='Video' style={styles.videoPage}>
-			<View style={styles.video}>
-			<Video
-				source={{ uri: 'https://plataforma.especificosba.com.ar/hls/movie.m3u8' }}
-				ref={(ref) => { this.player = ref; }}
-				volume={0.2}
-				resizeMode={'contain'}
-				style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}
-			/>
-			</View>
-			<View style={styles.imageContainer}>
-				<Canvas pdf={this.state.pdf} diapo={this.state.diapo} style={{ flex: 1 }} />
-			</View>
-
-			</View>
+				<ScrollableTabView renderTabBar={() => <View />} >
+					<View tabLabel='Video' style={styles.videoPage}>
+						<View style={styles.video}>
+							<Video
+								source={{ uri: 'https://plataforma.especificosba.com.ar/hls/movie.m3u8' }}
+								ref={(ref) => { this.player = ref; }}
+								volume={0.2}
+								resizeMode={'contain'}
+								style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}
+							/>
+						</View>
+					</View>
 
-			<View style={{ flex: 1 }} tabLabel='Chat'>
-				<Chat style={{ flex: 1 }} messages={this.state.messages} />
-			</View>
-
-			</ScrollableTabView>
-			<Socket
-				onDiapoChanged={this.onDiapoChanged.bind(this)}
-				onMessage={this.onMessage.bind(this)}
-			/>
+					<View style={{ flex: 1 }} tabLabel='Chat'>
+						<Chat style={{ flex: 1 }} messages={this.state.messages} />
+					</View>
+				</ScrollableTabView>
+				<Socket
+					onDiapoChanged={this.onDiapoChanged.bind(this)}
+					onMessage={this.onMessage.bind(this)}
+				/>
 			</View>
 
 		);
@@ -79,17 +73,7 @@ const styles = StyleSheet.create({
 		alignItems: 'center',
 		backgroundColor: '#F5FCFF',
 		margin: 5
-
-	},
-	imageContainer: {
-		flex: 1,
-		margin: 5
-	},
-	instructions: {
-		textAlign: 'center',
-		color: '#333333',
-		marginBottom: 5,
-	},
+	}
 });