Play call sound while connected

How to use the Linfone library to reproduce beeps while there is a connection (as happens when you call on a regular phone). In the core class, there are playLocal methods, ring, and ringback variables, but there is no effect when using them. Maybe someone has solved this problem and can provide an example?

func playRing() {
    guard let ringtonePath = Bundle.main.path(forResource: "longCall_wav", ofType: "wav")
    else {
        NSLog("Ringtone file not found")
        return
    }

    do {
        try mCore.playLocal(audiofile: ringtonePath)
        mCore.rin
    } catch {
        print("call state changed  \(NSLog(error.localizedDescription))")
    }
}

Upvotes: 0

Views: 28

Answers (0)

Related Questions