Skip to content

Commit d3359df

Browse files
author
kongdywang
committed
1. update to 12.9.0
2. Fix the issue where the live streaming player does not retain the last frame when playback stops. 3. Enable multi-bitrate by default for the player component. 4. Fix known issue
1 parent 86042c9 commit d3359df

File tree

19 files changed

+60
-94
lines changed

19 files changed

+60
-94
lines changed

Flutter/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#### Version: 12.9.0 2025.11.13
2+
3+
##### Features:
4+
5+
- set Android TXLiteAVSDK to 12.9.0.19467
6+
- set iOS TXLiteAVSDK to 12.9.20063
7+
- Fix the issue where the live streaming player does not retain the last frame when playback stops.
8+
- Enable multi-bitrate by default for the player component.
9+
- Fix known issue
10+
111

212
#### Version: 12.8.1 2025.10.23
313

Flutter/CI/buildVersionOnMac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildLog() {
55
}
66

77
inputVersion=$1
8-
export VERSION_NAME="12.8.1"
8+
export VERSION_NAME="12.9.0"
99
if [ -n "$inputVersion" ]; then
1010
VERSION_NAME=$inputVersion
1111
fi

Flutter/android/config.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rootProject.ext {
44
supportSdkVersion = "26.0.1"
55
minSdkVersion = 19
66
targetSdkVersion = 28
7-
playerVersion = "12.8.1"
7+
playerVersion = "12.9.0"
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.8.0.19279"
17+
liteavSdk="com.tencent.liteav:LiteAVSDK_Player:12.9.0.19467"
1818
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ int stopPlay(boolean isNeedClearLastImg) {
182182
if (mLivePlayer != null) {
183183
mLastPlayEvent = -1;
184184
mIsPaused = false;
185+
mLivePlayer.setProperty(V2TXLiveProperty.kV2ClearLastImage,
186+
isNeedClearLastImg);
185187
result = mLivePlayer.stopPlay();
186188
}
187189
mUIHandler.removeCallbacksAndMessages(null);

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ private boolean eglSetup(Surface surface) {
248248

249249
mEGLContextEncoder = EGL14.eglCreateContext(mEGLDisplay, eglConfigs[0], EGL14.EGL_NO_CONTEXT,
250250
attrib_list, 0);
251-
checkEglError("eglCreateContext");
251+
checkEglError("eglCreateContext", false);
252252
if (mEGLContextEncoder == EGL14.EGL_NO_CONTEXT) {
253253
LiteavLog.e(TAG, "null context2");
254254
return false;
@@ -259,7 +259,7 @@ private boolean eglSetup(Surface surface) {
259259
};
260260
mEGLSurfaceEncoder = EGL14.eglCreateWindowSurface(mEGLDisplay, eglConfigs[0], surface,
261261
surfaceAttribs2, 0); //creates an EGL window surface and returns its handle
262-
checkEglError("eglCreateWindowSurface");
262+
checkEglError("eglCreateWindowSurface", false);
263263

264264
if (mEGLSurfaceEncoder == EGL14.EGL_NO_SURFACE) {
265265
LiteavLog.e(TAG, "surface was null");
@@ -270,11 +270,15 @@ private boolean eglSetup(Surface surface) {
270270
}
271271

272272
private boolean checkEglError(String msg) {
273+
return checkEglError(msg, true);
274+
}
275+
276+
private boolean checkEglError(String msg, boolean needPrintMsg) {
273277
int error = 0;
274278
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
275279
LiteavLog.e(TAG, "checkEglError: " + msg + "error: " + error);
276280
return false;
277-
} else {
281+
} else if (needPrintMsg) {
278282
LiteavLog.e(TAG, msg);
279283
}
280284

@@ -298,7 +302,7 @@ public boolean makeCurrent(int index) {
298302

299303
public boolean swapBuffers() {
300304
boolean result = EGL14.eglSwapBuffers(mEGLDisplay, mEGLSurfaceEncoder);
301-
checkEglError("eglSwapBuffers");
305+
checkEglError("eglSwapBuffers", false);
302306
return result;
303307
}
304308

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

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,21 @@ public class FTXTextureRender {
4444
"}\n";
4545

4646
private static final String VIDEO_FRAGMENT_SHADER =
47-
"#version 300 es\n" +
48-
"#extension GL_OES_EGL_image_external_essl3 : require\n" +
49-
"precision mediump float;\n" +
50-
"uniform samplerExternalOES sTexture;\n" +
51-
"in vec2 vTextureCoord;\n" +
52-
"out vec4 outColor;\n" +
53-
"void main() {\n" +
54-
" outColor = texture(sTexture, vTextureCoord);\n" +
55-
"}";
47+
"#version 300 es\n"
48+
+ "#extension GL_OES_EGL_image_external_essl3 : require\n"
49+
+ "precision mediump float;\n"
50+
+ "uniform samplerExternalOES sTexture;\n"
51+
+ "in vec2 vTextureCoord;\n"
52+
+ "out vec4 outColor;\n"
53+
+ "void main() {\n"
54+
+ " vec2 safeCoord = vTextureCoord;\n"
55+
+ " if (safeCoord.x > 0.99) {\n"
56+
+ " safeCoord.x = 0.99;\n"
57+
+ " }\n"
58+
+ " safeCoord.x = clamp(safeCoord.x, 0.001, 0.999);\n"
59+
+ " safeCoord.y = clamp(safeCoord.y, 0.001, 0.999);\n"
60+
+ " outColor = texture(sTexture, safeCoord);\n"
61+
+ "}\n";
5662

5763
private final float[] projectionMatrix = new float[16];
5864
private final float[] rotationMatrix = new float[16];
@@ -113,9 +119,9 @@ public int initTex() {
113119
GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
114120
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
115121
GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
116-
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
122+
GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
117123
GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
118-
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
124+
GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
119125
GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
120126
return tex[0];
121127
}
@@ -197,7 +203,6 @@ private void mergerMatrix() {
197203
// reset
198204
Matrix.setIdentityM(mResultMatrix, 0);
199205
Matrix.multiplyMM(mResultMatrix, 0, rotationMatrix, 0, projectionMatrix, 0);
200-
System.arraycopy(mResultMatrix, 0, projectionMatrix, 0, 16);
201206
}
202207

203208
public void cleanDrawCache() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
android.useAndroidX=true
22
android.enableJetifier=true
3-
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
3+
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8

Flutter/example/lib/demo_short_video_player.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:flutter/cupertino.dart';
44
import 'package:flutter/material.dart';
55
import 'package:super_player/super_player.dart';
66
import 'package:superplayer_widget/demo_superplayer_lib.dart';
7-
import 'common/demo_config.dart';
87
import 'shortvideo/demo_short_video_lib.dart';
98

109
class DemoShortVideoPlayer extends StatefulWidget {
@@ -28,7 +27,6 @@ class _DemoShortVideoPlayerState extends State<DemoShortVideoPlayer> with Widget
2827
}
2928

3029
void _loadData() async {
31-
// check license
3230
final ShortVideoDataLoader loader = ShortVideoDataLoader();
3331
loader.getPageListDataOneByOneFunction((dataModels) {
3432
setState(() {

Flutter/example/lib/demo_superplayer.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import 'package:superplayer_widget/demo_superplayer_lib.dart';
1010
import 'package:super_player_example/res/app_localizations.dart';
1111
import 'dart:ui';
1212

13-
import 'common/demo_config.dart';
14-
1513
/// flutter superplayer demo
1614
class DemoSuperPlayer extends StatefulWidget {
1715
Map? initParams = {};

Flutter/example/lib/demo_txLiveplayer.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:superplayer_widget/demo_superplayer_lib.dart';
1010
import 'ui/demo_inputdialog.dart';
1111
import 'ui/demo_volume_slider.dart';
1212
import 'ui/demo_video_slider_view.dart';
13-
import 'common/demo_config.dart';
1413

1514
class DemoTXLivePlayer extends StatefulWidget {
1615
@override
@@ -171,7 +170,7 @@ class _DemoTXLivePlayerState extends State<DemoTXLivePlayer> with WidgetsBinding
171170
_isPlaying = false;
172171
_controller.pause();
173172
}),
174-
_createItem(AppLocals.current.playerStopPlay, () {
173+
_createItem(AppLocals.current.playerStopPlay, () async {
175174
_isStop = true;
176175
_controller.stop(isNeedClear: true);
177176
}),

0 commit comments

Comments
 (0)