Skip to content

Commit 6619ac8

Browse files
author
kongdywang
committed
1. TXPlayerVideo has added a new onRenderViewCreatedListener callback. After obtaining the viewId of TXPlayerVideo, you can set the viewId to the player when needed.
2. Fix an issue that the picture-in-picture on iOS does not display correctly in the window in some cases. 3. Fix an issue that the aspect ratio of the picture-in-picture window is incorrect on Android. 4. Fix an issue that there is no picture after the player component returns from full screen. 5. Fix an issue that long-term video playback causes memory overflow on iOS. 6. Fix an issue that high-security-level DRM videos cannot be played on iOS. 7. update to 12.3.1
1 parent 485e1cd commit 6619ac8

File tree

80 files changed

+1074
-1390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1074
-1390
lines changed

Flutter/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11

2+
#### Version: 12.3.1 2025.03.18
3+
4+
##### Features:
5+
6+
- set Android TXLiteAVSDK_Player to 12.3.0.17122,tag:release_player_v12.3.1
7+
- TXPlayerVideo has added a new onRenderViewCreatedListener callback. After obtaining the viewId of TXPlayerVideo, you can set the viewId to the player when needed.
8+
- Fix an issue that the picture-in-picture on iOS does not display correctly in the window in some cases.
9+
- Fix an issue that the aspect ratio of the picture-in-picture window is incorrect on Android.
10+
- Fix an issue that there is no picture after the player component returns from full screen.
11+
- Fix an issue that long-term video playback causes memory overflow on iOS.
12+
- Fix an issue that high-security-level DRM videos cannot be played on iOS.
13+
14+
215
#### Version: 12.3.0 2025.01.21
316

417
##### Features:

Flutter/android/build.gradle

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
plugins {
2-
id "com.android.library" // ✅ 声明式插件语法
2+
id "com.android.library"
33
}
44
apply from:'config.gradle'
55
group 'com.tencent.vod.flutter'
66
version rootProject.ext.playerVersion
7-
//
8-
//buildscript {
9-
// repositories {
10-
// google()
11-
// mavenCentral()
12-
// }
13-
//
14-
// dependencies {
15-
// classpath 'com.android.tools.build:gradle:4.1.0'
16-
// }
17-
//}
187

