Android native client support

@haiyangwu
Thanks for the fast implement! :grinning:

Awesome :slight_smile:

Awesome!

Thanks for provide Gradle coordinates & Last release time

Hi @haiyangwu, I’ve added the project here:

:smirk:, Long time no update. Here is the brief.

Android Demo complete ~80%. I’ve already tried my best effort to keep the UI and design patten closed to mediasoup-demo.

BTW, offer a POC version to try https://fir.im/u6vj and I’ll continue to update the new version into this website. Any suggestions appreciated.

1 Like

Screen captured from my phone. Any crash just restart :crazy_face:, Click right top setting button to config roomId, peerId etc.

1 Like

Brilliant! Works on my Nexus 6P running Android 8.1 :slight_smile:

Wow, amazing!

Amazing! looking forward testing it!

So nice :wink:

I had a crash checking the settings while in a room

Still woking on the missing feature and this crash is a known issue. :rofl:

Another issues I’ve seen:

  1. I opened the top settings button to set “roomId”. After that no audio/video in/out because, somehow, “produce” and “consume” checkboxes became off.
  2. Remote video (when shown) is displayed on top of local video.
  3. Buttons to enable/disable mic/webcam in local video do not seem to work (or may be it’s because bullet 2).
  4. It would be nice that the webcam switch button works (instead of having to go to settings to select front or rear cam).

Anyway, amazing work :slight_smile:

Update: A new version updated, still in this link, https://fir.im/u6vj . All issues @ibc mentioned was fixed. This should be a more stable version.

Plans for the next step:

  • sync new version of libmediasoupclient
  • publish libmediasoup-android-client to maven or jcenter
  • Complete the TODO in mediasoup-demo-android
2 Likes

Great! BTW please wait a bit until we announce a new version of libmediasoupclient. We are making lot of improvements into it and also adding DataChannel support.

Hi @haiyangwu,

There’s a branch using libwebrtc m79 branch here

Would you mind checking it against mediasoup-client-android?

WOW great, I’ll follow the update and apply to android client.

Hi @haiyangwu,

Not sure if this is the right place for mediasoup-client-android questions. Sorry if it isn’t.

I’ve been trying to adapt your demo to a test project that I am doing. The setup is the following:

1 ffmpeg video producer
1 mediasoup server
1 mediasoup-client consumer (web)
1 mediasoup-client-android based app following the demo that you’ve provided here

The first three elements seem to work together. I can see the video in the browser. Unfortunately I cannot get the mediasoup-client-android to work with this setup.

The connection seems to be established correctly between the mediasoup server and the mediasoup-client-android, but then I receive a lot of messages like this and I don’t see any video:

[…]
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +50ms
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +50ms
mediasoup:worker[pid:19367] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:55059, seq:18436] +29ms
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +20ms
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +50ms
[…]

One thing that is different in my app is that I didn’t use the @BindingAdapter(“edias_render”) for the method

public static void render(SurfaceViewRenderer renderer, VideoTrack track) {
    Log.d(TAG, "edias_render: " + (track != null));
    if (track != null) {
        track.addSink(renderer);
        renderer.setVisibility(View.VISIBLE);
    } else {
        renderer.setVisibility(View.GONE);
    }
}

Please let me know if you have any ideas how I could debug this.

@realslimshady, please open a new topic with your question here