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 = ""){
|
addActiveVideo(user: UserSimplePeerInterface, userName: string = ""){
|
||||||
this.webrtcInAudio.play();
|
try {
|
||||||
|
this.webrtcInAudio.play();
|
||||||
|
} catch(e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
const userId = ''+user.userId
|
const userId = ''+user.userId
|
||||||
|
|
||||||
userName = userName.toUpperCase();
|
userName = userName.toUpperCase();
|
||||||
@ -278,7 +282,11 @@ export class MediaManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
playWebrtcOutSound(): void {
|
playWebrtcOutSound(): void {
|
||||||
this.webrtcOutAudio.play();
|
try {
|
||||||
|
this.webrtcOutAudio.play();
|
||||||
|
} catch(e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isConnecting(userId: string): void {
|
isConnecting(userId: string): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user