Skip to content

Commit ff451f4

Browse files
committed
movie screen and description
1 parent 2da3ae5 commit ff451f4

File tree

42 files changed

+201
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+201
-20
lines changed

ios/build/LineApp/Build/Intermediates.noindex/LineApp.build/Debug-iphonesimulator/LineApp.build/LineApp.app-Simulated.xcent

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<plist version="1.0">
44
<dict>
55
<key>application-identifier</key>
6-
<string>FAKETEAMID.org.reactjs.native.example.LineApp</string>
6+
<string>7PYK8XUWA3.org.reactjs.native.example.LineApp</string>
77
<key>keychain-access-groups</key>
88
<array>
9-
<string>FAKETEAMID.org.reactjs.native.example.LineApp</string>
9+
<string>7PYK8XUWA3.org.reactjs.native.example.LineApp</string>
1010
</array>
1111
</dict>
1212
</plist>

ios/build/LineApp/Build/Intermediates.noindex/LineApp.build/Debug-iphonesimulator/LineAppTests.build/LineAppTests.xctest-Simulated.xcent

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<plist version="1.0">
44
<dict>
55
<key>application-identifier</key>
6-
<string>FAKETEAMID.org.reactjs.native.example.LineAppTests</string>
6+
<string>7PYK8XUWA3.org.reactjs.native.example.LineAppTests</string>
77
<key>keychain-access-groups</key>
88
<array>
9-
<string>FAKETEAMID.org.reactjs.native.example.LineAppTests</string>
9+
<string>7PYK8XUWA3.org.reactjs.native.example.LineAppTests</string>
1010
</array>
1111
</dict>
1212
</plist>
Binary file not shown.
Binary file not shown.

ios/build/LineApp/Logs/Build/LogStoreManifest.plist

+32
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@
66
<integer>10</integer>
77
<key>logs</key>
88
<dict>
9+
<key>5FBD2FC6-EC86-4839-AE7B-D2B98C6B5FC0</key>
10+
<dict>
11+
<key>className</key>
12+
<string>IDECommandLineBuildLog</string>
13+
<key>documentTypeString</key>
14+
<string>&lt;nil&gt;</string>
15+
<key>domainType</key>
16+
<string>Xcode.IDEActivityLogDomainType.BuildLog</string>
17+
<key>fileName</key>
18+
<string>5FBD2FC6-EC86-4839-AE7B-D2B98C6B5FC0.xcactivitylog</string>
19+
<key>primaryObservable</key>
20+
<dict>
21+
<key>highLevelStatus</key>
22+
<string>W</string>
23+
</dict>
24+
<key>schemeIdentifier-containerName</key>
25+
<string>LineApp project</string>
26+
<key>schemeIdentifier-schemeName</key>
27+
<string>LineApp</string>
28+
<key>schemeIdentifier-sharedScheme</key>
29+
<integer>1</integer>
30+
<key>signature</key>
31+
<string>Building project LineApp with scheme LineApp and configuration Debug</string>
32+
<key>timeStartedRecording</key>
33+
<real>589057410.79598105</real>
34+
<key>timeStoppedRecording</key>
35+
<real>589057417.34411299</real>
36+
<key>title</key>
37+
<string>Building project LineApp with scheme LineApp and configuration Debug</string>
38+
<key>uniqueIdentifier</key>
39+
<string>5FBD2FC6-EC86-4839-AE7B-D2B98C6B5FC0</string>
40+
</dict>
941
<key>B80A73AB-D564-4D3D-B531-3A6E7C2D6A93</key>
1042
<dict>
1143
<key>className</key>

ios/build/LineApp/info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>LastAccessedDate</key>
6-
<date>2019-08-26T19:32:36Z</date>
6+
<date>2019-09-01T19:03:30Z</date>
77
<key>WorkspacePath</key>
88
<string>/Users/minamac/Desktop/Proyectos/lineVideo/ios/LineApp.xcodeproj</string>
99
</dict>

