I am trying to implement Live Broadcast by Agora.io in React Native mobile application. I have previously implemented video call successfully. I have gone through documentation, compare and contrast video call to live broadcast ( both web sdk). I could only find a difference in mode of the client which corresponds to channelProfile in react-native sdk. In documentation it says there are three different modes: Communication, Live Broadcast and Gaming. When I implemented video call I assigned 1 for the value of channelProfile, it worked fine, quality was good enough. However, when I assign 2 for channelProfile to indicate it is a Live Broadcast, the quality goes heavily down. Do I make anything wrong while implementation of Live Broadcast? How can I improve the quality of Live Broadcast? For consideration, I put my code below:
const config = {
appid: 'MY APP ID',
channelProfile: this.props.navigation.getParam('channelProfile', 2),
clientRole: this.props.navigation.getParam('clientRole', 1),
videoEncoderConfig: {
width: 360,
height: 480,
bitrate: 1,
frameRate: FPS30,
orientationMode: Adaptative,
},
audioProfile: AudioProfileDefault,
audioScenario: AudioScenarioDefault
}
RtcEngine.on('userJoined', (data) => {
console.warn("user joined", data);
const { peerIds } = this.state;
if (peerIds.indexOf(data.uid) === -1) {
this.setState({
peerIds: [...this.state.peerIds, data.uid]
})
}
})
RtcEngine.on('error', (error) => {
console.warn("error", error);
})
RtcEngine.init(config);