实例介绍
基于WebRtc实现安卓视频一对一聊天的demo,里面包含了用socket简单写的java服务器,里面的地址改成自己电脑的本机ip4地址即可测试。
【实例截图】
【核心代码】
6f4e88fd-3cb8-484d-a3da-3e2c12adf9fa
└── WebrtcDemo
├── app
│ ├── app.iml
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ ├── androidTest
│ │ └── java
│ │ └── com
│ │ └── wangzu
│ │ └── webrtcdemo
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ └── wangzu
│ │ │ └── webrtcdemo
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── drawable
│ │ │ ├── ic_camera.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ └── ic_loundspeaker.xml
│ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── layout
│ │ │ └── activity_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher_round.xml
│ │ │ └── ic_launcher.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── wangzu
│ └── webrtcdemo
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── local.properties
├── settings.gradle
├── webrtc
│ ├── pom.xml
│ ├── src
│ │ └── webrtc
│ │ └── WebrtcServer.java
│ ├── target
│ │ ├── classes
│ │ │ └── webrtc
│ │ │ ├── Device.class
│ │ │ ├── ServerSocketIOForAndroid$1.class
│ │ │ ├── ServerSocketIOForAndroid$2.class
│ │ │ ├── ServerSocketIOForAndroid$3.class
│ │ │ ├── ServerSocketIOForAndroid$4.class
│ │ │ ├── ServerSocketIOForAndroid$5.class
│ │ │ ├── ServerSocketIOForAndroid$6.class
│ │ │ ├── ServerSocketIOForAndroid$7.class
│ │ │ ├── ServerSocketIOForAndroid$8.class
│ │ │ ├── ServerSocketIOForAndroid$9.class
│ │ │ ├── ServerSocketIOForAndroid.class
│ │ │ ├── Test.class
│ │ │ ├── WebrtcServer$1.class
│ │ │ ├── WebrtcServer$2.class
│ │ │ ├── WebrtcServer$3.class
│ │ │ ├── WebrtcServer$4.class
│ │ │ └── WebrtcServer.class
│ │ └── m2e-jee
│ │ └── web-resources
│ │ └── META-INF
│ │ ├── MANIFEST.MF
│ │ └── maven
│ │ └── webrtc
│ │ └── webrtc
│ │ ├── pom.properties
│ │ └── pom.xml
│ └── WebRoot
│ ├── index.jsp
│ └── META-INF
│ └── MANIFEST.MF
├── WebrtcDemo
│ ├── app
│ │ ├── app.iml
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ ├── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── wangzu
│ │ │ └── webrtcdemo
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ └── wangzu
│ │ │ │ └── webrtcdemo
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── StatusBarUtils.java
│ │ │ └── res
│ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher_round.xml
│ │ │ │ └── ic_launcher.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── wangzu
│ │ └── webrtcdemo
│ │ └── ExampleUnitTest.java
│ ├── build
│ │ ├── android-profile
│ │ │ ├── profile-2017-11-17-10-02-06-095.json
│ │ │ ├── profile-2017-11-17-10-02-06-095.rawproto
│ │ │ ├── profile-2017-11-17-10-02-48-148.json
│ │ │ ├── profile-2017-11-17-10-02-48-148.rawproto
│ │ │ ├── profile-2017-11-17-10-06-58-004.json
│ │ │ ├── profile-2017-11-17-10-06-58-004.rawproto
│ │ │ ├── profile-2017-11-17-10-07-04-406.json
│ │ │ ├── profile-2017-11-17-10-07-04-406.rawproto
│ │ │ ├── profile-2017-11-17-10-20-53-468.json
│ │ │ ├── profile-2017-11-17-10-20-53-468.rawproto
│ │ │ ├── profile-2017-11-17-10-20-59-204.json
│ │ │ ├── profile-2017-11-17-10-20-59-204.rawproto
│ │ │ ├── profile-2017-11-17-10-55-37-967.json
│ │ │ ├── profile-2017-11-17-10-55-37-967.rawproto
│ │ │ ├── profile-2017-11-17-10-55-53-038.json
│ │ │ ├── profile-2017-11-17-10-55-53-038.rawproto
│ │ │ ├── profile-2017-11-17-10-59-49-692.json
│ │ │ ├── profile-2017-11-17-10-59-49-692.rawproto
│ │ │ ├── profile-2017-11-17-11-06-35-293.json
│ │ │ ├── profile-2017-11-17-11-06-35-293.rawproto
│ │ │ ├── profile-2017-11-17-11-06-59-040.json
│ │ │ ├── profile-2017-11-17-11-06-59-040.rawproto
│ │ │ ├── profile-2017-11-17-11-09-56-129.json
│ │ │ ├── profile-2017-11-17-11-09-56-129.rawproto
│ │ │ ├── profile-2017-11-17-11-11-15-724.json
│ │ │ ├── profile-2017-11-17-11-11-15-724.rawproto
│ │ │ ├── profile-2017-11-17-11-14-17-293.json
│ │ │ ├── profile-2017-11-17-11-14-17-293.rawproto
│ │ │ ├── profile-2017-11-17-11-14-26-934.json
│ │ │ ├── profile-2017-11-17-11-14-26-934.rawproto
│ │ │ ├── profile-2017-11-17-11-21-34-576.json
│ │ │ ├── profile-2017-11-17-11-21-34-576.rawproto
│ │ │ ├── profile-2017-11-17-11-22-42-923.json
│ │ │ ├── profile-2017-11-17-11-22-42-923.rawproto
│ │ │ ├── profile-2017-11-17-11-29-41-855.json
│ │ │ ├── profile-2017-11-17-11-29-41-855.rawproto
│ │ │ ├── profile-2017-11-17-11-40-08-299.json
│ │ │ ├── profile-2017-11-17-11-40-08-299.rawproto
│ │ │ ├── profile-2017-11-17-11-41-18-636.json
│ │ │ ├── profile-2017-11-17-11-41-18-636.rawproto
│ │ │ ├── profile-2017-11-17-11-46-55-053.json
│ │ │ ├── profile-2017-11-17-11-46-55-053.rawproto
│ │ │ ├── profile-2017-11-17-11-47-01-526.json
│ │ │ ├── profile-2017-11-17-11-47-01-526.rawproto
│ │ │ ├── profile-2017-11-17-11-47-18-830.json
│ │ │ ├── profile-2017-11-17-11-47-18-830.rawproto
│ │ │ ├── profile-2017-11-17-11-47-27-401.json
│ │ │ ├── profile-2017-11-17-11-47-27-401.rawproto
│ │ │ ├── profile-2017-11-17-11-47-48-625.json
│ │ │ ├── profile-2017-11-17-11-47-48-625.rawproto
│ │ │ ├── profile-2017-11-17-11-51-16-156.json
│ │ │ ├── profile-2017-11-17-11-51-16-156.rawproto
│ │ │ ├── profile-2017-11-17-11-52-35-504.json
│ │ │ ├── profile-2017-11-17-11-52-35-504.rawproto
│ │ │ ├── profile-2017-11-17-11-52-49-374.json
│ │ │ ├── profile-2017-11-17-11-52-49-374.rawproto
│ │ │ ├── profile-2017-11-17-11-53-48-776.json
│ │ │ ├── profile-2017-11-17-11-53-48-776.rawproto
│ │ │ ├── profile-2017-11-17-11-54-11-776.json
│ │ │ ├── profile-2017-11-17-11-54-11-776.rawproto
│ │ │ ├── profile-2017-11-17-11-54-40-033.json
│ │ │ ├── profile-2017-11-17-11-54-40-033.rawproto
│ │ │ ├── profile-2017-11-17-11-56-59-864.json
│ │ │ ├── profile-2017-11-17-11-56-59-864.rawproto
│ │ │ ├── profile-2017-11-17-11-59-37-619.json
│ │ │ ├── profile-2017-11-17-11-59-37-619.rawproto
│ │ │ ├── profile-2017-11-17-12-00-47-163.json
│ │ │ ├── profile-2017-11-17-12-00-47-163.rawproto
│ │ │ ├── profile-2017-11-17-12-01-21-316.json
│ │ │ ├── profile-2017-11-17-12-01-21-316.rawproto
│ │ │ ├── profile-2017-11-17-12-01-42-076.json
│ │ │ ├── profile-2017-11-17-12-01-42-076.rawproto
│ │ │ ├── profile-2017-11-17-12-11-42-426.json
│ │ │ ├── profile-2017-11-17-12-11-42-426.rawproto
│ │ │ ├── profile-2017-11-17-12-11-59-916.json
│ │ │ ├── profile-2017-11-17-12-11-59-916.rawproto
│ │ │ ├── profile-2017-11-17-12-19-39-414.json
│ │ │ ├── profile-2017-11-17-12-19-39-414.rawproto
│ │ │ ├── profile-2017-11-17-12-30-48-461.json
│ │ │ ├── profile-2017-11-17-12-30-48-461.rawproto
│ │ │ ├── profile-2017-11-17-13-35-15-123.json
│ │ │ ├── profile-2017-11-17-13-35-15-123.rawproto
│ │ │ ├── profile-2017-11-17-13-45-23-564.json
│ │ │ ├── profile-2017-11-17-13-45-23-564.rawproto
│ │ │ ├── profile-2017-11-17-13-46-27-570.json
│ │ │ ├── profile-2017-11-17-13-46-27-570.rawproto
│ │ │ ├── profile-2017-11-17-13-47-34-053.json
│ │ │ ├── profile-2017-11-17-13-47-34-053.rawproto
│ │ │ ├── profile-2017-11-17-13-56-30-236.json
│ │ │ ├── profile-2017-11-17-13-56-30-236.rawproto
│ │ │ ├── profile-2017-11-17-13-58-50-666.json
│ │ │ ├── profile-2017-11-17-13-58-50-666.rawproto
│ │ │ ├── profile-2017-11-17-14-04-31-858.json
│ │ │ ├── profile-2017-11-17-14-04-31-858.rawproto
│ │ │ ├── profile-2017-11-17-14-05-33-540.json
│ │ │ ├── profile-2017-11-17-14-05-33-540.rawproto
│ │ │ ├── profile-2017-11-17-14-08-50-062.json
│ │ │ ├── profile-2017-11-17-14-08-50-062.rawproto
│ │ │ ├── profile-2017-11-17-14-09-35-535.json
│ │ │ ├── profile-2017-11-17-14-09-35-535.rawproto
│ │ │ ├── profile-2017-11-17-14-24-26-316.json
│ │ │ ├── profile-2017-11-17-14-24-26-316.rawproto
│ │ │ ├── profile-2017-11-17-14-26-00-454.json
│ │ │ ├── profile-2017-11-17-14-26-00-454.rawproto
│ │ │ ├── profile-2017-11-17-14-27-13-123.json
│ │ │ ├── profile-2017-11-17-14-27-13-123.rawproto
│ │ │ ├── profile-2017-11-17-14-58-20-619.json
│ │ │ ├── profile-2017-11-17-14-58-20-619.rawproto
│ │ │ ├── profile-2017-11-17-14-58-26-854.json
│ │ │ ├── profile-2017-11-17-14-58-26-854.rawproto
│ │ │ ├── profile-2017-11-17-16-23-00-107.json
│ │ │ ├── profile-2017-11-17-16-23-00-107.rawproto
│ │ │ ├── profile-2017-11-17-16-24-38-400.json
│ │ │ ├── profile-2017-11-17-16-24-38-400.rawproto
│ │ │ ├── profile-2017-11-17-16-27-24-864.json
│ │ │ ├── profile-2017-11-17-16-27-24-864.rawproto
│ │ │ ├── profile-2017-11-17-17-26-05-124.json
│ │ │ ├── profile-2017-11-17-17-26-05-124.rawproto
│ │ │ ├── profile-2017-11-17-17-29-14-723.json
│ │ │ ├── profile-2017-11-17-17-29-14-723.rawproto
│ │ │ ├── profile-2017-11-17-17-55-24-046.json
│ │ │ ├── profile-2017-11-17-17-55-24-046.rawproto
│ │ │ ├── profile-2017-11-17-18-03-15-211.json
│ │ │ ├── profile-2017-11-17-18-03-15-211.rawproto
│ │ │ ├── profile-2017-11-20-09-31-10-052.json
│ │ │ ├── profile-2017-11-20-09-31-10-052.rawproto
│ │ │ ├── profile-2017-11-20-09-41-32-851.json
│ │ │ ├── profile-2017-11-20-09-41-32-851.rawproto
│ │ │ ├── profile-2017-11-20-09-50-16-304.json
│ │ │ ├── profile-2017-11-20-09-50-16-304.rawproto
│ │ │ ├── profile-2017-11-20-09-52-17-243.json
│ │ │ └── profile-2017-11-20-09-52-17-243.rawproto
│ │ └── intermediates
│ │ ├── dex-cache
│ │ │ └── cache.xml
│ │ └── lint-cache
│ │ └── maven.google
│ │ ├── com
│ │ │ └── android
│ │ │ └── support
│ │ │ ├── constraint
│ │ │ │ └── group-index.xml
│ │ │ ├── group-index.xml
│ │ │ └── test
│ │ │ ├── espresso
│ │ │ │ └── group-index.xml
│ │ │ └── group-index.xml
│ │ └── master-index.xml
│ ├── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── local.properties
│ ├── settings.gradle
│ └── WebrtcDemo.iml
└── WebrtcDemo.iml
88 directories, 233 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论