React Native wrapper for the Wowza's GoCoder SDK Player (WOWZPlayer).
Only iOS support has been added so far, feel free to contribute Android.
For the Wowza GoCoder SDK Broadcaster functionality, please see react-native-wowza-gocoder.
$ npm install react-native-wowza-player --save
$ react-native link react-native-wowza-gocoder
- Add
WowzaGoCoderSDK.framework
to theios/
directory in your project. - In Xcode, add
WowzaGoCoderSDK.framework
to the Embedded Binaries (this will also add it to Linked Frameworks and Libraries). - In Xcode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-wowza-player
and addRNWowzaPlayer.xcodeproj
- In Xcode, in the project navigator, select your project. Add
libRNWowzaPlayer.a
to your project'sBuild Phases
➜Link Binary With Libraries
Not implemented yet
- Import the module
import Wowza, { Config, Player } from 'react-native-wowza-player'
- Register you license key
Wowza.registerLicenseKey('GO-MY-KEY')
- Set a config
const config = new Config({
hostAddress: '',
applicationName: '',
streamName: '',
username: null,
password: null,
});
- Render the player
<Player
config={config}
muted={false}
style={styles.videoContainer}
/>
- If you can't see the video, try using absolute positioning.
const styles = StyleSheet.create({
container: {
flex: 1,
},
videoContainer:{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 40
}
})
- iOS
- tvOS - not yet supported by the native SDK
- Android
- support all config parameters
- support all playback functionality