ZLMediaKit/webrtc_player/android
2024-06-05 14:19:33 +08:00
..
.idea update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
app update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
doc add android doc 2024-06-05 14:19:33 +08:00
gradle/wrapper update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
.gitignore update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
build.gradle.kts update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
gradle.properties update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
gradlew android webrtc player 2022-09-25 10:51:43 +08:00
gradlew.bat android webrtc player 2022-09-25 10:51:43 +08:00
README.md update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00
settings.gradle.kts update Android RTC Player and Push Funtion 2024-06-05 14:19:07 +08:00

RTCPlayer 播放器

一个基于Android客户端的的RTC播放器

项目特点

如果您需要支持SRS或者Janus请寻找下方联系我

       

延迟情况

  • 网页端推流Android端播放

       

三次延迟分别为490ms、526ms、560ms

  • Android端推屏幕流网页端播放

       

三次延迟分别为440ms、430ms、387ms

接口说明

Player

  • bind(surface: RTCSurfaceView)

    绑定视图

  • play(app: String, streamId: String)

    播放

  • setVolume(volume:Float)

    设置音量,范围: 0.0~1.0f

  • stop()

    停止播放

  • pause()

    暂停播放

  • resume()

    恢复播放

  • capture(listener: (bitmap: Bitmap) -> Unit)

    截图

  • record(duration: Long, result: (path: String) -> Unit)

    录制

  • setOnErrorListener(listener: (code: Int, msg: String) -> Unit)

    设置播放器错误监听回调

  • setOnStatusListener(listener: (status: Status) -> Unit)

    设置播放器状态回调

Pusher

  • bind(surface: RTCSurfaceView, localPreview: Boolean)

    绑定视图

  • push(app: String, streamId: String, mode: PushMode = PushMode.CAMERA, inputFile: String = "")

    推流支持Camera、Screen、File

  • stop()

    停止推流

  • setOnErrorListener(listener: (code: Int, msg: String) -> Unit)

    设置播放器错误监听回调

联系作者

如果您需要深度二次开发,深度优化延迟,并支持其他流媒体服务,可以找我哦! 李之阳

特别感谢

感谢ZLMediakit开源项目

同时感谢JetBrains对开源项目的支持本项目使用Android Studio开发与调试

Android Studio