Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tx_player_fork
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蒋俊
tx_player_fork
Commits
4b10d489
提交
4b10d489
authored
11月 06, 2023
作者:
kongdywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. player widget support webRTC playback
2. fix video offline download videoQualityId's range error
上级
7db2b9ce
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
10 行增加
和
4 行删除
+10
-4
common_utils.dart
Flutter/lib/Core/tools/common_utils.dart
+1
-1
superplayer_controller.dart
Flutter/superplayer_widget/lib/superplayer_controller.dart
+9
-3
没有找到文件。
Flutter/lib/Core/tools/common_utils.dart
浏览文件 @
4b10d489
...
...
@@ -15,7 +15,7 @@ class CommonUtils {
cacheQualityIndex
=
DownloadQuality
.
QUALITY_480P
;
}
else
if
(
minValue
>
480
&&
minValue
<=
540
)
{
cacheQualityIndex
=
DownloadQuality
.
QUALITY_540P
;
}
else
if
(
minValue
>
540
&&
minValue
>
=
720
)
{
}
else
if
(
minValue
>
540
&&
minValue
<
=
720
)
{
cacheQualityIndex
=
DownloadQuality
.
QUALITY_720P
;
}
else
if
(
minValue
>
720
&&
minValue
<=
1080
)
{
cacheQualityIndex
=
DownloadQuality
.
QUALITY_1080P
;
...
...
Flutter/superplayer_widget/lib/superplayer_controller.dart
浏览文件 @
4b10d489
...
...
@@ -393,7 +393,7 @@ class SuperPlayerController {
_observer
?.
onError
(
SuperPlayerCode
.
PLAY_URL_EMPTY
,
FSPLocal
.
current
.
txSpwErrEmptyUrl
);
return
;
}
if
(
_isRTMPPlay
(
videoUrl
))
{
if
(
_isRTMPPlay
(
videoUrl
)
||
_isWebRtcPlay
(
videoUrl
)
)
{
_playLiveURL
(
videoUrl
,
TXPlayType
.
LIVE_RTMP
);
}
else
if
(
_isFLVPlay
(
videoUrl
))
{
_playTimeShiftLiveURL
(
model
.
appId
,
videoUrl
);
...
...
@@ -403,7 +403,7 @@ class SuperPlayerController {
}
else
{
_playVodUrl
(
videoUrl
);
}
bool
isLivePlay
=
(
_isRTMPPlay
(
videoUrl
)
||
_isFLVPlay
(
videoUrl
));
bool
isLivePlay
=
(
_isRTMPPlay
(
videoUrl
)
||
_isFLVPlay
(
videoUrl
)
||
_isWebRtcPlay
(
videoUrl
)
);
_observer
?.
onPlayProgress
(
0
,
model
.
duration
.
toDouble
(),
0
);
_updatePlayerType
(
isLivePlay
?
SuperPlayerType
.
LIVE
:
SuperPlayerType
.
VOD
);
_updateVideoQualityList
(
videoQualities
,
defaultVideoQuality
);
...
...
@@ -490,7 +490,7 @@ class SuperPlayerController {
/// 重新开始播放视频
Future
<
void
>
reStart
()
async
{
if
(
playerType
==
SuperPlayerType
.
LIVE
||
playerType
==
SuperPlayerType
.
LIVE_SHIFT
)
{
if
(
_isRTMPPlay
(
_currentPlayUrl
))
{
if
(
_isRTMPPlay
(
_currentPlayUrl
)
||
_isWebRtcPlay
(
_currentPlayUrl
)
)
{
_playLiveURL
(
_currentPlayUrl
,
TXPlayType
.
LIVE_RTMP
);
}
else
if
(
_isFLVPlay
(
_currentPlayUrl
)
&&
null
!=
videoModel
)
{
_playTimeShiftLiveURL
(
videoModel
!.
appId
,
_currentPlayUrl
);
...
...
@@ -622,6 +622,12 @@ class SuperPlayerController {
}
}
/// whether it is the webrtc protocol
/// 是否是webrtc协议
bool
_isWebRtcPlay
(
String
?
videoURL
)
{
return
null
!=
videoURL
&&
videoURL
.
startsWith
(
"webrtc"
);
}
/// whether it is the RTMP protocol
/// 是否是RTMP协议
bool
_isRTMPPlay
(
String
?
videoURL
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论