0.1.22 • Published 1 year ago
itg-react-native v0.1.22
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
1 year ago
0.1.21
1 year ago
0.1.20
1 year ago
0.1.19
1 year ago
0.1.18
1 year ago
0.1.17
1 year ago
0.1.16
1 year ago
0.1.15
1 year ago
0.1.14
1 year ago
0.1.12
1 year ago
0.1.13
1 year ago
0.1.11
1 year ago
0.1.10
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.9
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago