Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tx_player_fork
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蒋俊
tx_player_fork
Commits
92d0fdf2
提交
92d0fdf2
authored
4月 02, 2025
作者:
kongdywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. update to 12.4.1
2. Remove the method of binding textures via the TXPlayerVideo's controller and add relevant explanatory comments
上级
c329dd6f
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
67 行增加
和
45 行删除
+67
-45
CHANGELOG.md
Flutter/CHANGELOG.md
+7
-0
buildVersionOnMac.sh
Flutter/CI/buildVersionOnMac.sh
+1
-1
config.gradle
Flutter/android/config.gradle
+1
-1
demo_txLiveplayer.dart
Flutter/example/lib/demo_txLiveplayer.dart
+8
-0
demo_txvodplayer.dart
Flutter/example/lib/demo_txvodplayer.dart
+8
-0
short_video_page_widget.dart
Flutter/example/lib/shortvideo/short_video_page_widget.dart
+11
-1
super_player.podspec
Flutter/ios/super_player.podspec
+1
-1
common_config.dart
Flutter/lib/Core/common/common_config.dart
+2
-1
txplayer_widget.dart
Flutter/lib/Core/txplayer_widget.dart
+25
-36
pubspec.yaml
Flutter/pubspec.yaml
+1
-1
player_constants.dart
...idget/superplayer_widget/lib/common/player_constants.dart
+1
-1
superplayer_widget.dart
...rWidget/superplayer_widget/lib/ui/superplayer_widget.dart
+0
-1
pubspec.yaml
FlutterWidget/superplayer_widget/pubspec.yaml
+1
-1
没有找到文件。
Flutter/CHANGELOG.md
浏览文件 @
92d0fdf2
#### Version: 12.4.1 2025.04.02
##### Features:
-
Remove the method of binding texture via the controller of TXPlayerVideo
#### Version: 12.4.0 2025.03.31
##### Features:
...
...
Flutter/CI/buildVersionOnMac.sh
浏览文件 @
92d0fdf2
...
...
@@ -5,7 +5,7 @@ buildLog() {
}
inputVersion
=
$1
export
VERSION_NAME
=
"12.4.
0
"
export
VERSION_NAME
=
"12.4.
1
"
if
[
-n
"
$inputVersion
"
]
;
then
VERSION_NAME
=
$inputVersion
fi
...
...
Flutter/android/config.gradle
浏览文件 @
92d0fdf2
...
...
@@ -4,7 +4,7 @@ rootProject.ext {
supportSdkVersion
=
"26.0.1"
minSdkVersion
=
19
targetSdkVersion
=
28
playerVersion
=
"12.4.
0
"
playerVersion
=
"12.4.
1
"
compat
=
"androidx.appcompat:appcompat:1.6.1"
/**
...
...
Flutter/example/lib/demo_txLiveplayer.dart
浏览文件 @
92d0fdf2
...
...
@@ -158,6 +158,14 @@ class _DemoTXLivePlayerState extends State<DemoTXLivePlayer> with WidgetsBinding
aspectRatio:
_aspectRatio
,
child:
TXPlayerVideo
(
onRenderViewCreatedListener:
(
viewId
)
{
/// 此处只展示了最基础的纹理和播放器的配置方式。 这里可记录下来 viewId,在多纹理之间进行切换,比如横竖屏切换场景,竖屏的画面,
/// 要切换到横屏的画面,可以在切换到横屏之后,拿到横屏的viewId 设置上去。回到竖屏的时候,再通过 viewId 切换回来。
/// Only the most basic configuration methods for textures and the player are shown here.
/// The `viewId` can be recorded here to switch between multiple textures. For example, in the scenario
/// of switching between portrait and landscape orientations:
/// To switch from the portrait view to the landscape view, obtain the `viewId` of the landscape view
/// after switching to landscape orientation and set it. When switching back to portrait orientation,
/// switch back using the recorded `viewId`.
_controller
.
setPlayerView
(
viewId
);
},
),
...
...
Flutter/example/lib/demo_txvodplayer.dart
浏览文件 @
92d0fdf2
...
...
@@ -157,6 +157,14 @@ class _DemoTXVodPlayerState extends State<DemoTXVodPlayer> with WidgetsBindingOb
child:
TXPlayerVideo
(
androidRenderType:
_renderType
,
onRenderViewCreatedListener:
(
viewId
)
{
/// 此处只展示了最基础的纹理和播放器的配置方式。 这里可记录下来 viewId,在多纹理之间进行切换,比如横竖屏切换场景,竖屏的画面,
/// 要切换到横屏的画面,可以在切换到横屏之后,拿到横屏的viewId 设置上去。回到竖屏的时候,再通过 viewId 切换回来。
/// Only the most basic configuration methods for textures and the player are shown here.
/// The `viewId` can be recorded here to switch between multiple textures. For example, in the scenario
/// of switching between portrait and landscape orientations:
/// To switch from the portrait view to the landscape view, obtain the `viewId` of the landscape view
/// after switching to landscape orientation and set it. When switching back to portrait orientation,
/// switch back using the recorded `viewId`.
_controller
.
setPlayerView
(
viewId
);
},
),
...
...
Flutter/example/lib/shortvideo/short_video_page_widget.dart
浏览文件 @
92d0fdf2
...
...
@@ -74,7 +74,17 @@ class _TXVodPlayerPageState extends State<ShortVideoPageWidget> {
child:
Stack
(
children:
[
Container
(
child:
TXPlayerVideo
(
controller:
_controller
),
child:
TXPlayerVideo
(
onRenderViewCreatedListener:
(
viewId
)
{
/// 此处只展示了最基础的纹理和播放器的配置方式。 这里可记录下来 viewId,在多纹理之间进行切换,比如横竖屏切换场景,竖屏的画面,
/// 要切换到横屏的画面,可以在切换到横屏之后,拿到横屏的viewId 设置上去。回到竖屏的时候,再通过 viewId 切换回来。
/// Only the most basic configuration methods for textures and the player are shown here.
/// The `viewId` can be recorded here to switch between multiple textures. For example, in the scenario
/// of switching between portrait and landscape orientations:
/// To switch from the portrait view to the landscape view, obtain the `viewId` of the landscape view
/// after switching to landscape orientation and set it. When switching back to portrait orientation,
/// switch back using the recorded `viewId`.
_controller
.
setPlayerView
(
viewId
);
},),
),
_getPauseView
()
],
...
...
Flutter/ios/super_player.podspec
浏览文件 @
92d0fdf2
...
...
@@ -4,7 +4,7 @@
#
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'super_player'
s
.
version
=
'12.4.
0
'
s
.
version
=
'12.4.
1
'
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.
...
...
Flutter/lib/Core/common/common_config.dart
浏览文件 @
92d0fdf2
...
...
@@ -2,5 +2,5 @@
part of
SuperPlayer
;
abstract
class
FPlayerPckInfo
{
static
const
String
PLAYER_VERSION
=
"12.4.
0
"
;
static
const
String
PLAYER_VERSION
=
"12.4.
1
"
;
}
\ No newline at end of file
Flutter/lib/Core/txplayer_widget.dart
浏览文件 @
92d0fdf2
...
...
@@ -5,14 +5,34 @@ typedef FTXOnRenderViewCreatedListener = void Function(int viewId);
class
TXPlayerVideo
extends
StatefulWidget
{
@Deprecated
(
"recommended to use onRenderViewCreatedListener and controller.setPlayerView to bind the video surface."
)
final
TXPlayerController
?
controller
;
final
FTXAndroidRenderViewType
renderViewType
;
final
FTXOnRenderViewCreatedListener
?
onRenderViewCreatedListener
;
///
/// 从 12.4.1 版本开始,移除传入 controller 的绑定纹理方式,该方式由于不可预见问题太多,所以移除。推荐使用 TXPlayerVideo
/// 的 onRenderViewCreatedListener 回调,在获取到 viewId 后,使用 controller#setPlayerView 进行播放器和纹理的绑定
///
/// Starting from version 12.4.1, the method of binding textures by passing in a controller has been removed.
/// This method is removed due to too many unforeseen issues. It is recommended to use the `onRenderViewCreatedListener`
/// callback of `TXPlayerVideo`. After obtaining the `viewId`, use `controller#setPlayerView` to bind the player
/// and texture.
///
/// e.g:
/// TXPlayerVideo(
/// onRenderViewCreatedListener: (viewId) {
/// /// 此处只展示了最基础的纹理和播放器的配置方式。 这里可记录下来 viewId,在多纹理之间进行切换,比如横竖屏切换场景,竖屏的画面,
/// /// 要切换到横屏的画面,可以在切换到横屏之后, 拿到横屏的viewId 设置上去。回到竖屏的时候,再通过 viewId 切换回来。
/// /// Only the most basic configuration methods for textures and the player are shown here.
/// /// The `viewId` can be recorded here to switch between multiple textures. For example, in the scenario
/// /// of switching between portrait and landscape orientations:
/// /// To switch from the portrait view to the landscape view, obtain the `viewId` of the landscape view
/// /// after switching to landscape orientation and set it. When switching back to portrait orientation,
/// /// switch back using the recorded `viewId`.
/// _controller.setPlayerView(viewId);
/// },
/// )
///
TXPlayerVideo
({
@Deprecated
(
"recommended to use onRenderViewCreatedListener and controller.setPlayerView to bind the video surface."
)
this
.
controller
,
this
.
onRenderViewCreatedListener
,
FTXAndroidRenderViewType
?
androidRenderType
,
Key
?
viewKey
})
:
renderViewType
=
androidRenderType
??
FTXAndroidRenderViewType
.
TEXTURE_VIEW
,
super
(
key:
viewKey
);
...
...
@@ -31,39 +51,18 @@ class TXPlayerVideoState extends State<TXPlayerVideo> {
@override
void
initState
()
{
super
.
initState
();
if
(
_viewIdCompleter
.
isCompleted
)
{
_setPlayerView
(
_viewId
);
}
}
@override
void
didUpdateWidget
(
covariant
TXPlayerVideo
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
if
(
oldWidget
.
controller
!=
widget
.
controller
)
{
if
(
_viewIdCompleter
.
isCompleted
)
{
setState
(()
{
_setPlayerView
(
_viewId
);
});
}
else
{
_waitViewId
();
}
}
else
if
(
oldWidget
.
renderViewType
!=
widget
.
renderViewType
)
{
if
(
oldWidget
.
renderViewType
!=
widget
.
renderViewType
)
{
setState
(()
{
_platformViewKey
=
UniqueKey
();
});
}
else
{
LogUtils
.
i
(
TAG
,
"met a unchanged widget refresh"
);
_waitViewId
();
}
}
Future
<
void
>
_waitViewId
()
async
{
await
_viewIdCompleter
.
future
;
setState
(()
{
_setPlayerView
(
_viewId
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -105,7 +104,6 @@ class TXPlayerVideoState extends State<TXPlayerVideo> {
_viewId
=
params
.
id
;
_viewIdCompleter
.
complete
(
params
.
id
);
widget
.
onRenderViewCreatedListener
?.
call
(
params
.
id
);
_setPlayerView
(
params
.
id
);
if
(
widget
.
renderViewType
==
FTXAndroidRenderViewType
.
DRM_SURFACE_VIEW
)
{
return
PlatformViewsService
.
initSurfaceAndroidView
(
id:
params
.
id
,
...
...
@@ -135,10 +133,6 @@ class TXPlayerVideoState extends State<TXPlayerVideo> {
}
}
Future
<
void
>
_setPlayerView
(
int
viewId
)
async
{
await
widget
.
controller
?.
setPlayerView
(
viewId
);
}
void
_onCreateIOSView
(
int
id
)
{
if
(
_viewIdCompleter
.
isCompleted
)
{
_viewIdCompleter
=
Completer
();
...
...
@@ -146,7 +140,6 @@ class TXPlayerVideoState extends State<TXPlayerVideo> {
_viewId
=
id
;
_viewIdCompleter
.
complete
(
id
);
widget
.
onRenderViewCreatedListener
?.
call
(
id
);
_setPlayerView
(
id
);
}
Future
<
int
>
getViewId
()
async
{
...
...
@@ -154,10 +147,6 @@ class TXPlayerVideoState extends State<TXPlayerVideo> {
return
_viewId
;
}
void
resetController
()
{
_waitViewId
();
}
@override
void
dispose
()
{
super
.
dispose
();
...
...
Flutter/pubspec.yaml
浏览文件 @
92d0fdf2
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.4.
0
version
:
12.4.
1
homepage
:
https://github.com/LiteAVSDK/Player_Flutter
environment
:
...
...
FlutterWidget/superplayer_widget/lib/common/player_constants.dart
浏览文件 @
92d0fdf2
...
...
@@ -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.4.
0
"
;
static
const
String
PLAYER_WIDGET_VERSION
=
"12.4.
1
"
;
}
FlutterWidget/superplayer_widget/lib/ui/superplayer_widget.dart
浏览文件 @
92d0fdf2
...
...
@@ -375,7 +375,6 @@ class SuperPlayerViewState extends State<SuperPlayerView> with WidgetsBindingObs
_videoBottomKey
.
currentState
?.
updateUIStatus
(
SuperPlayerUIStatus
.
WINDOW_MODE
);
_videoTitleKey
.
currentState
?.
updateUIStatus
(
SuperPlayerUIStatus
.
WINDOW_MODE
);
hideControlView
();
_videoKey
.
currentState
?.
resetController
();
}
void
_refreshDownloadStatus
()
async
{
...
...
FlutterWidget/superplayer_widget/pubspec.yaml
浏览文件 @
92d0fdf2
name
:
superplayer_widget
description
:
superplayer,base on vodplayer
version
:
12.4.
0
version
:
12.4.
1
environment
:
sdk
:
'
>=2.17.0
<4.0.0'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论