haiyangwu / mediasoup-demo-android

mediasoup android demo https://demo.mediasoup.org
96 stars 65 forks source link

audio stream #26

Closed ChinaLiuKang closed 3 years ago

ChinaLiuKang commented 3 years ago

Hello, I have carried out secondary development of the project and changed the way of video streaming to get from the recording screen, but how do I input the audio stream into the mediasoup Android client? Currently I can get the byte data of the audio stream

ChinaLiuKang commented 3 years ago

Baby blogger where have you been !!!!

haiyangwu commented 3 years ago

Try to impl your AudioSource, and use this fucntion in org.webrtc.PeerConnectionFactory

  public AudioTrack createAudioTrack(String id, AudioSource source) {
    checkPeerConnectionFactoryExists();
    return new AudioTrack(nativeCreateAudioTrack(nativeFactory, id, source.getNativeAudioSource()));
  }