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