transmit audio file to the other end.

26 views
Skip to first unread message

nicolas cardone

unread,
Jan 18, 2023, 9:13:50 AM1/18/23
to JsSIP
hello everyone.
I want to send an audio file to the other end of the call this is what i try,
      const audio = new Audio(audioFile)
      const audioContext = new window.AudioContext()
      const mediaStreamDestination = audioContext.createMediaStreamDestination();
      const source = audioContext.createMediaElementSource(audio);
      source.connect(mediaStreamDestination);
      options.mediaStream = mediaStreamDestination.stream

following the documentation of the call, adding the mediaStream to the options, but the audio never plays on the call

thanks in advance.
Reply all
Reply to author
Forward
0 new messages