mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
back
This commit is contained in:
parent
cc465f03f8
commit
469a9af166
@ -30,6 +30,7 @@
|
||||
android:theme="@style/Theme.AndroidWebRTC"
|
||||
tools:overrideLibrary="com.zlm.rtc"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:name=".App"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
|
@ -17,8 +17,14 @@ class PlayerDemoActivity:AppCompatActivity() {
|
||||
|
||||
|
||||
Handler().postDelayed({
|
||||
ZLMRTCPlayer.shareInstance().play("live","test")
|
||||
ZLMRTCPlayer.shareInstance().play("live","li")
|
||||
},1000)
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
ZLMRTCPlayer.shareInstance().destroy()
|
||||
}
|
||||
}
|
@ -34,6 +34,10 @@ abstract class ZLMRTCPlayer {
|
||||
|
||||
public abstract fun pause()
|
||||
|
||||
|
||||
public abstract fun destroy()
|
||||
|
||||
|
||||
public abstract fun resume()
|
||||
|
||||
public abstract fun capture(listener: (bitmap: Bitmap) -> Unit)
|
||||
|
@ -39,11 +39,11 @@ class ZLMRTCPlayerImpl : ZLMRTCPlayer(), PeerConnectionClient.PeerConnectionEven
|
||||
false,
|
||||
1280,
|
||||
720,
|
||||
15,
|
||||
0,
|
||||
0,
|
||||
"VP8",
|
||||
"H264",
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
0,
|
||||
"OPUS",
|
||||
false,
|
||||
@ -136,6 +136,12 @@ class ZLMRTCPlayerImpl : ZLMRTCPlayer(), PeerConnectionClient.PeerConnectionEven
|
||||
|
||||
}
|
||||
|
||||
override fun destroy() {
|
||||
|
||||
peerConnectionClient?.close()
|
||||
|
||||
}
|
||||
|
||||
override fun resume() {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user