Webrtc-for-Android | Native Webrtc Android app | Security Testing library
kandi X-RAY | Webrtc-for-Android Summary
kandi X-RAY | Webrtc-for-Android Summary
This directory contains an example Android client for
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Adds a frame to the animation queue
- Takes a frame and returns it
- Return a frame to the pool
- Summarize the dimensions of a frame
- Upload a 2D texture
- Upload the images to the plane
- Create a new peer connection
- Get a video capture raster
- Log the message
- Initializes the video streams
- Show the room for getting room URL
- Called when a surface is created
- Adds a shader to the given program
- Renders a frame
- Draws a rectangular rectangle
- Parses an SDP SDP description
- Creates a list of ICE servers from a WebRTCPeerConnection configuration
- Set the size of the view
- Display an uncaught exception
- Creates a float buffer using native byte order
Webrtc-for-Android Key Features
Webrtc-for-Android Examples and Code Snippets
Community Discussions
Trending Discussions on Webrtc-for-Android
QUESTION
I am using this library: https://bintray.com/google/webrtc/google-webrtc
What I want to achieve (at least, at the beginning of my project) is render video locally. I am using this tutorial (which is the only one around the Internet) https://vivekc.xyz/getting-started-with-webrtc-for-android-daab1e268ff4. Unfortunately, the last line of code is not up-to-date anymore. The constructor needs a callback which I have no idea how to implement:
localVideoTrack.addRenderer(new VideoRenderer(i420Frame -> {
// no idea what to put here
}));
My code is exactly the same as in the posted tutorial. This is the very first step to make familiar with WebRTC technology in Android which I cannot figure out. My camera is capturing the video because I can see it in my log:
I/org.webrtc.Logging: CameraStatistics: Camera fps: 28.
The main issue is that I have no idea how to pass it to my SurfaceViewRenderer
through a callback. Did anyone meet that problem? I'll really appreciate any help or suggestions.
Here is the official example app which is the only source but it is done differently than one in the tutorial, it's much more complicated: https://webrtc.googlesource.com/src/+/master/examples/androidapp/src/org/appspot/apprtc
...ANSWER
Answered 2018-May-20 at 15:25You are right, the API no longer matches that in the tutorial, but it's close.
The VideoTrack, has an addRenderer(VideoRenderer renderer)
method, that requires you to create a VideoRenderer, with the SurfaceViewRenderer as parameter. But that is not possible anymore, so instead you should use the addSink(VideoSink sink)
method, of the VideoTrack. The SurfaceViewRenderer object implement the VideoSink onFrame(VideoFrame frame)
method to make this work.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Webrtc-for-Android
You can use Webrtc-for-Android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Webrtc-for-Android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page