Preventing crash on iOS
On iOS, audio elements must be triggered by a user gesture. We are catching exceptions thrown in order not to crash. In the future, we need to find another way to play sounds.
This commit is contained in:
parent
46cd387853
commit
80a698d891
@ -129,7 +129,11 @@ export class MediaManager {
|
||||
}
|
||||
|
||||
addActiveVideo(user: UserSimplePeerInterface, userName: string = ""){
|
||||
try {
|
||||
this.webrtcInAudio.play();
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
}
|
||||
const userId = ''+user.userId
|
||||
|
||||
userName = userName.toUpperCase();
|
||||
@ -278,7 +282,11 @@ export class MediaManager {
|
||||
}
|
||||
|
||||
playWebrtcOutSound(): void {
|
||||
try {
|
||||
this.webrtcOutAudio.play();
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
isConnecting(userId: string): void {
|
||||
|
Loading…
Reference in New Issue
Block a user