Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tx_player_fork
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蒋俊
tx_player_fork
Commits
3b15ce8f
提交
3b15ce8f
authored
6月 05, 2023
作者:
kongdywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.update version
2.download add speed params 3,fix max brightness value error on MIUI 14.0.4
上级
4326ba38
全部展开
显示空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
158 行增加
和
20 行删除
+158
-20
CHANGELOG.md
Flutter/CHANGELOG.md
+9
-0
config.gradle
Flutter/android/config.gradle
+1
-1
FTXDownloadManager.java
...main/java/com/tencent/vod/flutter/FTXDownloadManager.java
+6
-0
FTXLivePlayer.java
.../src/main/java/com/tencent/vod/flutter/FTXLivePlayer.java
+2
-0
FTXPIPManager.java
.../src/main/java/com/tencent/vod/flutter/FTXPIPManager.java
+1
-0
FTXVodPlayer.java
...d/src/main/java/com/tencent/vod/flutter/FTXVodPlayer.java
+2
-0
SuperPlayerPlugin.java
.../main/java/com/tencent/vod/flutter/SuperPlayerPlugin.java
+18
-5
FtxMessages.java
...in/java/com/tencent/vod/flutter/messages/FtxMessages.java
+0
-0
CommonUtil.java
...c/main/java/com/tencent/vod/flutter/tools/CommonUtil.java
+47
-1
API文档.md
Flutter/docs/API文档.md
+2
-0
example运行指引.md
Flutter/docs/example运行指引.md
+3
-1
集成指引.md
Flutter/docs/集成指引.md
+5
-0
FTXDownloadManager.m
Flutter/ios/Classes/FTXDownloadManager.m
+8
-2
FtxMessages.h
Flutter/ios/Classes/messages/FtxMessages.h
+8
-2
FtxMessages.m
Flutter/ios/Classes/messages/FtxMessages.m
+10
-2
super_player.podspec
Flutter/ios/super_player.podspec
+1
-1
common_config.dart
Flutter/lib/Core/common/common_config.dart
+2
-1
txplayer_message.dart
Flutter/lib/Core/pigeons/txplayer_message.dart
+4
-0
txplayer_define.dart
Flutter/lib/Core/txplayer_define.dart
+12
-2
txplayer_messages.dart
Flutter/lib/Core/txplayer_messages.dart
+12
-0
txvoddownload_controller.dart
Flutter/lib/Core/txvoddownload_controller.dart
+3
-0
pubspec.yaml
Flutter/pubspec.yaml
+1
-1
pubspec.yaml
Flutter/superplayer_widget/pubspec.yaml
+1
-1
没有找到文件。
Flutter/CHANGELOG.md
浏览文件 @
3b15ce8f
...
@@ -115,3 +115,11 @@ Professional 分支:Android & iOS 端集成TXLiteAVSDK_Professional lastest版
...
@@ -115,3 +115,11 @@ Professional 分支:Android & iOS 端集成TXLiteAVSDK_Professional lastest版
-
set Android TXLiteAVSDK_Professional to 11.1.0.13141,tag:release_pro_v11.1.1
-
set Android TXLiteAVSDK_Professional to 11.1.0.13141,tag:release_pro_v11.1.1
-
set iOS TXLiteAVSDK_Professional to 11.1.14143, tag:release_pro_v11.1.1
-
set iOS TXLiteAVSDK_Professional to 11.1.14143, tag:release_pro_v11.1.1
#### Version: 11.2.0 2023.06.05
##### 版本特性:
-
set Android TXLiteAVSDK_Professional to 11.2.0.13154,tag:release_pro_v11.2.0
-
set iOS TXLiteAVSDK_Professional to 11.2.14217, tag:release_pro_v11.2.0
\ No newline at end of file
Flutter/android/config.gradle
浏览文件 @
3b15ce8f
...
@@ -4,7 +4,7 @@ rootProject.ext {
...
@@ -4,7 +4,7 @@ rootProject.ext {
supportSdkVersion
=
"26.0.1"
supportSdkVersion
=
"26.0.1"
minSdkVersion
=
19
minSdkVersion
=
19
targetSdkVersion
=
28
targetSdkVersion
=
28
playerVersion
=
'11.
1.1
'
playerVersion
=
'11.
2.0
'
/*
/*
在此处可以更换需要的SDK版本,替换为专业版为 com.tencent.liteav:LiteAVSDK_Professional:latest.release
在此处可以更换需要的SDK版本,替换为专业版为 com.tencent.liteav:LiteAVSDK_Professional:latest.release
其中 latest.release 可指定为自己需要的版本号,例如 "com.tencent.liteav:LiteAVSDK_Player:9.5.29035" ,写成 latest.release 则默认使用最新版本
其中 latest.release 可指定为自己需要的版本号,例如 "com.tencent.liteav:LiteAVSDK_Player:9.5.29035" ,写成 latest.release 则默认使用最新版本
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/FTXDownloadManager.java
浏览文件 @
3b15ce8f
...
@@ -19,6 +19,8 @@ import com.tencent.vod.flutter.messages.FtxMessages.PreLoadMsg;
...
@@ -19,6 +19,8 @@ import com.tencent.vod.flutter.messages.FtxMessages.PreLoadMsg;
import
com.tencent.vod.flutter.messages.FtxMessages.TXDownloadListMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXDownloadListMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterDownloadApi
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterDownloadApi
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXVodDownloadMediaMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXVodDownloadMediaMsg
;
import
com.tencent.vod.flutter.tools.CommonUtil
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.plugin.common.EventChannel
;
import
io.flutter.plugin.common.EventChannel
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -115,6 +117,8 @@ public class FTXDownloadManager implements ITXVodDownloadListener, TXFlutterDown
...
@@ -115,6 +117,8 @@ public class FTXDownloadManager implements ITXVodDownloadListener, TXFlutterDown
msg
.
setQuality
((
long
)
dataSource
.
getQuality
());
msg
.
setQuality
((
long
)
dataSource
.
getQuality
());
msg
.
setToken
(
dataSource
.
getToken
());
msg
.
setToken
(
dataSource
.
getToken
());
}
}
msg
.
setSpeed
((
long
)
mediaInfo
.
getSpeed
());
msg
.
setIsResourceBroken
(
mediaInfo
.
isResourceBroken
());
}
}
return
msg
;
return
msg
;
}
}
...
@@ -150,6 +154,8 @@ public class FTXDownloadManager implements ITXVodDownloadListener, TXFlutterDown
...
@@ -150,6 +154,8 @@ public class FTXDownloadManager implements ITXVodDownloadListener, TXFlutterDown
bundle
.
putInt
(
"quality"
,
dataSource
.
getQuality
());
bundle
.
putInt
(
"quality"
,
dataSource
.
getQuality
());
bundle
.
putString
(
"token"
,
dataSource
.
getToken
());
bundle
.
putString
(
"token"
,
dataSource
.
getToken
());
}
}
bundle
.
putInt
(
"speed"
,
mediaInfo
.
getSpeed
());
bundle
.
putBoolean
(
"isResourceBroken"
,
mediaInfo
.
isResourceBroken
());
return
bundle
;
return
bundle
;
}
}
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/FTXLivePlayer.java
浏览文件 @
3b15ce8f
...
@@ -25,6 +25,8 @@ import com.tencent.vod.flutter.messages.FtxMessages.StringPlayerMsg;
...
@@ -25,6 +25,8 @@ import com.tencent.vod.flutter.messages.FtxMessages.StringPlayerMsg;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterLivePlayerApi
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterLivePlayerApi
;
import
com.tencent.vod.flutter.model.PipResult
;
import
com.tencent.vod.flutter.model.PipResult
;
import
com.tencent.vod.flutter.model.VideoModel
;
import
com.tencent.vod.flutter.model.VideoModel
;
import
com.tencent.vod.flutter.tools.CommonUtil
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.plugin.common.EventChannel
;
import
io.flutter.plugin.common.EventChannel
;
import
io.flutter.view.TextureRegistry
;
import
io.flutter.view.TextureRegistry
;
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/FTXPIPManager.java
浏览文件 @
3b15ce8f
...
@@ -26,6 +26,7 @@ import android.util.Log;
...
@@ -26,6 +26,7 @@ import android.util.Log;
import
androidx.annotation.RequiresApi
;
import
androidx.annotation.RequiresApi
;
import
com.tencent.vod.flutter.model.PipResult
;
import
com.tencent.vod.flutter.model.PipResult
;
import
com.tencent.vod.flutter.model.VideoModel
;
import
com.tencent.vod.flutter.model.VideoModel
;
import
com.tencent.vod.flutter.tools.CommonUtil
;
import
com.tencent.vod.flutter.ui.FlutterPipImplActivity
;
import
com.tencent.vod.flutter.ui.FlutterPipImplActivity
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterPluginBinding
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterPluginBinding
;
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/FTXVodPlayer.java
浏览文件 @
3b15ce8f
...
@@ -33,6 +33,8 @@ import com.tencent.vod.flutter.messages.FtxMessages.TXPlayInfoParamsPlayerMsg;
...
@@ -33,6 +33,8 @@ import com.tencent.vod.flutter.messages.FtxMessages.TXPlayInfoParamsPlayerMsg;
import
com.tencent.vod.flutter.messages.FtxMessages.UInt8ListMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.UInt8ListMsg
;
import
com.tencent.vod.flutter.model.PipResult
;
import
com.tencent.vod.flutter.model.PipResult
;
import
com.tencent.vod.flutter.model.VideoModel
;
import
com.tencent.vod.flutter.model.VideoModel
;
import
com.tencent.vod.flutter.tools.CommonUtil
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.plugin.common.EventChannel
;
import
io.flutter.plugin.common.EventChannel
;
import
io.flutter.view.TextureRegistry
;
import
io.flutter.view.TextureRegistry
;
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/SuperPlayerPlugin.java
浏览文件 @
3b15ce8f
...
@@ -11,6 +11,7 @@ import android.content.res.Resources;
...
@@ -11,6 +11,7 @@ import android.content.res.Resources;
import
android.database.ContentObserver
;
import
android.database.ContentObserver
;
import
android.media.AudioManager
;
import
android.media.AudioManager
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.os.Looper
;
...
@@ -22,7 +23,9 @@ import android.util.SparseArray;
...
@@ -22,7 +23,9 @@ import android.util.SparseArray;
import
android.view.OrientationEventListener
;
import
android.view.OrientationEventListener
;
import
android.view.Window
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
com.tencent.rtmp.TXLiveBase
;
import
com.tencent.rtmp.TXLiveBase
;
import
com.tencent.rtmp.TXPlayerGlobalSetting
;
import
com.tencent.rtmp.TXPlayerGlobalSetting
;
import
com.tencent.vod.flutter.messages.FTXLivePlayerDispatcher
;
import
com.tencent.vod.flutter.messages.FTXLivePlayerDispatcher
;
...
@@ -37,11 +40,9 @@ import com.tencent.vod.flutter.messages.FtxMessages.TXFlutterLivePlayerApi;
...
@@ -37,11 +40,9 @@ import com.tencent.vod.flutter.messages.FtxMessages.TXFlutterLivePlayerApi;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterNativeAPI
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterNativeAPI
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterSuperPlayerPluginAPI
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterSuperPlayerPluginAPI
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterVodPlayerApi
;
import
com.tencent.vod.flutter.messages.FtxMessages.TXFlutterVodPlayerApi
;
import
com.tencent.vod.flutter.tools.CommonUtil
;
import
com.tencent.vod.flutter.ui.Android12BridgeService
;
import
com.tencent.vod.flutter.ui.Android12BridgeService
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.activity.ActivityAware
;
import
io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding
;
import
io.flutter.plugin.common.EventChannel
;
import
java.io.File
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Collection
;
import
java.util.Collection
;
...
@@ -49,6 +50,11 @@ import java.util.HashMap;
...
@@ -49,6 +50,11 @@ import java.util.HashMap;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.embedding.engine.plugins.activity.ActivityAware
;
import
io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding
;
import
io.flutter.plugin.common.EventChannel
;
/**
/**
* SuperPlayerPlugin
* SuperPlayerPlugin
* <p>
* <p>
...
@@ -337,11 +343,14 @@ public class SuperPlayerPlugin implements FlutterPlugin, ActivityAware,
...
@@ -337,11 +343,14 @@ public class SuperPlayerPlugin implements FlutterPlugin, ActivityAware,
}
}
/**
/**
* 获取最大亮度,兼容部分系统亮度最大值不是255的情况,例如MIUI上最大值被改为了上千
* 获取最大亮度,兼容MIUI部分系统亮度最大值不是255的情况.
* MIUI在android 13以后,系统最大亮度与配置不符,变为128
*
*
* @return max
* @return max
*/
*/
private
float
getBrightnessMax
()
{
private
float
getBrightnessMax
()
{
if
(
CommonUtil
.
isMIUI
())
{
if
(
Build
.
VERSION
.
SDK_INT
<
33
)
{
try
{
try
{
Resources
system
=
Resources
.
getSystem
();
Resources
system
=
Resources
.
getSystem
();
int
resId
=
system
.
getIdentifier
(
"config_screenBrightnessSettingMaximum"
,
"integer"
,
"android"
);
int
resId
=
system
.
getIdentifier
(
"config_screenBrightnessSettingMaximum"
,
"integer"
,
"android"
);
...
@@ -351,6 +360,10 @@ public class SuperPlayerPlugin implements FlutterPlugin, ActivityAware,
...
@@ -351,6 +360,10 @@ public class SuperPlayerPlugin implements FlutterPlugin, ActivityAware,
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Log
.
getStackTraceString
(
e
);
Log
.
getStackTraceString
(
e
);
}
}
}
else
{
return
128
;
}
}
return
255
F
;
return
255
F
;
}
}
...
...
Flutter/android/src/main/java/com/tencent/vod/flutter/messages/FtxMessages.java
浏览文件 @
3b15ce8f
差异被折叠。
点击展开。
Flutter/android/src/main/java/com/tencent/vod/flutter/CommonUtil.java
→
Flutter/android/src/main/java/com/tencent/vod/flutter/
tools/
CommonUtil.java
浏览文件 @
3b15ce8f
// Copyright (c) 2022 Tencent. All rights reserved.
// Copyright (c) 2022 Tencent. All rights reserved.
package
com
.
tencent
.
vod
.
flutter
;
package
com
.
tencent
.
vod
.
flutter
.
tools
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
com.tencent.rtmp.downloader.TXVodDownloadMediaInfo
;
import
com.tencent.rtmp.downloader.TXVodDownloadMediaInfo
;
import
com.tencent.vod.flutter.FTXEvent
;
import
com.tencent.vod.flutter.messages.FtxMessages.BoolMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.BoolMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.DoubleMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.DoubleMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.IntMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.IntMsg
;
...
@@ -11,9 +16,16 @@ import com.tencent.vod.flutter.messages.FtxMessages.ListMsg;
...
@@ -11,9 +16,16 @@ import com.tencent.vod.flutter.messages.FtxMessages.ListMsg;
import
com.tencent.vod.flutter.messages.FtxMessages.PlayerMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.PlayerMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.StringMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.StringMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.UInt8ListMsg
;
import
com.tencent.vod.flutter.messages.FtxMessages.UInt8ListMsg
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.Set
;
import
java.util.Set
;
/**
/**
...
@@ -21,6 +33,10 @@ import java.util.Set;
...
@@ -21,6 +33,10 @@ import java.util.Set;
*/
*/
public
class
CommonUtil
{
public
class
CommonUtil
{
private
static
final
String
TAG
=
"CommonUtil"
;
private
static
final
String
KEY_MIUI_VERSION_NAME
=
"ro.miui.ui.version.name"
;
static
final
Map
<
Integer
,
Integer
>
DOWNLOAD_STATE_MAP
=
new
HashMap
<
Integer
,
Integer
>()
{{
static
final
Map
<
Integer
,
Integer
>
DOWNLOAD_STATE_MAP
=
new
HashMap
<
Integer
,
Integer
>()
{{
put
(
TXVodDownloadMediaInfo
.
STATE_INIT
,
FTXEvent
.
EVENT_DOWNLOAD_START
);
put
(
TXVodDownloadMediaInfo
.
STATE_INIT
,
FTXEvent
.
EVENT_DOWNLOAD_START
);
put
(
TXVodDownloadMediaInfo
.
STATE_START
,
FTXEvent
.
EVENT_DOWNLOAD_PROGRESS
);
put
(
TXVodDownloadMediaInfo
.
STATE_START
,
FTXEvent
.
EVENT_DOWNLOAD_PROGRESS
);
...
@@ -29,6 +45,36 @@ public class CommonUtil {
...
@@ -29,6 +45,36 @@ public class CommonUtil {
put
(
TXVodDownloadMediaInfo
.
STATE_ERROR
,
FTXEvent
.
EVENT_DOWNLOAD_ERROR
);
put
(
TXVodDownloadMediaInfo
.
STATE_ERROR
,
FTXEvent
.
EVENT_DOWNLOAD_ERROR
);
}};
}};
public
static
boolean
isMIUI
()
{
String
pro
=
getProp
(
KEY_MIUI_VERSION_NAME
);
return
!
TextUtils
.
equals
(
pro
,
"MIUI"
);
}
public
static
String
getProp
(
String
name
)
{
String
line
=
null
;
BufferedReader
input
=
null
;
try
{
Process
p
=
Runtime
.
getRuntime
().
exec
(
"getprop "
+
name
);
input
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getInputStream
()),
1024
);
line
=
input
.
readLine
();
input
.
close
();
}
catch
(
IOException
ex
)
{
Log
.
e
(
TAG
,
"Unable to read prop "
+
name
,
ex
);
return
null
;
}
finally
{
if
(
input
!=
null
)
{
try
{
input
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
line
;
}
public
static
Map
<
String
,
Object
>
getParams
(
int
event
,
Bundle
bundle
)
{
public
static
Map
<
String
,
Object
>
getParams
(
int
event
,
Bundle
bundle
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
if
(
event
!=
0
)
{
if
(
event
!=
0
)
{
...
...
Flutter/docs/API文档.md
浏览文件 @
3b15ce8f
...
@@ -1732,6 +1732,8 @@ Future<void> startDownload(TXVodDownloadMediaInfo mediaInfo) async
...
@@ -1732,6 +1732,8 @@ Future<void> startDownload(TXVodDownloadMediaInfo mediaInfo) async
| downloadSize | int? | 文件已下载的大小,单位:byte,获得到的视频缓存会有该值,启动下载可以不赋值|
| downloadSize | int? | 文件已下载的大小,单位:byte,获得到的视频缓存会有该值,启动下载可以不赋值|
| url | String? | 需要下载的视频url,url下载必填,不支持嵌套m3u8和mp4下载|
| url | String? | 需要下载的视频url,url下载必填,不支持嵌套m3u8和mp4下载|
| dataSource | TXVodDownloadDataSource? | 需要下载的视频fileId信息,url与该参数可只使用一个|
| dataSource | TXVodDownloadDataSource? | 需要下载的视频fileId信息,url与该参数可只使用一个|
| speed | int? | 下载速度,单位:KByte/秒 |
| isResourceBroken | bool? | 资源是否已损坏, 如:资源被删除了 |
**TXVodDownloadDataSource**
**TXVodDownloadDataSource**
...
...
Flutter/docs/example运行指引.md
浏览文件 @
3b15ce8f
## 环境准备
## 环境准备
-
Flutter
2
.0 及以上版本。
-
Flutter
3
.0 及以上版本。
-
Android 端开发:
-
Android 端开发:
-
Android Studio 3.5及以上版本。
-
Android Studio 3.5及以上版本。
-
App 要求 Android 4.1及以上版本设备。
-
App 要求 Android 4.1及以上版本设备。
-
SDK 最低要求 19 以上
-
iOS 端开发:
-
iOS 端开发:
-
Xcode 11.0及以上版本。
-
Xcode 11.0及以上版本。
-
osx 系统版本要求 10.11 及以上版本
-
osx 系统版本要求 10.11 及以上版本
-
请确保您的项目已设置有效的开发者签名。
-
请确保您的项目已设置有效的开发者签名。
-
IOS 系统最低要求取决于您的flutter环境
## example下载
## example下载
...
...
Flutter/docs/集成指引.md
浏览文件 @
3b15ce8f
...
@@ -4,10 +4,12 @@
...
@@ -4,10 +4,12 @@
-
Android 端开发:
-
Android 端开发:
-
Android Studio 3.5及以上版本。
-
Android Studio 3.5及以上版本。
-
App 要求 Android 4.1及以上版本设备。
-
App 要求 Android 4.1及以上版本设备。
-
SDK 最低要求 19 以上
-
iOS 端开发:
-
iOS 端开发:
-
Xcode 11.0及以上版本。
-
Xcode 11.0及以上版本。
-
osx 系统版本要求 10.11 及以上版本
-
osx 系统版本要求 10.11 及以上版本
-
请确保您的项目已设置有效的开发者签名。
-
请确保您的项目已设置有效的开发者签名。
-
IOS 系统最低要求取决于您的flutter环境
## SDK 下载
## SDK 下载
...
@@ -282,6 +284,9 @@ pod update
...
@@ -282,6 +284,9 @@ pod update
如果问题依然存在,可以尝试删除项目build文件夹,并且手动删除你电脑中的flutter依赖缓存文件夹
`.pubcache`
。然后重新刷新flutter pub依赖再进行编译运行。
如果问题依然存在,可以尝试删除项目build文件夹,并且手动删除你电脑中的flutter依赖缓存文件夹
`.pubcache`
。然后重新刷新flutter pub依赖再进行编译运行。
10.
执行
`pod install`
或者运行项目的时候,出现错误
`CocoaPods could not find compatible versions for pod "Flutter"`
**解决方法**
:该问题是因为CocoaPods找不到对应flutter版本的插件,flutter在某些比较低或者最新的IOS系统版本可能不支持,需要修改
`Minimum Deployments`
的iOS最低版本。
## 更多功能
## 更多功能
...
...
Flutter/ios/Classes/FTXDownloadManager.m
浏览文件 @
3b15ce8f
...
@@ -152,6 +152,8 @@
...
@@ -152,6 +152,8 @@
[
dict
setValue
:
@
(
dataSource
.
quality
)
forKey
:
@"quality"
];
[
dict
setValue
:
@
(
dataSource
.
quality
)
forKey
:
@"quality"
];
[
dict
setValue
:
dataSource
.
token
forKey
:
@"token"
];
[
dict
setValue
:
dataSource
.
token
forKey
:
@"token"
];
}
}
[
dict
setValue
:
@
(
info
.
speed
)
forKey
:
@"speed"
];
[
dict
setValue
:
@
(
info
.
isResourceBroken
)
forKey
:
@"isResourceBroken"
];
}
}
return
dict
;
return
dict
;
}
}
...
@@ -262,15 +264,19 @@
...
@@ -262,15 +264,19 @@
}
}
-
(
void
)
startDownloadMsg
:
(
nonnull
TXVodDownloadMediaMsg
*
)
msg
error
:
(
FlutterError
*
_Nullable
__autoreleasing
*
_Nonnull
)
error
{
-
(
void
)
startDownloadMsg
:
(
nonnull
TXVodDownloadMediaMsg
*
)
msg
error
:
(
FlutterError
*
_Nullable
__autoreleasing
*
_Nonnull
)
error
{
if
(
nil
!=
msg
.
url
)
{
if
(
nil
!=
msg
.
url
&&
!
[
msg
.
url
isEqual
:[
NSNull
null
]]
)
{
[[
TXVodDownloadManager
shareInstance
]
startDownload
:
msg
.
userName
url
:
msg
.
url
];
[[
TXVodDownloadManager
shareInstance
]
startDownload
:
msg
.
userName
url
:
msg
.
url
];
}
else
if
(
nil
!=
msg
.
appId
&&
nil
!=
msg
.
fileId
)
{
}
else
if
(
nil
!=
msg
.
appId
&&
nil
!=
msg
.
fileId
&&
!
[
msg
.
fileId
isEqual
:[
NSNull
null
]]
)
{
TXVodDownloadDataSource
*
dataSource
=
[[
TXVodDownloadDataSource
alloc
]
init
];
TXVodDownloadDataSource
*
dataSource
=
[[
TXVodDownloadDataSource
alloc
]
init
];
dataSource
.
appId
=
[
msg
.
appId
intValue
];
dataSource
.
appId
=
[
msg
.
appId
intValue
];
dataSource
.
fileId
=
msg
.
fileId
;
dataSource
.
fileId
=
msg
.
fileId
;
dataSource
.
userName
=
msg
.
userName
;
dataSource
.
userName
=
msg
.
userName
;
dataSource
.
quality
=
[
self
optQuality
:
msg
.
quality
];
dataSource
.
quality
=
[
self
optQuality
:
msg
.
quality
];
if
(
msg
.
pSign
!=
nil
&&
[
msg
.
pSign
isEqual
:[
NSNull
null
]])
{
dataSource
.
pSign
=
nil
;
}
else
{
dataSource
.
pSign
=
msg
.
pSign
;
dataSource
.
pSign
=
msg
.
pSign
;
}
[[
TXVodDownloadManager
shareInstance
]
startDownload
:
dataSource
];
[[
TXVodDownloadManager
shareInstance
]
startDownload
:
dataSource
];
}
}
}
}
...
...
Flutter/ios/Classes/messages/FtxMessages.h
浏览文件 @
3b15ce8f
// // Copyright (c) 2022 Tencent. All rights reserved.
// // Copyright (c) 2022 Tencent. All rights reserved.
// Autogenerated from Pigeon (v9.
1.0
), do not edit directly.
// Autogenerated from Pigeon (v9.
0.7
), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// See also: https://pub.dev/packages/pigeon
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
...
@@ -202,7 +202,9 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -202,7 +202,9 @@ NS_ASSUME_NONNULL_BEGIN
fileId
:(
nullable
NSString
*
)
fileId
fileId
:(
nullable
NSString
*
)
fileId
pSign
:(
nullable
NSString
*
)
pSign
pSign
:(
nullable
NSString
*
)
pSign
quality
:(
nullable
NSNumber
*
)
quality
quality
:(
nullable
NSNumber
*
)
quality
token
:(
nullable
NSString
*
)
token
;
token
:(
nullable
NSString
*
)
token
speed
:(
nullable
NSNumber
*
)
speed
isResourceBroken
:(
nullable
NSNumber
*
)
isResourceBroken
;
/// 缓存地址
/// 缓存地址
@property
(
nonatomic
,
copy
,
nullable
)
NSString
*
playPath
;
@property
(
nonatomic
,
copy
,
nullable
)
NSString
*
playPath
;
/// 下载进度
/// 下载进度
...
@@ -234,6 +236,10 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -234,6 +236,10 @@ NS_ASSUME_NONNULL_BEGIN
@property
(
nonatomic
,
strong
,
nullable
)
NSNumber
*
quality
;
@property
(
nonatomic
,
strong
,
nullable
)
NSNumber
*
quality
;
/// 加密token
/// 加密token
@property
(
nonatomic
,
copy
,
nullable
)
NSString
*
token
;
@property
(
nonatomic
,
copy
,
nullable
)
NSString
*
token
;
/// 下载速度,单位:KByte/秒
@property
(
nonatomic
,
strong
,
nullable
)
NSNumber
*
speed
;
/// 资源是否已损坏, 如:资源被删除了
@property
(
nonatomic
,
strong
,
nullable
)
NSNumber
*
isResourceBroken
;
@end
@end
@interface
TXDownloadListMsg
:
NSObject
@interface
TXDownloadListMsg
:
NSObject
...
...
Flutter/ios/Classes/messages/FtxMessages.m
浏览文件 @
3b15ce8f
// // Copyright (c) 2022 Tencent. All rights reserved.
// // Copyright (c) 2022 Tencent. All rights reserved.
// Autogenerated from Pigeon (v9.
1.0
), do not edit directly.
// Autogenerated from Pigeon (v9.
0.7
), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// See also: https://pub.dev/packages/pigeon
#import "FtxMessages.h"
#import "FtxMessages.h"
...
@@ -604,7 +604,9 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
...
@@ -604,7 +604,9 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
fileId
:(
nullable
NSString
*
)
fileId
fileId
:(
nullable
NSString
*
)
fileId
pSign
:(
nullable
NSString
*
)
pSign
pSign
:(
nullable
NSString
*
)
pSign
quality
:(
nullable
NSNumber
*
)
quality
quality
:(
nullable
NSNumber
*
)
quality
token
:(
nullable
NSString
*
)
token
{
token
:(
nullable
NSString
*
)
token
speed
:(
nullable
NSNumber
*
)
speed
isResourceBroken
:(
nullable
NSNumber
*
)
isResourceBroken
{
TXVodDownloadMediaMsg
*
pigeonResult
=
[[
TXVodDownloadMediaMsg
alloc
]
init
];
TXVodDownloadMediaMsg
*
pigeonResult
=
[[
TXVodDownloadMediaMsg
alloc
]
init
];
pigeonResult
.
playPath
=
playPath
;
pigeonResult
.
playPath
=
playPath
;
pigeonResult
.
progress
=
progress
;
pigeonResult
.
progress
=
progress
;
...
@@ -620,6 +622,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
...
@@ -620,6 +622,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
pigeonResult
.
pSign
=
pSign
;
pigeonResult
.
pSign
=
pSign
;
pigeonResult
.
quality
=
quality
;
pigeonResult
.
quality
=
quality
;
pigeonResult
.
token
=
token
;
pigeonResult
.
token
=
token
;
pigeonResult
.
speed
=
speed
;
pigeonResult
.
isResourceBroken
=
isResourceBroken
;
return
pigeonResult
;
return
pigeonResult
;
}
}
+
(
TXVodDownloadMediaMsg
*
)
fromList
:(
NSArray
*
)
list
{
+
(
TXVodDownloadMediaMsg
*
)
fromList
:(
NSArray
*
)
list
{
...
@@ -638,6 +642,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
...
@@ -638,6 +642,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
pigeonResult
.
pSign
=
GetNullableObjectAtIndex
(
list
,
11
);
pigeonResult
.
pSign
=
GetNullableObjectAtIndex
(
list
,
11
);
pigeonResult
.
quality
=
GetNullableObjectAtIndex
(
list
,
12
);
pigeonResult
.
quality
=
GetNullableObjectAtIndex
(
list
,
12
);
pigeonResult
.
token
=
GetNullableObjectAtIndex
(
list
,
13
);
pigeonResult
.
token
=
GetNullableObjectAtIndex
(
list
,
13
);
pigeonResult
.
speed
=
GetNullableObjectAtIndex
(
list
,
14
);
pigeonResult
.
isResourceBroken
=
GetNullableObjectAtIndex
(
list
,
15
);
return
pigeonResult
;
return
pigeonResult
;
}
}
+
(
nullable
TXVodDownloadMediaMsg
*
)
nullableFromList
:(
NSArray
*
)
list
{
+
(
nullable
TXVodDownloadMediaMsg
*
)
nullableFromList
:(
NSArray
*
)
list
{
...
@@ -659,6 +665,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
...
@@ -659,6 +665,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
(
self
.
pSign
?:
[
NSNull
null
]),
(
self
.
pSign
?:
[
NSNull
null
]),
(
self
.
quality
?:
[
NSNull
null
]),
(
self
.
quality
?:
[
NSNull
null
]),
(
self
.
token
?:
[
NSNull
null
]),
(
self
.
token
?:
[
NSNull
null
]),
(
self
.
speed
?:
[
NSNull
null
]),
(
self
.
isResourceBroken
?:
[
NSNull
null
]),
];
];
}
}
@end
@end
...
...
Flutter/ios/super_player.podspec
浏览文件 @
3b15ce8f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#
#
Pod
::
Spec
.
new
do
|
s
|
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'super_player'
s
.
name
=
'super_player'
s
.
version
=
'11.
1.1
'
s
.
version
=
'11.
2.0
'
s
.
summary
=
'player plugin.'
s
.
summary
=
'player plugin.'
s
.
description
=
<<-
DESC
s
.
description
=
<<-
DESC
player plugin.
player plugin.
...
...
Flutter/lib/Core/common/common_config.dart
浏览文件 @
3b15ce8f
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
part of
SuperPlayer
;
part of
SuperPlayer
;
abstract
class
FPlayerPckInfo
{
abstract
class
FPlayerPckInfo
{
static
const
String
PLAYER_VERSION
=
"11.
1.1
"
;
static
const
String
PLAYER_VERSION
=
"11.
2.0
"
;
}
}
\ No newline at end of file
Flutter/lib/Core/pigeons/txplayer_message.dart
浏览文件 @
3b15ce8f
...
@@ -222,6 +222,10 @@ class TXVodDownloadMediaMsg {
...
@@ -222,6 +222,10 @@ class TXVodDownloadMediaMsg {
int
?
quality
;
int
?
quality
;
/// 加密token
/// 加密token
String
?
token
;
String
?
token
;
/// 下载速度,单位:KByte/秒
int
?
speed
;
/// 资源是否已损坏, 如:资源被删除了
bool
?
isResourceBroken
;
}
}
class
TXDownloadListMsg
{
class
TXDownloadListMsg
{
...
...
Flutter/lib/Core/txplayer_define.dart
浏览文件 @
3b15ce8f
...
@@ -308,6 +308,12 @@ class TXVodDownloadMediaInfo {
...
@@ -308,6 +308,12 @@ class TXVodDownloadMediaInfo {
/// </h1>
/// </h1>
String
?
url
;
String
?
url
;
/// 下载速度,单位:KByte/秒
int
?
speed
;
/// 资源是否已损坏, 如:资源被删除了
bool
?
isResourceBroken
;
/// fileId 存储
/// fileId 存储
TXVodDownloadDataSource
?
dataSource
;
TXVodDownloadDataSource
?
dataSource
;
...
@@ -325,6 +331,8 @@ class TXVodDownloadMediaInfo {
...
@@ -325,6 +331,8 @@ class TXVodDownloadMediaInfo {
json
[
"playableDuration"
]
=
playableDuration
;
json
[
"playableDuration"
]
=
playableDuration
;
json
[
"size"
]
=
size
;
json
[
"size"
]
=
size
;
json
[
"downloadSize"
]
=
downloadSize
;
json
[
"downloadSize"
]
=
downloadSize
;
json
[
"speed"
]
=
speed
;
json
[
"isResourceBroken"
]
=
isResourceBroken
;
return
json
;
return
json
;
}
}
...
@@ -336,17 +344,19 @@ class TXVodDownloadMediaInfo {
...
@@ -336,17 +344,19 @@ class TXVodDownloadMediaInfo {
msg
.
pSign
=
dataSource
!.
pSign
;
msg
.
pSign
=
dataSource
!.
pSign
;
msg
.
quality
=
dataSource
!.
quality
;
msg
.
quality
=
dataSource
!.
quality
;
msg
.
token
=
dataSource
!.
token
;
msg
.
token
=
dataSource
!.
token
;
msg
.
userName
=
dataSource
!.
userName
;
msg
.
userName
=
dataSource
!.
userName
??
"default"
;
}
}
msg
.
url
=
url
;
msg
.
url
=
url
;
msg
.
downloadState
=
downloadState
;
msg
.
downloadState
=
downloadState
;
msg
.
progress
=
progress
;
msg
.
progress
=
progress
;
msg
.
playPath
=
playPath
;
msg
.
playPath
=
playPath
;
msg
.
userName
=
userName
;
msg
.
userName
=
userName
??
"default"
;
msg
.
duration
=
duration
;
msg
.
duration
=
duration
;
msg
.
playableDuration
=
playableDuration
;
msg
.
playableDuration
=
playableDuration
;
msg
.
size
=
size
;
msg
.
size
=
size
;
msg
.
downloadSize
=
downloadSize
;
msg
.
downloadSize
=
downloadSize
;
msg
.
speed
=
speed
;
msg
.
isResourceBroken
=
isResourceBroken
;
return
msg
;
return
msg
;
}
}
}
}
...
...
Flutter/lib/Core/txplayer_messages.dart
浏览文件 @
3b15ce8f
...
@@ -502,6 +502,8 @@ class TXVodDownloadMediaMsg {
...
@@ -502,6 +502,8 @@ class TXVodDownloadMediaMsg {
this
.
pSign
,
this
.
pSign
,
this
.
quality
,
this
.
quality
,
this
.
token
,
this
.
token
,
this
.
speed
,
this
.
isResourceBroken
,
});
});
/// 缓存地址
/// 缓存地址
...
@@ -549,6 +551,12 @@ class TXVodDownloadMediaMsg {
...
@@ -549,6 +551,12 @@ class TXVodDownloadMediaMsg {
/// 加密token
/// 加密token
String
?
token
;
String
?
token
;
/// 下载速度,单位:KByte/秒
int
?
speed
;
/// 资源是否已损坏, 如:资源被删除了
bool
?
isResourceBroken
;
Object
encode
()
{
Object
encode
()
{
return
<
Object
?>[
return
<
Object
?>[
playPath
,
playPath
,
...
@@ -565,6 +573,8 @@ class TXVodDownloadMediaMsg {
...
@@ -565,6 +573,8 @@ class TXVodDownloadMediaMsg {
pSign
,
pSign
,
quality
,
quality
,
token
,
token
,
speed
,
isResourceBroken
,
];
];
}
}
...
@@ -585,6 +595,8 @@ class TXVodDownloadMediaMsg {
...
@@ -585,6 +595,8 @@ class TXVodDownloadMediaMsg {
pSign:
result
[
11
]
as
String
?,
pSign:
result
[
11
]
as
String
?,
quality:
result
[
12
]
as
int
?,
quality:
result
[
12
]
as
int
?,
token:
result
[
13
]
as
String
?,
token:
result
[
13
]
as
String
?,
speed:
result
[
14
]
as
int
?,
isResourceBroken:
result
[
15
]
as
bool
?,
);
);
}
}
}
}
...
...
Flutter/lib/Core/txvoddownload_controller.dart
浏览文件 @
3b15ce8f
...
@@ -146,6 +146,9 @@ class TXVodDownloadController {
...
@@ -146,6 +146,9 @@ class TXVodDownloadController {
dataSource
.
quality
=
map
[
"quality"
];
dataSource
.
quality
=
map
[
"quality"
];
medialnfo
.
dataSource
=
dataSource
;
medialnfo
.
dataSource
=
dataSource
;
}
}
medialnfo
.
speed
=
map
[
"speed"
];
medialnfo
.
isResourceBroken
=
map
[
"isResourceBroken"
];
return
medialnfo
;
return
medialnfo
;
}
}
...
...
Flutter/pubspec.yaml
浏览文件 @
3b15ce8f
name
:
super_player
name
:
super_player
description
:
player plugin.
description
:
player plugin.
version
:
11.
1.1
version
:
11.
2.0
author
:
author
:
homepage
:
homepage
:
...
...
Flutter/superplayer_widget/pubspec.yaml
浏览文件 @
3b15ce8f
name
:
superplayer_widget
name
:
superplayer_widget
description
:
superplayer,base on vodplayer
description
:
superplayer,base on vodplayer
version
:
"
11.
1.1
"
version
:
"
11.
2.0
"
environment
:
environment
:
sdk
:
'
>=2.17.0
<4.0.0'
sdk
:
'
>=2.17.0
<4.0.0'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论