File tree 4 files changed +80
-2
lines changed
4 files changed +80
-2
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Created by Dat Tran on 2/8/17.
3
+ */
4
+ import React from 'react' ;
5
+ import PropTypes from 'prop-types'
6
+ import { requireNativeComponent } from 'react-native' ;
7
+
8
+ export default class QuickbloxLocalVideoView extends React . Component {
9
+
10
+ constructor ( props ) {
11
+ super ( props ) ;
12
+ this . onRendered = this . onRendered . bind ( this ) ;
13
+ }
14
+
15
+ onRendered ( event : Event ) {
16
+ if ( this . props . onRendered )
17
+ this . props . onRendered ( )
18
+ }
19
+
20
+ stopCamera ( ) {
21
+ this . myRef . setNativeProps ( { stopCamera : true } )
22
+ }
23
+
24
+ render ( ) {
25
+ return < NativeQuickbloxLocalVideoView
26
+ { ...this . props }
27
+ ref = { ci => this . myRef = ci }
28
+ onChange = { this . onRendered }
29
+ /> ;
30
+ }
31
+ }
32
+
33
+ QuickbloxLocalVideoView . propTypes = {
34
+ onRendered : PropTypes . func
35
+ }
36
+
37
+ const NativeQuickbloxLocalVideoView = requireNativeComponent ( 'QuickbloxLocalVideoView' , null ) ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Created by Dat Tran on 2/8/17.
3
+ */
4
+ import React from 'react' ;
5
+ import PropTypes from 'prop-types'
6
+ import { requireNativeComponent } from 'react-native' ;
7
+
8
+ export default class QuickbloxRemoteVideoView extends React . Component {
9
+
10
+ constructor ( props ) {
11
+ super ( props ) ;
12
+ this . onRendered = this . onRendered . bind ( this ) ;
13
+ }
14
+
15
+ onRendered ( event : Event ) {
16
+ if ( this . props . onRendered )
17
+ this . props . onRendered ( )
18
+ }
19
+
20
+ render ( ) {
21
+ return < NativeQuickbloxRemoteVideoView
22
+ { ...this . props }
23
+ ref = { ci => this . myRef = ci }
24
+ onChange = { this . onRendered }
25
+ /> ;
26
+ }
27
+ }
28
+
29
+ QuickbloxRemoteVideoView . propTypes = {
30
+ onRendered : PropTypes . func
31
+ }
32
+
33
+ const NativeQuickbloxRemoteVideoView = requireNativeComponent ( 'QuickbloxRemoteVideoView' , null ) ;
Original file line number Diff line number Diff line change 1
1
2
2
import { NativeModules } from 'react-native' ;
3
+ import QuickbloxLocalVideoView from './QuickbloxLocalVideoView'
4
+ import QuickbloxRemoteVideoView from './QuickbloxRemoteVideoView'
5
+
6
+ export {
7
+ QuickbloxLocalVideoView ,
8
+ QuickbloxRemoteVideoView
9
+ }
3
10
4
11
const { RNQuickblox } = NativeModules ;
5
12
Original file line number Diff line number Diff line change 1
-
2
1
{
3
2
"name" : " react-native-video-quickblox" ,
4
3
"version" : " 1.0.1" ,
23
22
},
24
23
"homepage" : " https://github.com/ttdat89/react-native-video-quickblox/blob/master/README.md" ,
25
24
"peerDependencies" : {
26
- "react-native" : " ^0.41.2"
25
+ "react" : " 16.0.0-alpha.12" ,
26
+ "react-native" : " ^0.48.3" ,
27
+ "prop-types" : " ^15.5.10"
27
28
}
28
29
}
You can’t perform that action at this time.
0 commit comments