提交 d3359dfe authored 作者: kongdywang's avatar kongdywang

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
上级 86042c9a
#### Version: 12.9.0 2025.11.13
##### Features:
- set Android TXLiteAVSDK to 12.9.0.19467
- set iOS TXLiteAVSDK to 12.9.20063
- Fix the issue where the live streaming player does not retain the last frame when playback stops.
- Enable multi-bitrate by default for the player component.
- Fix known issue
#### Version: 12.8.1 2025.10.23
......
......@@ -5,7 +5,7 @@ buildLog() {
}
inputVersion=$1
export VERSION_NAME="12.8.1"
export VERSION_NAME="12.9.0"
if [ -n "$inputVersion" ]; then
VERSION_NAME=$inputVersion
fi
......
......@@ -4,7 +4,7 @@ rootProject.ext {
supportSdkVersion = "26.0.1"
minSdkVersion = 19
targetSdkVersion = 28
playerVersion = "12.8.1"
playerVersion = "12.9.0"
compat = "androidx.appcompat:appcompat:1.6.1"
/**
......@@ -14,5 +14,5 @@ rootProject.ext {
Professional SDK: liteavSdk="com.tencent.liteav:LiteAVSDK_Professional:latest.release"
If you want to specify the SDK version(eg 11.7.0.13946), use: liteavSdk="com.tencent.liteav:LiteAVSDK_Player:11.7.0.13946"
*/
liteavSdk="com.tencent.liteav:LiteAVSDK_Player:12.8.0.19279"
liteavSdk="com.tencent.liteav:LiteAVSDK_Player:12.9.0.19467"
}
\ No newline at end of file
......@@ -182,6 +182,8 @@ public class FTXLivePlayer extends FTXLivePlayerRenderHost implements TXFlutterL
if (mLivePlayer != null) {
mLastPlayEvent = -1;
mIsPaused = false;
mLivePlayer.setProperty(V2TXLiveProperty.kV2ClearLastImage,
isNeedClearLastImg);
result = mLivePlayer.stopPlay();
}
mUIHandler.removeCallbacksAndMessages(null);
......
......@@ -248,7 +248,7 @@ public class FTXEGLRender implements SurfaceTexture.OnFrameAvailableListener {
mEGLContextEncoder = EGL14.eglCreateContext(mEGLDisplay, eglConfigs[0], EGL14.EGL_NO_CONTEXT,
attrib_list, 0);
checkEglError("eglCreateContext");
checkEglError("eglCreateContext", false);
if (mEGLContextEncoder == EGL14.EGL_NO_CONTEXT) {
LiteavLog.e(TAG, "null context2");
return false;
......@@ -259,7 +259,7 @@ public class FTXEGLRender implements SurfaceTexture.OnFrameAvailableListener {
};
mEGLSurfaceEncoder = EGL14.eglCreateWindowSurface(mEGLDisplay, eglConfigs[0], surface,
surfaceAttribs2, 0); //creates an EGL window surface and returns its handle
checkEglError("eglCreateWindowSurface");
checkEglError("eglCreateWindowSurface", false);
if (mEGLSurfaceEncoder == EGL14.EGL_NO_SURFACE) {
LiteavLog.e(TAG, "surface was null");
......@@ -270,11 +270,15 @@ public class FTXEGLRender implements SurfaceTexture.OnFrameAvailableListener {
}
private boolean checkEglError(String msg) {
return checkEglError(msg, true);
}
private boolean checkEglError(String msg, boolean needPrintMsg) {
int error = 0;
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
LiteavLog.e(TAG, "checkEglError: " + msg + "error: " + error);
return false;
} else {
} else if (needPrintMsg) {
LiteavLog.e(TAG, msg);
}
......@@ -298,7 +302,7 @@ public class FTXEGLRender implements SurfaceTexture.OnFrameAvailableListener {
public boolean swapBuffers() {
boolean result = EGL14.eglSwapBuffers(mEGLDisplay, mEGLSurfaceEncoder);
checkEglError("eglSwapBuffers");
checkEglError("eglSwapBuffers", false);
return result;
}
......
......@@ -44,15 +44,21 @@ public class FTXTextureRender {
"}\n";
private static final String VIDEO_FRAGMENT_SHADER =
"#version 300 es\n" +
"#extension GL_OES_EGL_image_external_essl3 : require\n" +
"precision mediump float;\n" +
"uniform samplerExternalOES sTexture;\n" +
"in vec2 vTextureCoord;\n" +
"out vec4 outColor;\n" +
"void main() {\n" +
" outColor = texture(sTexture, vTextureCoord);\n" +
"}";
"#version 300 es\n"
+ "#extension GL_OES_EGL_image_external_essl3 : require\n"
+ "precision mediump float;\n"
+ "uniform samplerExternalOES sTexture;\n"
+ "in vec2 vTextureCoord;\n"
+ "out vec4 outColor;\n"
+ "void main() {\n"
+ " vec2 safeCoord = vTextureCoord;\n"
+ " if (safeCoord.x > 0.99) {\n"
+ " safeCoord.x = 0.99;\n"
+ " }\n"
+ " safeCoord.x = clamp(safeCoord.x, 0.001, 0.999);\n"
+ " safeCoord.y = clamp(safeCoord.y, 0.001, 0.999);\n"
+ " outColor = texture(sTexture, safeCoord);\n"
+ "}\n";
private final float[] projectionMatrix = new float[16];
private final float[] rotationMatrix = new float[16];
......@@ -113,9 +119,9 @@ public class FTXTextureRender {
GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
return tex[0];
}
......@@ -197,7 +203,6 @@ public class FTXTextureRender {
// reset
Matrix.setIdentityM(mResultMatrix, 0);
Matrix.multiplyMM(mResultMatrix, 0, rotationMatrix, 0, projectionMatrix, 0);
System.arraycopy(mResultMatrix, 0, projectionMatrix, 0, 16);
}
public void cleanDrawCache() {
......
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
\ No newline at end of file
......@@ -4,7 +4,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:super_player/super_player.dart';
import 'package:superplayer_widget/demo_superplayer_lib.dart';
import 'common/demo_config.dart';
import 'shortvideo/demo_short_video_lib.dart';
class DemoShortVideoPlayer extends StatefulWidget {
......@@ -28,7 +27,6 @@ class _DemoShortVideoPlayerState extends State<DemoShortVideoPlayer> with Widget
}
void _loadData() async {
// check license
final ShortVideoDataLoader loader = ShortVideoDataLoader();
loader.getPageListDataOneByOneFunction((dataModels) {
setState(() {
......
......@@ -10,8 +10,6 @@ import 'package:superplayer_widget/demo_superplayer_lib.dart';
import 'package:super_player_example/res/app_localizations.dart';
import 'dart:ui';
import 'common/demo_config.dart';
/// flutter superplayer demo
class DemoSuperPlayer extends StatefulWidget {
Map? initParams = {};
......
......@@ -10,7 +10,6 @@ import 'package:superplayer_widget/demo_superplayer_lib.dart';
import 'ui/demo_inputdialog.dart';
import 'ui/demo_volume_slider.dart';
import 'ui/demo_video_slider_view.dart';
import 'common/demo_config.dart';
class DemoTXLivePlayer extends StatefulWidget {
@override
......@@ -171,7 +170,7 @@ class _DemoTXLivePlayerState extends State<DemoTXLivePlayer> with WidgetsBinding
_isPlaying = false;
_controller.pause();
}),
_createItem(AppLocals.current.playerStopPlay, () {
_createItem(AppLocals.current.playerStopPlay, () async {
_isStop = true;
_controller.stop(isNeedClear: true);
}),
......
......@@ -8,7 +8,6 @@ import 'package:super_player/super_player.dart';
import 'package:super_player_example/res/app_localizations.dart';
import 'package:superplayer_widget/demo_superplayer_lib.dart';
import 'common/demo_config.dart';
import 'ui/demo_bitrate_checkbox.dart';
import 'ui/demo_inputdialog.dart';
import 'ui/demo_speed_slider.dart';
......@@ -37,7 +36,7 @@ class _DemoTXVodPlayerState extends State<DemoTXVodPlayer> with WidgetsBindingOb
bool _isPlaying = false;
StreamSubscription? playEventSubscription;
StreamSubscription? playNetEventSubscription;
FTXAndroidRenderViewType _renderType = FTXAndroidRenderViewType.TEXTURE_VIEW;
FTXAndroidRenderViewType _renderType = FTXAndroidRenderViewType.SURFACE_VIEW;
FTXPlayerRenderMode _renderMode = FTXPlayerRenderMode.ADJUST_RESOLUTION;
GlobalKey<VideoSliderViewState> progressSliderKey = GlobalKey();
......
......@@ -33,7 +33,7 @@ class _TXVodPlayerPageState extends State<ShortVideoPageWidget> {
}
_init() async {
_controller.setConfig(FTXVodPlayConfig());
await _controller.setConfig(FTXVodPlayConfig());
LogUtils.i(
TAG, " [init] ${widget.position.toString()} ${this.hashCode.toString()} ${_controller.hashCode.toString()}");
_setPlayerListener();
......
......@@ -29,7 +29,6 @@ static const int uninitialized = -1;
@property (nonatomic, strong) TXVodPlayerFlutterAPI* vodFlutterApi;
@property (nonatomic, strong) FTXRenderViewFactory* renderViewFactory;
@property (nonatomic, strong) FTXRenderView *curRenderView;
@property (nonatomic, strong) UIView *txPipView;
@property (nonatomic, assign) NSUInteger renderMode;
@property (nonatomic, assign) float cacheStartTime;
......@@ -124,7 +123,6 @@ static const int uninitialized = -1;
_txVodPlayer = nil;
}
self.txPipView = nil;
self.curRenderView = nil;
self.cacheStartTime = 0;
......@@ -631,53 +629,12 @@ static const int uninitialized = -1;
if (self.delegate && [self.delegate respondsToSelector:@selector(onPlayerPipRequestStart)]) {
[self.delegate onPlayerPipRequestStart];
}
UIViewController* flutterVC = [self getFlutterViewController];
[flutterVC.view addSubview:self.txPipView];
[_txVodPlayer setupVideoWidget:self.txPipView insertIndex:0];
[_txVodPlayer enterPictureInPicture];
return NO_ERROR;
}
- (UIView *)txPipView {
if (!_txPipView) {
// Set the size to 1 pixel to ensure proper display in PIP.
_txPipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
_txPipView.hidden = YES;
}
return _txPipView;
}
- (UIViewController *)getFlutterViewController {
UIWindow *window = nil;
if (@available(iOS 13.0, *)) {
NSSet<UIScene *> *connectedScenes = [UIApplication sharedApplication].connectedScenes;
for (UIScene *scene in connectedScenes) {
if ([scene isKindOfClass:[UIWindowScene class]]) {
UIWindowScene *windowScene = (UIWindowScene *)scene;
for (UIWindow *w in windowScene.windows) {
if (w.isKeyWindow) {
window = w;
break;
}
}
if (window != nil) {
break;
}
}
}
} else {
for (UIWindow *w in [UIApplication sharedApplication].windows) {
if (w.isKeyWindow) {
window = w;
break;
}
}
}
return window.rootViewController;
}
#pragma mark - PIP delegate
- (void)onPlayer:(TXVodPlayer *)player pictureInPictureStateDidChange:(TX_VOD_PLAYER_PIP_STATE)pipState withParam:(NSDictionary *)param {
if (pipState == TX_VOD_PLAYER_PIP_STATE_DID_START) {
......@@ -695,21 +652,15 @@ static const int uninitialized = -1;
if (pipState == TX_VOD_PLAYER_PIP_STATE_DID_STOP) {
self.hasEnteredPipMode = NO;
if (self.restoreUI) {
self.restoreUI = NO;
} else {
dispatch_async(dispatch_get_main_queue(), ^{
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
[player exitPictureInPicture];
}
[self->_txPipView removeFromSuperview];
self->_txPipView = nil;
dispatch_async(dispatch_get_main_queue(), ^{
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
[player exitPictureInPicture];
}
if (self.delegate && [self.delegate respondsToSelector:@selector(onPlayerPipStateDidStop)]) {
[self.delegate onPlayerPipStateDidStop];
}
});
}
if (self.delegate && [self.delegate respondsToSelector:@selector(onPlayerPipStateDidStop)]) {
[self.delegate onPlayerPipStateDidStop];
}
});
}
if (pipState == TX_VOD_PLAYER_PIP_STATE_RESTORE_UI) {
......
......@@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'super_player'
s.version = '12.8.1'
s.version = '12.9.0'
s.summary = 'The super_player Flutter plugin is one of the sub-product SDKs of the audio/video terminal SDK (Tencent Cloud Video on Demand).'
s.description = <<-DESC
player plugin.
......@@ -26,7 +26,7 @@ player plugin.
# Player_Premium SDK: s.dependency 'TXLiteAVSDK_Player_Premium'
# Professional SDK: s.dependency 'TXLiteAVSDK_Professional'
# If you want to specify the SDK version(eg 11.6.15041), use: s.dependency 'TXLiteAVSDK_Player','11.6.15041'
s.dependency 'TXLiteAVSDK_Player','12.8.19666'
s.dependency 'TXLiteAVSDK_Player','12.9.20063'
# s.dependency 'FTXPiPKit'
s.vendored_frameworks = [
'localdep/FTXPiPKit.xcframework'
......
......@@ -2,5 +2,5 @@
part of SuperPlayer;
abstract class FPlayerPckInfo {
static const String PLAYER_VERSION = "12.8.1";
static const String PLAYER_VERSION = "12.9.0";
}
\ No newline at end of file
name: super_player
description: The super_player Flutter plugin is one of the sub-product SDKs of the audio/video terminal SDK (Tencent Cloud Video on Demand).
version: 12.8.1
version: 12.9.0
homepage: https://github.com/LiteAVSDK/Player_Flutter
environment:
......
......@@ -3,5 +3,5 @@ part of demo_super_player_lib;
class PlayerConstants {
static const PKG_NAME = "superplayer_widget";
static const String PLAYER_WIDGET_VERSION = "12.8.1";
static const String PLAYER_WIDGET_VERSION = "12.9.0";
}
......@@ -48,7 +48,7 @@ class SuperPlayerController {
bool _needToResume = false;
bool _needToPause = false;
bool callResume = false;
bool _isMultiBitrateStream = false; // the flag playing multi-bitrate URLs flag
bool _isMultiBitrateStream = true; // the flag playing multi-bitrate URLs flag
bool _changeHWAcceleration = false; // the flag before receiving the first keyframe after switching to hardware decoding
bool _isOpenHWAcceleration = true;
int _playerUIStatus = SuperPlayerUIStatus.WINDOW_MODE;
......
name: superplayer_widget
description: superplayer,base on vodplayer
version: 12.8.1
version: 12.9.0
environment:
sdk: '>=2.17.0 <4.0.0'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论