android-webrtc-api icon indicating copy to clipboard operation
android-webrtc-api copied to clipboard

Broadcast - Android-webrtc-api

Open edwin-pixel-1 opened this issue 10 years ago • 1 comments

Hi @GleasonK, Currently I'm working on a Broadcasting app. I started from this post, I am using your libraries to do the broadcaster side, but now I'm working in the viewer side, so I would like to know how I should setup the connection to use one-way or how the user would only see and listen the broadcasting without use your own camera and mic.

Thanks!! :)

edwin-pixel-1 avatar Feb 16 '16 22:02 edwin-pixel-1

I've been reading the code of your example. But I have some questions.

  1. The method pnRTCClient.connect("User2_channel"); is needed in both sides of a call(Peer to peer)? What happen if only one side call it?

2.The method pnRTCClient.listenOn("myChannel") , is used to listen calls. Is through this method that the user start to get the remote video and messages?

I've been trying to do the below setup to do video-broadcast:

  • UserA (Broadcaster) and UserB (Viewer)
    • UserA (Bc):
      • Go to Broadcast Activity
      • Create everything needed, like:
        • pnRTCClient, localVideoSource, AudioSource, AudioTrack, localRender, etc
      • Call pnRTCClient.listenOn with a channel called "ch-user-a-broacast"
    • User B (Vw):
      • Go to Broadcast Activity with a reference of broadcast channel name
      • Create:
        • PeepRTCClient
        • mediaStream(empty without localVideoTrack, localAudioTrack)
      • The viewer doesn't call pnRTCClient.listenOn
      • Call pnRTCClient.connect with the channel name "ch-user-a-broacast"

But, it doesn't works!!!

I would appreciate any suggestion!! Thanks! :)

edwin-pixel-1 avatar Feb 24 '16 04:02 edwin-pixel-1