Skip to content

Commit

Permalink
Merge pull request #86 from red5pro/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bustardcelly authored May 11, 2021
2 parents db009fb + bdb9a0b commit 1f6fd20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions example/Red5ProVideoViewExample/src/views/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,19 @@ export default class Publisher extends React.Component {
const nodeHandle = findNodeHandle(this.red5pro_video_publisher)
if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') {
console.log('Publisher:AppState - App has come to the foreground.')
if (enableBackgroundStreaming) {
console.log('Background Streaming enabled: unmuteVideo')
unmuteVideo(findNodeHandle(this.red5pro_video_publisher))
}
} else if (nextAppState.match(/inactive|background/) && this.state.appState === 'active') {
console.log('Publisher:AppState - App has gone to the background.')
if (!enableBackgroundStreaming) {
console.log('Publisher:AppState - unpublish()')
// unpublish(nodeHandle)
onStop()
} else {
console.log('Background Streaming enabled: muteVideo')
muteVideo(findNodeHandle(this.red5pro_video_publisher))
}
}
this.setState({
Expand Down

0 comments on commit 1f6fd20

Please sign in to comment.