ethand91 / mediasoup-ios-client

Mediasoup 3 iOS Client
ISC License
131 stars 65 forks source link

When I try to get RTCAudioSource, I got Thread 1: EXC_BAD_ACCESS (code=1, address=0xa61303450) #108

Open motodimago opened 3 years ago

motodimago commented 3 years ago

Hi! Thank you for the great library!

I'm trying to change consumer's volume. So I wrote this code. But I got error Thread 1: EXC_BAD_ACCESS (code=1, address=0xa61303450) to get RTCAudioSource

for consumer in self.consumers.values {
    if consumer.getKind() == "audio" {
        (consumer.getTrack() as! RTCAudioTrack).source <- I got error.
    }
}

Actually, I want to do this

let volume:Double = 5;
for consumer in self.consumers.values {
    if consumer.getKind() == "audio" {
        (consumer.getTrack() as! RTCAudioTrack).source.volume = volume
    }
}

Should I try another way? Thanks!

sjidkov commented 3 years ago

Hello,

Im having the same issue and was wondering if there was any progress on it?

Thanks for the lib btw, great work!!!

Stas

bhchae76 commented 2 years ago

I have the same issue. Can someone help me?