Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tx_player_fork
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蒋俊
tx_player_fork
Commits
2b2a68a2
提交
2b2a68a2
authored
1月 03, 2024
作者:
kongdywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、android adapt flutter new gradle environment
2、fix ios receive first frame event before play when prePlay 3、fix player will show loading when enter fullScreen that in prePlay status
上级
3820da5d
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
26 行增加
和
20 行删除
+26
-20
build.gradle
Flutter/example/android/build.gradle
+1
-1
gradle-wrapper.properties
.../example/android/gradle/wrapper/gradle-wrapper.properties
+1
-1
AppFrameworkInfo.plist
Flutter/example/ios/Flutter/AppFrameworkInfo.plist
+1
-1
Podfile
Flutter/example/ios/Podfile
+1
-1
project.pbxproj
Flutter/example/ios/Runner.xcodeproj/project.pbxproj
+3
-3
Info.plist
Flutter/example/ios/Runner/Info.plist
+2
-0
FTXVodPlayer.m
Flutter/ios/Classes/FTXVodPlayer.m
+4
-9
superplayer_define.dart
Flutter/superplayer_widget/lib/model/superplayer_define.dart
+1
-0
superplayer_controller.dart
Flutter/superplayer_widget/lib/superplayer_controller.dart
+4
-0
superplayer_widget.dart
Flutter/superplayer_widget/lib/ui/superplayer_widget.dart
+8
-4
没有找到文件。
Flutter/example/android/build.gradle
浏览文件 @
2b2a68a2
...
...
@@ -5,7 +5,7 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:
4.1
.0'
classpath
'com.android.tools.build:gradle:
7.2
.0'
}
}
...
...
Flutter/example/android/gradle/wrapper/gradle-wrapper.properties
浏览文件 @
2b2a68a2
...
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
6.7
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
7.3.3
-all.zip
Flutter/example/ios/Flutter/AppFrameworkInfo.plist
浏览文件 @
2b2a68a2
...
...
@@ -21,6 +21,6 @@
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
MinimumOSVersion
<
/k
e
y
>
<
string
>
9
.0
<
/string
>
<
string
>
11
.0
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
Flutter/example/ios/Podfile
浏览文件 @
2b2a68a2
# Uncomment this line to define a global platform for your project
# platform :ios, '
9
.0'
# platform :ios, '
11
.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
...
...
Flutter/example/ios/Runner.xcodeproj/project.pbxproj
浏览文件 @
2b2a68a2
...
...
@@ -370,7 +370,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
11
.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
SUPPORTED_PLATFORMS
=
iphoneos
;
...
...
@@ -448,7 +448,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
11
.0
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
iphoneos
;
...
...
@@ -497,7 +497,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
11
.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
SUPPORTED_PLATFORMS
=
iphoneos
;
...
...
Flutter/example/ios/Runner/Info.plist
浏览文件 @
2b2a68a2
...
...
@@ -54,5 +54,7 @@
<
fa
ls
e
/
>
<
k
e
y
>
io.flutter.embedded_views_preview
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIApplicationSupportsIndirectInputEvents
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
Flutter/ios/Classes/FTXVodPlayer.m
浏览文件 @
2b2a68a2
...
...
@@ -396,12 +396,6 @@ static const int CODE_ON_RECEIVE_FIRST_FRAME = 2003;
(
void
**
)
&
_latestPixelBuffer
))
{
pixelBuffer
=
_latestPixelBuffer
;
}
dispatch_async
(
playerMainqueue
,
^
{
if
(
!
self
->
isVideoFirstFrameReceived
&&
nil
!=
pixelBuffer
)
{
[
self
->
_eventSink
success
:[
FTXVodPlayer
getParamsWithEvent
:
CODE_ON_RECEIVE_FIRST_FRAME
withParams
:@{
@"EVT_WIDTH"
:
@
(
self
->
videoWidth
.
intValue
),
@"EVT_HEIGHT"
:
@
(
self
->
videoHeight
.
intValue
),
@"EVT_PARAM1"
:
@
(
self
->
videoWidth
.
intValue
),
@"EVT_PARAM2"
:
@
(
self
->
videoHeight
.
intValue
)}]];
self
->
isVideoFirstFrameReceived
=
true
;
}
});
return
pixelBuffer
;
}
...
...
@@ -412,11 +406,12 @@ static const int CODE_ON_RECEIVE_FIRST_FRAME = 2003;
// Hand over the first frame event timing to Flutter for shared texture processing.
if
(
EvtID
==
CODE_ON_RECEIVE_FIRST_FRAME
)
{
currentPlayTime
=
0
;
dispatch_async
(
playerMainqueue
,
^
{
NSMutableDictionary
*
mutableDic
=
param
.
mutableCopy
;
self
->
videoWidth
=
param
[
@"EVT_WIDTH"
];
self
->
videoHeight
=
param
[
@"EVT_HEIGHT"
];
});
return
;
mutableDic
[
@"EVT_PARAM1"
]
=
self
->
videoWidth
;
mutableDic
[
@"EVT_PARAM2"
]
=
self
->
videoHeight
;
param
=
mutableDic
;
}
else
if
(
EvtID
==
PLAY_EVT_CHANGE_RESOLUTION
)
{
dispatch_async
(
playerMainqueue
,
^
{
self
->
videoWidth
=
param
[
@"EVT_WIDTH"
];
...
...
Flutter/superplayer_widget/lib/model/superplayer_define.dart
浏览文件 @
2b2a68a2
...
...
@@ -3,6 +3,7 @@ part of demo_super_player_lib;
enum
SuperPlayerState
{
INIT
,
// Initial state
PREPARED
,
// prepared
PLAYING
,
// Playing
PAUSE
,
// Paused
LOADING
,
// Buffering
...
...
Flutter/superplayer_widget/lib/superplayer_controller.dart
浏览文件 @
2b2a68a2
...
...
@@ -133,6 +133,8 @@ class SuperPlayerController {
_vodPlayerController
.
resume
();
}
videoDuration
=
await
_vodPlayerController
.
getDuration
();
currentDuration
=
await
_vodPlayerController
.
getCurrentPlaybackTime
();
_updatePlayerState
(
SuperPlayerState
.
PREPARED
);
break
;
case
TXVodPlayEvent
.
PLAY_EVT_PLAY_LOADING
:
// PLAY_EVT_PLAY_LOADING
if
(
playerState
==
SuperPlayerState
.
PAUSE
)
{
...
...
@@ -569,6 +571,8 @@ class SuperPlayerController {
playerState
=
state
;
switch
(
state
)
{
case
SuperPlayerState
.
INIT
:
break
;
case
SuperPlayerState
.
PREPARED
:
_observer
?.
onPlayPrepare
();
break
;
case
SuperPlayerState
.
PLAYING
:
...
...
Flutter/superplayer_widget/lib/ui/superplayer_widget.dart
浏览文件 @
2b2a68a2
...
...
@@ -160,7 +160,7 @@ class SuperPlayerViewState extends State<SuperPlayerView> with WidgetsBindingObs
},
()
{
// onPlayPrepare
_isShowCover
=
true
;
_isLoading
=
tru
e
;
_isLoading
=
fals
e
;
_togglePlayUIState
(
false
);
},
(
name
)
{
_togglePlayUIState
(
true
);
...
...
@@ -271,6 +271,10 @@ class SuperPlayerViewState extends State<SuperPlayerView> with WidgetsBindingObs
_isLoading
=
true
;
_coverViewKey
.
currentState
?.
hideCover
();
break
;
case
SuperPlayerState
.
PREPARED
:
_isPlaying
=
false
;
_isLoading
=
false
;
break
;
case
SuperPlayerState
.
INIT
:
_isPlaying
=
false
;
_isLoading
=
true
;
...
...
@@ -602,7 +606,7 @@ class SuperPlayerViewState extends State<SuperPlayerView> with WidgetsBindingObs
int
playAction
=
_playController
.
videoModel
!.
playAction
;
if
(
playerState
==
SuperPlayerState
.
LOADING
&&
playAction
==
SuperPlayerModel
.
PLAY_ACTION_PRELOAD
)
{
_playController
.
resume
();
}
else
if
(
playerState
==
SuperPlayerState
.
INIT
)
{
}
else
if
(
playerState
==
SuperPlayerState
.
INIT
||
playerState
==
SuperPlayerState
.
PREPARED
)
{
if
(
playAction
==
SuperPlayerModel
.
PLAY_ACTION_PRELOAD
)
{
_playController
.
resume
();
}
else
if
(
playAction
==
SuperPlayerModel
.
PLAY_ACTION_MANUAL_PLAY
)
{
...
...
@@ -807,16 +811,16 @@ class FullScreenController {
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
]);
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
manual
,
overlays:
SystemUiOverlay
.
values
);
}
else
if
(
orientationDirection
==
TXVodPlayEvent
.
ORIENTATION_LANDSCAPE_RIGHT
)
{
enterFullScreen
();
SystemChrome
.
setPreferredOrientations
(
Platform
.
isIOS
?
[
DeviceOrientation
.
landscapeRight
]
:
[
DeviceOrientation
.
landscapeLeft
]);
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
immersive
);
enterFullScreen
();
}
else
if
(
orientationDirection
==
TXVodPlayEvent
.
ORIENTATION_PORTRAIT_DOWN
)
{
}
else
if
(
orientationDirection
==
TXVodPlayEvent
.
ORIENTATION_LANDSCAPE_LEFT
)
{
enterFullScreen
();
SystemChrome
.
setPreferredOrientations
(
Platform
.
isIOS
?
[
DeviceOrientation
.
landscapeLeft
]
:
[
DeviceOrientation
.
landscapeRight
]);
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
immersive
);
enterFullScreen
();
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论