0.1.22 • Published 2 months ago

itg-react-native v0.1.22

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

itg-react-native

ITGOverlay for react-native

Installation

npm install itg-react-native react-native-keyevent react-native-video react-native-vector-icons

Usage

import { ITGVideoOverlay } from 'itg-react-native';

// ...

  <View style={{flex:1}}>
<ITGVideoOverlay
      ref={overlayRef}
        accountId={'62a73d850bcf95e08a025f82'}
        channelSlug={'rn-demo'}
        environment={'dev'}
        paused={false}
        muted={false}
        onOverlayDidLoadChannelInfo={(videoUrl) => setChannelVideo(videoUrl)}
        controls={true}
        onOverlayRequestedPause={(isPaused) => isPaused ?  videoRef.current?.pause() : videoRef.current?.resume()}
        currentTime={currentTime}
        videoPlaybackState={videoState}
        videoDuration={videoDuration}
        onOverlayRequestedFullScreen={(payload) => setIsFullscreen(payload)}
        >
            <Video

            controls
            source={{
              uri: 'https://media.inthegame.io/integration-assets/superdemo-720p.mp4'
            }}
            ref={videoRef}
            resizeMode={isFullscreen ? 'cover' : 'contain'}
            onLoad={(data) => {
              setVideoDuration(data.duration)
            }}
            progressUpdateInterval={1000}
            onProgress={({currentTime}) => setCurrentTime(currentTime)}
            onPlaybackStateChanged={({isPlaying}) => setVideoState(isPlaying)}
            onSeek={(data) => setCurrentTime(data.seekTime)}
          />  
          </ITGVideoOverlay>
   </View>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.1.22

2 months ago

0.1.21

2 months ago

0.1.20

2 months ago

0.1.19

3 months ago

0.1.18

3 months ago

0.1.17

3 months ago

0.1.16

3 months ago

0.1.15

3 months ago

0.1.14

3 months ago

0.1.12

4 months ago

0.1.13

4 months ago

0.1.11

4 months ago

0.1.10

4 months ago

0.1.8

4 months ago

0.1.7

4 months ago

0.1.9

4 months ago

0.1.6

4 months ago

0.1.5

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago