JsSIP
JsSIP copied to clipboard
Error when getting video track status on Firefox
When I use session.connection.getStats(videoTrack) I am receiving the following error: DOMException: track must be associated with a unique sender or receiver, but is associated with 0 senders and 0 receivers.
This only happens on Firefox, on Edge, Chrome and Electron it works well
Here is how I use the method.
session.connection.ontrack = async function (event) {
session.connection.ontrack = null
const stream = event.streams[0]
const videoTracks = stream.getVideoTracks()
remoteAudio.srcObject = stream
remoteAudio.play()
const stats = await session.connection.getStats(videoTrack)
....
}
Thank you