WebRTC-Java-Mobile
WebRTC-Java-Mobile copied to clipboard
A Java/Kotlin WebRTC implementation for all mobile/desktop/web platforms.
= Codename One WebRTC Library
A Java/Kotlin https://webrtc.github.io/[WebRTC] implementation for cross-platform mobile/desktop/web development with https://www.codenameone.com[Codename One]. This project aims to provide Codename One (Java/Kotlin) implementations for all APIs.
== Project Status
Under development. See https://github.com/codenameone/CodenameOne/issues/3226[this issue] to follow the progress.
The WebRTC API includes nearly 100 classes. This project aims to provide Codename One (Java/Kotlin) implementations for all APIs. The general process that we are that we are taking is as follows:
- Create Java interfaces for all WebRTC interfaces. Complete
- Port https://webrtc.github.io/samples/[WebRTC samples] one by one, implementing functionalities required for the samples to work, and fixing bugs as they appear. In progress
So far we have ported the following samples:
. https://webrtc.github.io/samples/src/content/getusermedia/gum/[Basic getUserMedia demo]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/BasicDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/getusermedia/resolution/[Choose camera resolution]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/ConstraintsDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/peerconnection/pc1/[Basic PeerConnection Demo]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/PeerConnectionDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/devices/input-output/[Select Devices Demo]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/InputOutputDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/peerconnection/pc1/[Change Codecs Demo]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/ChangeCodecsDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/peerconnection/munge-sdp/[Munge SDP Demo]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/MungeSdpDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/[Trickle-Ice Demo]. https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/TrickleIceDemo.java[View Ported Source] . https://webrtc.github.io/samples/src/content/peerconnection/states/[Peer Connection States Demo] . https://github.com/shannah/CN1WebRTC/blob/master/src/com/codename1/webrtc/demos/PeerConnectionStatesDemo.java[View Ported Source]
== Platform Support
Eventually we will support iOS, Android, Javascript, Mac Desktop, Windows Desktop, and Simulator.
Currently (September 27, 2020) it works on:
. Android . Simulator (https://www.codenameone.com/blog/big-changes-jcef.html[requires CEF to be installed]) . Javascript (Desktop and Android Chrome) . iOS
== Dependencies
. CN1JSON.cn1lib
== Installation
. Copy https://github.com/shannah/CN1WebRTC/blob/master/bin/webrtc.cn1lib[webrtc.cn1lib] into your project's "lib" directory. . Copy https://github.com/shannah/CN1WebRTC/blob/master/lib/CN1JSON.cn1lib[CN1JSON.cn1lib] into your project's "lib" directory. . Refresh Cn1libs
== Demo
. https://shannah.github.com/CN1WebRTC/demo[Javascript Build] - Works in modern desktop browsers and also on Android Chrome . https://github.com/shannah/CN1WebRTC/blob/master/bin/WebRTCDemo-release.apk[Android APK]
== Documentation
. https://shannah.github.com/CN1WebRTC/javadoc/[JavaDocs]
== Building From Source
[source,bash]
git clone https://github.com/shannah/CN1WebRTC cd CN1WebRTC sh setup.sh
Open project in NetBeans
== References
. https://www.codenameone.com/[Codename One Web Site] . https://webrtc.org/[WebRTC WebSite]