From 469a9af166167fd858751d6c3740340d9c70d478 Mon Sep 17 00:00:00 2001 From: li <719947897@ qq.com> Date: Tue, 14 May 2024 10:37:26 +0800 Subject: [PATCH] back --- .../android/app/src/main/AndroidManifest.xml | 1 + .../java/com/zlmediakit/webrtc/PlayerDemoActivity.kt | 8 +++++++- .../zlm/src/main/java/com/zlm/rtc/ZLMRTCPlayer.kt | 4 ++++ .../main/java/com/zlm/rtc/play/ZLMRTCPlayerImpl.kt | 12 +++++++++--- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/webrtc_player/android/app/src/main/AndroidManifest.xml b/webrtc_player/android/app/src/main/AndroidManifest.xml index c45d3017..51814c98 100644 --- a/webrtc_player/android/app/src/main/AndroidManifest.xml +++ b/webrtc_player/android/app/src/main/AndroidManifest.xml @@ -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"> Unit) diff --git a/webrtc_player/android/zlm/src/main/java/com/zlm/rtc/play/ZLMRTCPlayerImpl.kt b/webrtc_player/android/zlm/src/main/java/com/zlm/rtc/play/ZLMRTCPlayerImpl.kt index 72eada85..8351789d 100644 --- a/webrtc_player/android/zlm/src/main/java/com/zlm/rtc/play/ZLMRTCPlayerImpl.kt +++ b/webrtc_player/android/zlm/src/main/java/com/zlm/rtc/play/ZLMRTCPlayerImpl.kt @@ -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() { }