Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tx_player_fork
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蒋俊
tx_player_fork
Commits
916f8d21
提交
916f8d21
authored
4月 30, 2025
作者:
kongdywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix an issue where releasing the player would close the global Picture-in-Picture mode
上级
92d0fdf2
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
88 行增加
和
50 行删除
+88
-50
CHANGELOG.md
Flutter/CHANGELOG.md
+7
-0
buildVersionOnMac.sh
Flutter/CI/buildVersionOnMac.sh
+1
-1
config.gradle
Flutter/android/config.gradle
+1
-1
FTXPIPManager.java
.../src/main/java/com/tencent/vod/flutter/FTXPIPManager.java
+13
-14
SuperPlayerPlugin.java
.../main/java/com/tencent/vod/flutter/SuperPlayerPlugin.java
+1
-1
FTXLivePlayer.java
...in/java/com/tencent/vod/flutter/player/FTXLivePlayer.java
+1
-1
FTXVodPlayer.java
...ain/java/com/tencent/vod/flutter/player/FTXVodPlayer.java
+2
-2
TXSimpleEventBus.java
.../java/com/tencent/vod/flutter/tools/TXSimpleEventBus.java
+11
-0
FlutterPipImplActivity.java
...va/com/tencent/vod/flutter/ui/FlutterPipImplActivity.java
+45
-25
super_player.podspec
Flutter/ios/super_player.podspec
+1
-1
common_config.dart
Flutter/lib/Core/common/common_config.dart
+2
-1
pubspec.yaml
Flutter/pubspec.yaml
+1
-1
player_constants.dart
...idget/superplayer_widget/lib/common/player_constants.dart
+1
-1
pubspec.yaml
FlutterWidget/superplayer_widget/pubspec.yaml
+1
-1
没有找到文件。
Flutter/CHANGELOG.md
浏览文件 @
916f8d21
#### Version: 12.4.2 2025.04.30
##### Features:
-
Fix an issue where releasing the player would close the global Picture-in-Picture mode.
#### Version: 12.4.1 2025.04.02
##### Features:
...
...
Flutter/CI/buildVersionOnMac.sh
浏览文件 @
916f8d21
...
...
@@ -5,7 +5,7 @@ buildLog() {
}
inputVersion
=
$1
export
VERSION_NAME
=
"12.4.
1
"
export
VERSION_NAME
=
"12.4.
2
"
if
[
-n
"
$inputVersion
"
]
;
then
VERSION_NAME
=
$inputVersion
fi
...
...
Flutter/android/config.gradle
浏览文件 @
916f8d21
...
...
@@ -4,7 +4,7 @@ rootProject.ext {
supportSdkVersion
=
"26.0.1"
minSdkVersion
=
19
targetSdkVersion
=
28
playerVersion
=
"12.4.
1
"
playerVersion
=
"12.4.
2
"
compat
=
"androidx.appcompat:appcompat:1.6.1"
/**
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/FTXPIPManager.java
浏览文件 @
916f8d21
...
...
@@ -125,15 +125,18 @@ public class FTXPIPManager implements TXSimpleEventBus.EventSubscriber, FtxMessa
*
* 通知退出当前pip
*/
public
void
exitPip
()
{
if
(
mIsInPipMode
)
{
final
Activity
curActivity
=
TXFlutterEngineHolder
.
getInstance
().
getCurActivity
();
if
(
null
!=
curActivity
)
{
Intent
intent
=
new
Intent
(
curActivity
,
FlutterPipImplActivity
.
class
);
intent
.
setAction
(
FTXEvent
.
PIP_ACTION_EXIT
);
curActivity
.
startActivity
(
intent
);
mIsInPipMode
=
false
;
public
void
exitCurrentPip
()
{
exitPipByPlayerId
(-
1
);
}
/**
* @param playerId -1 is close anyway
*/
public
void
exitPipByPlayerId
(
int
playerId
)
{
if
(
isInPipMode
())
{
Bundle
params
=
new
Bundle
();
params
.
putInt
(
FTXEvent
.
EXTRA_NAME_PLAYER_ID
,
playerId
);
TXSimpleEventBus
.
getInstance
().
post
(
FTXEvent
.
PIP_ACTION_EXIT
,
params
);
}
}
...
...
@@ -238,14 +241,10 @@ public class FTXPIPManager implements TXSimpleEventBus.EventSubscriber, FtxMessa
* 更新PIP悬浮框按钮
*/
public
void
updatePipActions
(
PipParams
params
)
{
final
Activity
mAct
=
TXFlutterEngineHolder
.
getInstance
().
getCurActivity
();
if
(
null
!=
mAct
)
{
Intent
intent
=
new
Intent
(
mAct
,
FlutterPipImplActivity
.
class
);
if
(
isInPipMode
())
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putParcelable
(
FTXEvent
.
EXTRA_NAME_PARAMS
,
params
);
intent
.
setAction
(
FTXEvent
.
PIP_ACTION_UPDATE
);
intent
.
putExtra
(
"data"
,
bundle
);
mAct
.
startActivity
(
intent
);
TXSimpleEventBus
.
getInstance
().
post
(
FTXEvent
.
PIP_ACTION_UPDATE
,
bundle
);
}
}
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/SuperPlayerPlugin.java
浏览文件 @
916f8d21
...
...
@@ -479,7 +479,7 @@ public class SuperPlayerPlugin implements FlutterPlugin, ActivityAware,
}
if
(
null
!=
mTxPipManager
)
{
mTxPipManager
.
releaseActivityListener
();
mTxPipManager
.
exitPip
();
mTxPipManager
.
exit
Current
Pip
();
}
// Close the solution to the problem of the picture-in-picture click restore
// failure on some versions of Android 12.
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/player/FTXLivePlayer.java
浏览文件 @
916f8d21
...
...
@@ -393,7 +393,7 @@ public class FTXLivePlayer extends FTXLivePlayerRenderHost implements TXFlutterL
@Override
public
void
exitPictureInPictureMode
(
@NonNull
PlayerMsg
playerMsg
)
{
mPipManager
.
exitPip
(
);
mPipManager
.
exitPip
ByPlayerId
(
getPlayerId
()
);
}
@NonNull
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/player/FTXVodPlayer.java
浏览文件 @
916f8d21
...
...
@@ -297,7 +297,7 @@ public class FTXVodPlayer extends FTXVodPlayerRenderHost implements ITXVodPlayLi
result
=
mVodPlayer
.
stopPlay
(
isNeedClearLastImg
);
}
mUIHandler
.
removeCallbacksAndMessages
(
null
);
mPipManager
.
exitPip
(
);
mPipManager
.
exitPip
ByPlayerId
(
getPlayerId
()
);
releaseTXImageSprite
();
mHardwareDecodeFail
=
false
;
if
(
isNeedClearLastImg
&&
null
!=
mCurRenderView
)
{
...
...
@@ -723,7 +723,7 @@ public class FTXVodPlayer extends FTXVodPlayerRenderHost implements ITXVodPlayLi
@Override
public
void
exitPictureInPictureMode
(
@NonNull
PlayerMsg
playerMsg
)
{
mPipManager
.
exitPip
(
);
mPipManager
.
exitPip
ByPlayerId
(
getPlayerId
()
);
}
@Override
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/tools/TXSimpleEventBus.java
浏览文件 @
916f8d21
...
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
* use to communicate with Activities frequently
...
...
@@ -39,6 +40,16 @@ public class TXSimpleEventBus {
}
}
public
void
unregisterAllType
(
EventSubscriber
subscriber
)
{
Set
<
String
>
keySets
=
subscribers
.
keySet
();
for
(
String
key
:
keySets
)
{
List
<
EventSubscriber
>
subscriberList
=
subscribers
.
get
(
key
);
if
(
subscriberList
!=
null
)
{
subscriberList
.
remove
(
subscriber
);
}
}
}
public
void
post
(
String
eventType
,
Object
data
)
{
List
<
EventSubscriber
>
subscriberList
=
subscribers
.
get
(
eventType
);
if
(
subscriberList
!=
null
)
{
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/ui/FlutterPipImplActivity.java
浏览文件 @
916f8d21
...
...
@@ -45,7 +45,7 @@ import com.tencent.vod.flutter.tools.TXSimpleEventBus;
public
class
FlutterPipImplActivity
extends
Activity
implements
ITXVodPlayListener
,
ServiceConnection
{
ServiceConnection
,
TXSimpleEventBus
.
EventSubscriber
{
private
static
final
String
TAG
=
"FlutterPipImplActivity"
;
private
static
TXPlayerHolder
pipPlayerHolder
;
...
...
@@ -159,7 +159,7 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
mPipContainer
=
findViewById
(
R
.
id
.
rl_pip_container
);
if
(
null
==
pipPlayerHolder
)
{
LiteavLog
.
e
(
TAG
,
"lack pipPlayerHolder, please check the pip argument"
);
finish
();
destroyPipAct
();
return
;
}
mPlayerHolder
=
pipPlayerHolder
;
...
...
@@ -169,15 +169,18 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
setLivePlayerListener
();
}
else
{
LiteavLog
.
e
(
TAG
,
"lack pipPlayerHolder player, please check the pip argument"
);
finish
();
destroyPipAct
();
return
;
}
TXSimpleEventBus
.
getInstance
().
register
(
FTXEvent
.
PIP_ACTION_EXIT
,
this
);
TXSimpleEventBus
.
getInstance
().
register
(
FTXEvent
.
PIP_ACTION_UPDATE
,
this
);
Intent
intent
=
getIntent
();
Bundle
data
=
intent
.
getBundleExtra
(
"data"
);
if
(
null
!=
data
)
{
PipParams
params
=
data
.
getParcelable
(
FTXEvent
.
EXTRA_NAME_PARAMS
);
if
(
null
==
params
)
{
LiteavLog
.
e
(
TAG
,
"lack pip params,please check the argument"
);
finish
();
destroyPipAct
();
}
else
{
mCurrentParams
=
params
;
if
(
VERSION
.
SDK_INT
>=
VERSION_CODES
.
O
)
{
...
...
@@ -317,9 +320,11 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
}
if
(
null
!=
mPlayerHolder
.
getVodPlayer
())
{
mPlayerHolder
.
getVodPlayer
().
setSurface
(
null
);
mPlayerHolder
.
getVodPlayer
().
setVodListener
(
null
);
}
if
(
null
!=
mPlayerHolder
.
getLivePlayer
())
{
mPlayerHolder
.
getLivePlayer
().
setRenderView
((
TextureView
)
null
);
mPlayerHolder
.
getLivePlayer
().
setObserver
(
null
);
}
mPlayerHolder
.
pause
();
int
codeEvent
=
mIsNeedToStop
?
FTXEvent
.
EVENT_PIP_MODE_ALREADY_EXIT
:
FTXEvent
.
EVENT_PIP_MODE_RESTORE_UI
;
...
...
@@ -336,18 +341,37 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
private
void
handleIntent
(
Intent
intent
)
{
if
(
intent
!=
null
)
{
String
action
=
intent
.
getAction
();
handleAction
(
action
,
intent
.
getExtras
());
}
}
private
void
handleAction
(
String
action
,
Bundle
params
)
{
if
(
TextUtils
.
equals
(
action
,
FTXEvent
.
PIP_ACTION_START
))
{
startPipVideo
();
}
else
if
(
TextUtils
.
equals
(
action
,
FTXEvent
.
PIP_ACTION_EXIT
))
{
int
playerId
=
-
1
;
if
(
null
!=
params
)
{
playerId
=
params
.
getInt
(
FTXEvent
.
EXTRA_NAME_PLAYER_ID
,
-
1
);
}
if
(
playerId
==
-
1
||
playerId
==
mCurrentParams
.
getCurrentPlayerId
())
{
mIsNeedToStop
=
true
;
handlePipExitEvent
();
}
else
{
LiteavLog
.
w
(
TAG
,
"close pip failed, playerId not found:"
+
playerId
);
}
}
else
if
(
TextUtils
.
equals
(
action
,
FTXEvent
.
PIP_ACTION_UPDATE
))
{
Bundle
data
=
intent
.
getBundleExtra
(
"data"
);
if
(
null
!=
data
)
{
PipParams
pipParams
=
data
.
getParcelable
(
FTXEvent
.
EXTRA_NAME_PARAMS
);
if
(
null
!=
params
)
{
PipParams
pipParams
=
params
.
getParcelable
(
FTXEvent
.
EXTRA_NAME_PARAMS
);
updatePip
(
pipParams
);
}
}
else
if
(
TextUtils
.
equals
(
action
,
FTXEvent
.
PIP_ACTION_DO_EXIT
))
{
destroyPipAct
();
}
else
{
LiteavLog
.
e
(
TAG
,
"unknown pip action:"
+
action
);
}
}
private
void
destroyPipAct
()
{
overridePendingTransition
(
0
,
0
);
if
(
VERSION
.
SDK_INT
>=
VERSION_CODES
.
LOLLIPOP
)
{
FlutterPipImplActivity
.
this
.
finishAndRemoveTask
();
...
...
@@ -355,10 +379,8 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
FlutterPipImplActivity
.
this
.
finish
();
}
mIsPipFinishing
=
false
;
}
else
{
LiteavLog
.
e
(
TAG
,
"unknown pip action:"
+
action
);
}
}
pipPlayerHolder
=
null
;
isInPip
=
false
;
}
private
void
updatePip
(
PipParams
pipParams
)
{
...
...
@@ -432,23 +454,11 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
it can display back to the original page.
*/
moveCurActToFront
();
overridePendingTransition
(
0
,
0
);
if
(
VERSION
.
SDK_INT
>=
VERSION_CODES
.
LOLLIPOP
)
{
FlutterPipImplActivity
.
this
.
finishAndRemoveTask
();
}
else
{
FlutterPipImplActivity
.
this
.
finish
();
}
mIsPipFinishing
=
false
;
destroyPipAct
();
}
},
800
);
}
else
{
overridePendingTransition
(
0
,
0
);
if
(
VERSION
.
SDK_INT
>=
VERSION_CODES
.
LOLLIPOP
)
{
finishAndRemoveTask
();
}
else
{
finish
();
}
mIsPipFinishing
=
false
;
destroyPipAct
();
}
}
}
...
...
@@ -487,6 +497,7 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
if
(
Build
.
VERSION
.
SDK_INT
>=
VERSION_CODES
.
Q
)
{
unbindService
(
this
);
}
TXSimpleEventBus
.
getInstance
().
unregister
(
FTXEvent
.
PIP_ACTION_EXIT
,
this
);
mPlayerHolder
=
null
;
pipPlayerHolder
=
null
;
isInPip
=
false
;
...
...
@@ -650,4 +661,12 @@ public class FlutterPipImplActivity extends Activity implements ITXVodPlayListen
@Override
public
void
onServiceDisconnected
(
ComponentName
name
)
{
}
@Override
public
void
onEvent
(
String
eventType
,
Object
data
)
{
if
(
TextUtils
.
equals
(
FTXEvent
.
PIP_ACTION_EXIT
,
eventType
)
||
TextUtils
.
equals
(
FTXEvent
.
PIP_ACTION_UPDATE
,
eventType
))
{
handleAction
(
eventType
,
(
Bundle
)
data
);
}
}
}
\ No newline at end of file
Flutter/ios/super_player.podspec
浏览文件 @
916f8d21
...
...
@@ -4,7 +4,7 @@
#
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'super_player'
s
.
version
=
'12.4.
1
'
s
.
version
=
'12.4.
2
'
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
浏览文件 @
916f8d21
...
...
@@ -2,5 +2,5 @@
part of
SuperPlayer
;
abstract
class
FPlayerPckInfo
{
static
const
String
PLAYER_VERSION
=
"12.4.
1
"
;
static
const
String
PLAYER_VERSION
=
"12.4.
2
"
;
}
\ No newline at end of file
Flutter/pubspec.yaml
浏览文件 @
916f8d21
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.
1
version
:
12.4.
2
homepage
:
https://github.com/LiteAVSDK/Player_Flutter
environment
:
...
...
FlutterWidget/superplayer_widget/lib/common/player_constants.dart
浏览文件 @
916f8d21
...
...
@@ -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.
1
"
;
static
const
String
PLAYER_WIDGET_VERSION
=
"12.4.
2
"
;
}
FlutterWidget/superplayer_widget/pubspec.yaml
浏览文件 @
916f8d21
name
:
superplayer_widget
description
:
superplayer,base on vodplayer
version
:
12.4.
1
version
:
12.4.
2
environment
:
sdk
:
'
>=2.17.0
<4.0.0'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论