198
rootProject.allprojects {
209
repositories {

Flutter/android/config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
rootProject.ext {
2-
compileSdkVersion = 31
2+
compileSdkVersion = 34
33
buildToolsVersion = "28.0.3"
44
supportSdkVersion = "26.0.1"
55
minSdkVersion = 19
66
targetSdkVersion = 28
7-
playerVersion = '12.3.0'
7+
playerVersion = '12.3.1'
88
compat = "androidx.appcompat:appcompat:1.6.1"
99

1010
/**
@@ -14,5 +14,5 @@ rootProject.ext {
1414
Professional SDK: liteavSdk="com.tencent.liteav:LiteAVSDK_Professional:latest.release"
1515
If you want to specify the SDK version(eg 11.7.0.13946), use: liteavSdk="com.tencent.liteav:LiteAVSDK_Player:11.7.0.13946"
1616
*/
17-
liteavSdk="com.tencent.liteav:LiteAVSDK_Player:12.3.0.17115"
17+
liteavSdk="com.tencent.liteav:LiteAVSDK_Player:12.3.0.17122"
1818
}

Flutter/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip

Flutter/android/src/main/java/com/tencent/vod/flutter/FTXEvent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class FTXEvent {
1212
public interface ViewType {
1313
int TEXTURE_TYPE = 0;
1414
int SURFACE_TYPE = 1;
15+
int DRM_SURFACE_TYPE = 2;
1516
}
1617

1718
public static final String FTX_RENDER_VIEW = "FTXRenderViewType";

Flutter/android/src/main/java/com/tencent/vod/flutter/FTXPIPManager.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@ protected PipParams(Parcel in) {
354354
mIsNeedPlayControl = in.readByte() != 0;
355355
mIsPlaying = in.readByte() != 0;
356356
mCurrentPlayTime = in.readFloat();
357+
mViewWith = in.readInt();
358+
mViewHeight = in.readInt();
357359
}
358360

359361
public static final Creator<PipParams> CREATOR = new Creator<PipParams>() {
@@ -504,7 +506,7 @@ public int describeContents() {
504506
}
505507

506508
@Override
507-
public void writeToParcel(Parcel dest, int flags) {
509+
public void writeToParcel(@NonNull Parcel dest, int flags) {
508510
dest.writeString(mPlayBackAssetPath);
509511
dest.writeString(mPlayResumeAssetPath);
510512
dest.writeString(mPlayPauseAssetPath);
@@ -515,7 +517,10 @@ public void writeToParcel(Parcel dest, int flags) {
515517
dest.writeByte((byte) (mIsNeedPlayControl ? 1 : 0));
516518
dest.writeByte((byte) (mIsPlaying ? 1 : 0));
517519
dest.writeFloat(mCurrentPlayTime);
520+
dest.writeInt(mViewWith);
521+
dest.writeInt(mViewHeight);
518522
}
523+
519524
}
520525

521526
/**

Flutter/android/src/main/java/com/tencent/vod/flutter/player/FTXLivePlayer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import com.tencent.live2.impl.V2TXLiveProperty;
1818
import com.tencent.rtmp.TXLiveBase;
1919
import com.tencent.rtmp.TXLiveConstants;
20-
import com.tencent.rtmp.TXLivePlayConfig;
2120
import com.tencent.vod.flutter.FTXEvent;
2221
import com.tencent.vod.flutter.FTXPIPManager;
2322
import com.tencent.vod.flutter.messages.FtxMessages;
@@ -181,7 +180,7 @@ int stopPlay(boolean isNeedClearLastImg) {
181180
mUIHandler.removeCallbacksAndMessages(null);
182181
if (isNeedClearLastImg && null != mCurRenderView) {
183182
LiteavLog.i(TAG, "stopPlay target clear last img, player:" + hashCode());
184-
mCurRenderView.getRenderView().clearLastImg();
183+
mCurRenderView.clearTexture();
185184
}
186185
return result;
187186
}
@@ -236,7 +235,6 @@ void setPlayerVolume(int volume) {
236235

237236
void setPlayerLiveMode(int type) {
238237
if (mLivePlayer != null) {
239-
TXLivePlayConfig config = new TXLivePlayConfig();
240238
if (type == 0) {
241239
// Auto mode
242240
mLivePlayer.setCacheParams(1.0f, 5.0f);

Flutter/android/src/main/java/com/tencent/vod/flutter/player/FTXVodPlayer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import android.os.Handler;
88
import android.os.Looper;
99
import android.text.TextUtils;
10-
import android.view.View;
1110

1211
import androidx.annotation.NonNull;
1312

@@ -303,7 +302,7 @@ int stopPlay(boolean isNeedClearLastImg) {
303302
mHardwareDecodeFail = false;
304303
if (isNeedClearLastImg && null != mCurRenderView) {
305304
LiteavLog.i(TAG, "stopPlay target clear last img, player:" + hashCode());
306-
mCurRenderView.getRenderView().clearLastImg();
305+
mCurRenderView.clearTexture();
307306
}
308307
return result;
309308
}

Flutter/android/src/main/java/com/tencent/vod/flutter/player/render/FTXLivePlayerRenderHost.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ public abstract class FTXLivePlayerRenderHost extends FTXBasePlayer implements F
1919
@Override
2020
public void setUpPlayerView(FTXRenderView renderView) {
2121
if (null != renderView) {
22+
LiteavLog.i(TAG, "start setUpPlayerView:" + renderView.getViewId() + ", player:" + hashCode());
2223
mCurRenderView = renderView;
2324
renderView.setPlayer(this);
2425
} else {
26+
LiteavLog.w(TAG, "start setUpPlayerView met null view, reset player, player:" + hashCode());
2527
mCurRenderView = null;
2628
setRenderView(null);
2729
}
@@ -31,6 +33,7 @@ public void setUpPlayerView(FTXRenderView renderView) {
3133
public void setRenderView(FTXRenderCarrier textureView) {
3234
final V2TXLivePlayer livePlayer = getLivePlayer();
3335
if (null != textureView) {
36+
LiteavLog.i(TAG, "start bind Player:" + textureView + ", player:" + hashCode());
3437
if (textureView instanceof TextureView) {
3538
livePlayer.setRenderView((TextureView) textureView);
3639
} else if (textureView instanceof SurfaceView) {
@@ -39,6 +42,7 @@ public void setRenderView(FTXRenderCarrier textureView) {
3942
LiteavLog.e(TAG, "setRenderView met a unImpl renderView, view obj:" + textureView);
4043
}
4144
} else {
45+
LiteavLog.i(TAG, "setRenderView met a null textureView, player:" + hashCode());
4246
livePlayer.setRenderView((TextureView) null);
4347
}
4448
}

Flutter/android/src/main/java/com/tencent/vod/flutter/player/render/FTXPlayerRenderSurfaceHost.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
import android.view.Surface;
66

7+
import com.tencent.vod.flutter.ui.render.FTXRenderCarrier;
8+
79
public interface FTXPlayerRenderSurfaceHost {
810

911
void setSurface(Surface surface);
1012

13+
FTXRenderCarrier getCurCarrier();
14+
1115
}

0 commit comments

Comments
 (0)