Hello,
We are experiencing a weird issue publishing audio in iOS/Safari via WebRTC. While the broadcaster camera is working fine, out of 10 attempts, we are experiencing audio failing 30% to 50% of the times . Our workaround to solve the issue is to close the browser, wait a few seconds, reopen and start to broadcast.
Is there anything we are doing wrong?
Thank you,
We are experiencing a weird issue publishing audio in iOS/Safari via WebRTC. While the broadcaster camera is working fine, out of 10 attempts, we are experiencing audio failing 30% to 50% of the times . Our workaround to solve the issue is to close the browser, wait a few seconds, reopen and start to broadcast.
Code:
{"video": false, "audio": {"autoGainControl": false, "bitrate": 64}}
Code:
Flashphoner.createSession(connect_options).on(SESSION_STATUS.ESTABLISHED, function(session){
console.log('SESSION_STATUS.CONNECTED');
browser_check(container, function(){
Flashphoner.getMediaAccess(constraints, container, null, false).then(function (disp) {
session.createStream(stream_options).on(STREAM_STATUS.PUBLISHING, function(publish_stream){
console.log('STREAM_STATUS.PUBLISHING');
}).on(STREAM_STATUS.UNPUBLISHED, function(){
console.log('STREAM_STATUS.UNPUBLISHED');
}).on(self.STREAM_STATUS.FAILED, function(stream){
console.log('STREAM_STATUS.FAILED');
}).publish();
}).catch(function (error) {
console.error(error);
});
});
}).on(SESSION_STATUS.DISCONNECTED, function(){
console.log('SESSION_STATUS.DISCONNECTED');
}).on(SESSION_STATUS.FAILED, function(){
console.log('SESSION_STATUS.FAILED');
});function browser_check(container, callback)
{
callback = typeof callback == 'function' ? callback : function(){};
var is_safari = Browser.isSafariWebRTC();
console.log("is_safari " + is_safari);
if (Flashphoner.getMediaProviders()[0] === "WSPlayer")
{
Flashphoner.playFirstSound();
callback();
}
else if (is_safari || Flashphoner.getMediaProviders()[0] === "MSE")
{
console.log("before playFirstVideo");
Flashphoner.playFirstVideo(container, true, PRELOADER_URL).then(function () {
console.log("playFirstVideo resolved");
callback();
});
}
else
callback();
}
Thank you,