src/player/components/fullscreen.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function FullScreen(props) {
1717
{
1818
props.fullScreen ? <Iconf name="compress" color="white" size={20} /> : <Icon name="md-expand" size={20} color="white" />
1919
}
20+
2021
</TouchableHighlight>
2122
</View>
2223
)

src/player/containers/player.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,19 @@ class Player extends Component {
4343
}
4444
onFullScreen = () => {
4545
this.fullScreen();
46-
this.state.fullScreen ? this.video.dismissFullscreenPlayer() : this.video.presentFullscreenPlayer(); //esto no funciona del todo bien
46+
this.state.fullScreen ? this.video.dismissFullscreenPlayer() : this.video.presentFullscreenPlayer();
47+
this.fullScreen();
4748
}
4849
videoRef = (element) => {
4950
this.video = element;
5051
}
5152
onProgress = (playload) => {
52-
let currentTime = playload.currentTime / 60; //tiempo transcurrido en minutos
53-
let minutes = Math.floor(currentTime); //tiempo transcurrido sin decimales
53+
let currentTime = playload.currentTime / 60;
54+
let minutes = Math.floor(currentTime);
5455
let seconds = currentTime % 1;
5556
seconds = (seconds * 60) / 1000;
56-
let time = (minutes + seconds * 10).toFixed(2); //toFixed(2) 2 decimales
57-
let duration = (playload.seekableDuration / 60).toFixed(2)//seekableDuration: duracion de todo el video
57+
let time = (minutes + seconds * 10).toFixed(2);
58+
let duration = (playload.seekableDuration / 60).toFixed(2)
5859
this.setState({
5960
currentTime: time,
6061
progress: (playload.currentTime / playload.seekableDuration),

src/screens/containers/movie.js

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
import React, { Component } from 'react';
22
import MovieLayout from '../components/movie';
33
import Player from "../../player/containers/player";
4+
import Details from '../../videos/components/details'
45
import Header from '../../sections/components/header';
5-
6+
import Close from '../../sections/components/close';
7+
import { connect } from 'react-redux';
68
class Movie extends Component {
9+
closeVideo = () => {
10+
this.props.dispatch({
11+
type: 'SET_SELECTED_MOVIE',
12+
payload: {
13+
movie: null,
14+
}
15+
})
16+
}
717
render() {
818
return (
919
<MovieLayout>
10-
<Header />
20+
<Header>
21+
<Close
22+
onPress={this.closeVideo}
23+
/>
24+
</Header>
1125
<Player />
26+
<Details {...this.props.movie} />
1227
</MovieLayout>
1328
)
14-
1529
}
1630
}
31+
function mapStateToProps(state) {
32+
return {
33+
movie: state.selectedMovie
34+
}
35+
}
36+
1737

18-
export default Movie
38+
export default connect(mapStateToProps)(Movie);

src/sections/components/close.js

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React from 'react';
2+
import {
3+
Text,
4+
View,
5+
Animated,
6+
StyleSheet,
7+
TouchableOpacity
8+
} from 'react-native';
9+
10+
11+
function Close(props) {
12+
this.fadeAnimation = new Animated.Value(0)
13+
Animated.timing(this.fadeAnimation, {
14+
toValue: 1,
15+
duration: 1000,
16+
useNativeDriver: true,
17+
}).start()
18+
return (
19+
<TouchableOpacity
20+
onPress={props.onPress}
21+
style={styles.container}
22+
>
23+
<Animated.Text style={[styles.button, { opacity: this.fadeAnimation }]}>X</Animated.Text>
24+
</TouchableOpacity>
25+
)
26+
}
27+
const styles = StyleSheet.create({
28+
button: {
29+
fontWeight: 'bold',
30+
color: 'white',
31+
},
32+
container: {
33+
backgroundColor: '#EE0039',
34+
borderRadius: 12,
35+
width: 25,
36+
height: 25,
37+
overflow: 'hidden',
38+
alignItems: 'center',
39+
justifyContent: 'center',
40+
right: 20,
41+
top: 25,
42+
}
43+
})
44+
45+
export default Close;

src/sections/components/header.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ function Header(props) {
1919
{props.children}
2020
</View>
2121
</View>
22-
2322
</SafeAreaView>
2423
</View>
2524
)
2625
}
2726
const styles = StyleSheet.create({
2827
container: {
29-
paddingVertical: 5,
28+
paddingVertical: 1,
3029
paddingHorizontal: 5,
3130
flexDirection: 'row',
3231
},

src/videos/components/category-list-layout.js

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function CategoryListLayout(props) {
1717

1818
const styles = StyleSheet.create({
1919
container: {
20-
paddingVertical: 30,
2120
paddingHorizontal: 10,
2221
},
2322
title: {

src/videos/components/details.js

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import React from 'react';
2+
import { View, Text, Image, StyleSheet, ScrollView } from 'react-native';
3+
4+
function Details(props) {
5+
return (
6+
<View>
7+
<View style={styles.top}>
8+
<Text>{props.title}</Text>
9+
</View>
10+
<View style={styles.bottom}>
11+
<ScrollView>
12+
<View style={styles.details}>
13+
<Image
14+
style={styles.cover}
15+
source={{ uri: props.medium_cover_image }}
16+
/>
17+
18+
<Text style={styles.description}>{props.description_full}</Text>
19+
20+
</View>
21+
</ScrollView>
22+
</View>
23+
</View>
24+
)
25+
}
26+
27+
export default Details;
28+
29+
const styles = StyleSheet.create({
30+
container: {},
31+
trailer: {
32+
height: 200
33+
},
34+
details: {
35+
flexDirection: "row",
36+
marginBottom: 20
37+
},
38+
cover: {
39+
width: 125,
40+
height: 190
41+
},
42+
title: {
43+
color: "#44546b",
44+
fontSize: 18,
45+
fontWeight: "bold"
46+
},
47+
top: {
48+
borderBottomWidth: 1,
49+
borderBottomColor: "#eaeaea",
50+
padding: 20,
51+
backgroundColor: "white"
52+
},
53+
bottom: {
54+
padding: 20,
55+
56+
},
57+
description: {
58+
fontSize: 15,
59+
lineHeight: 22.5,
60+
color: "#4c4c4c",
61+
marginLeft: 10,
62+
flex: 1
63+
}
64+
});

src/videos/components/suggestions.js

+22-3
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,37 @@ import {
55
Image,
66
Text,
77
StyleSheet,
8-
TouchableOpacity
8+
TouchableOpacity,
9+
Animated
910
} from 'react-native';
1011

1112
function Suggestion(props) {
13+
this.fadeImage = new Animated.Value(0)
14+
Animated.timing(this.fadeImage, {
15+
toValue: 1,
16+
duration: 500,
17+
useNativeDriver: true,
18+
}).start()
1219
return (
1320
<TouchableOpacity
1421
onPress={props.onPress}
1522
>
1623
<View style={styles.contanier}>
1724
<View style={styles.left}>
18-
<Image
19-
style={styles.cover}
25+
<Animated.Image
26+
style={[styles.cover,
27+
{
28+
opacity: this.fadeImage,
29+
transform: [
30+
{
31+
scale: this.fadeImage.interpolate({
32+
inputRange: [0, 1],
33+
outputRange: [0.85, 1],
34+
})
35+
}
36+
]
37+
38+
}]}
2039
source={{ uri: props.medium_cover_image }}
2140
/>
2241
</View>

store.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import storage from 'redux-persist/lib/storage';
1111
const persistConfig = {
1212
key: 'root',
1313
storage,
14+
blacklist: ['selectedMovie']
1415
}
1516
const persistedReducer = persistReducer(persistConfig, reducer)
1617

0 commit comments

Comments
 (0)