Hello,
We cannot get mixer video playing in iOS. After stream is created, we get a black video area. Then after a minute "Failed By ICE timeout" error appears. We tested this on various iOS devices, so it seems to be the general error. Note that "Two-way Streaming" example works, so this is either an error in our code or something mixer-related.
These are 2 methods in our live meeting React class that start and play mixer stream:
Note that we checked condition
I cannot see any essential difference between our code and Two-way streaming example. Maybe you can? Thank you!
We cannot get mixer video playing in iOS. After stream is created, we get a black video area. Then after a minute "Failed By ICE timeout" error appears. We tested this on various iOS devices, so it seems to be the general error. Note that "Two-way Streaming" example works, so this is either an error in our code or something mixer-related.
These are 2 methods in our live meeting React class that start and play mixer stream:
JavaScript:
/**
* Creates and plays mixer stream.
*/
playMixerStream () {
// This makes everything work in iOS Safari.
if (IS_SAFARI && navigator.mediaDevices || Flashphoner.getMediaProviders()[0] === 'MSE') {
Flashphoner
.playFirstVideo(this.mixerRef.current, false, this.preloaderVideo)
.then(() => {
// Create a mixer stream.
this.createMixerStream()
// Play created stream.
this.mixerStream.play()
})
.catch((e) => {
this.setError(e.message)
console.error(e)
})
}
else {
// Create a mixer stream.
this.createMixerStream()
// Play created mixer stream.
this.mixerStream.play()
}
}
/**
* Creates WCS mixer stream.
*/
createMixerStream () {
const { mixerName, streamName } = this.props
// Create a mixer stream.
// noinspection JSUnresolvedVariable
this.mixerStream = this.wcsSession.createStream({
name: mixerName + '-' + streamName,
display: this.mixerRef.current
})
// Stream is created and is playing.
// noinspection JSUnresolvedVariable
this.mixerStream.on(STREAM_STATUS.PLAYING, () => {
this.setStatus('live')
})
// Stream is failed for some reason.
this.mixerStream.on(STREAM_STATUS.FAILED, (stream) => {
const error = this.getStreamError(stream)
if (error === 'Stopped by publisher stop') {
this.setStatus(MIXER_POST_ACTION_STATUSES['stop'])
}
else {
this.setError(this.getStreamError(stream))
}
})
}
if (IS_SAFARI...)
and it worked well. I cannot see any essential difference between our code and Two-way streaming example. Maybe you can? Thank you!