Broadcast - Android-webrtc-api
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!! :)
I've been reading the code of your example. But I have some questions.
- 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.listenOnwith 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.connectwith the channel name "ch-user-a-broacast"
- UserA (Bc):
But, it doesn't works!!!
I would appreciate any suggestion!! Thanks! :)