Skip to content

Commit 0ff875e

Browse files
author
kongdywang
committed
1. Pre-download supports httpHeader.
2. Supports encrypted playback of MP4. 3. Added support for HEVC playback downgrade. 4. Fix an issue that some API callbacks have no parameters.
1 parent 4110e14 commit 0ff875e

25 files changed

+228
-102
lines changed

Flutter/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,15 @@ Professional 分支:Android & iOS 端集成TXLiteAVSDK_Professional lastest版
250250
- set iOS TXLiteAVSDK_Professional to 12.1.16597, tag:release_pro_v12.1.0
251251
- Fix the issue of reversed logic in the live streaming mute method.
252252
- iOS adds support for Picture-in-Picture for live streaming, which requires premium permission to use.
253+
- Fix other known issues.
254+
255+
#### Version: 12.2.0 2024.12.04
256+
257+
##### Features:
258+
259+
- set Android TXLiteAVSDK_Professional to 12.2.0.15065,tag:release_pro_v12.2.0
260+
- set iOS TXLiteAVSDK_Professional to 12.2.16945, tag:release_pro_v12.2.0
261+
- Pre-download supports httpHeader
262+
- Supports encrypted playback of MP4
263+
- Added support for HEVC playback downgrade
253264
- Fix other known issues.

Flutter/CI/buildVersionOnMac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildLog() {
55
}
66

77
inputVersion=$1
8-
export VERSION_NAME="12.1.0"
8+
export VERSION_NAME="12.2.0"
99
if [ -n "$inputVersion" ]; then
1010
VERSION_NAME=$inputVersion
1111
fi

Flutter/android/config.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rootProject.ext {
44
supportSdkVersion = "26.0.1"
55
minSdkVersion = 19
66
targetSdkVersion = 28
7-
playerVersion = '12.1.0'
7+
playerVersion = '12.2.0'
88
compat = "androidx.appcompat:appcompat:1.6.1"
99

1010
/**
@@ -14,5 +14,5 @@ rootProject.ext {
1414
Professional SDK: liteavSdk="com.tencent.liteav:LiteAVSDK_Professional:latest.release"
1515
If you want to specify the SDK version(eg 11.7.0.13946), use: liteavSdk="com.tencent.liteav:LiteAVSDK_Player:11.7.0.13946"
1616
*/
17-
liteavSdk="com.tencent.liteav:LiteAVSDK_Professional:12.0.0.14689"
17+
liteavSdk="com.tencent.liteav:LiteAVSDK_Professional:12.2.0.15065"
1818
}

Flutter/android/src/main/java/com/tencent/vod/flutter/FTXDownloadManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ public void run() {
316316
int appId = msg.getAppId() != null ? msg.getAppId().intValue() : 0;
317317
txPlayInfoParams = new TXPlayInfoParams(appId, msg.getFileId(), msg.getPSign());
318318
}
319+
if (msg.getHttpHeader() != null) {
320+
txPlayInfoParams.setHeaders(msg.getHttpHeader());
321+
}
319322
final TXVodPreloadManager downloadManager =
320323
TXVodPreloadManager.getInstance(mFlutterPluginBinding.getApplicationContext());
321324
float preloadSizeMB = msg.getPreloadSizeMB() != null ? msg.getPreloadSizeMB().floatValue() : 0;

Flutter/android/src/main/java/com/tencent/vod/flutter/FTXTransformation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public static TXVodPlayConfig transformToVodConfig(FTXVodPlayConfigPlayerMsg con
7676
playConfig.setPreferredResolution(configPlayerMsg.getPreferredResolution());
7777
}
7878
playConfig.setMediaType(configPlayerMsg.getMediaType().intValue());
79+
playConfig.setEncryptedMp4Level(configPlayerMsg.getEncryptedMp4Level().intValue());
7980
return playConfig;
8081
}
8182

Flutter/android/src/main/java/com/tencent/vod/flutter/FTXVodPlayer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ protected long init(boolean onlyAudio) {
255255
mVodPlayer.setVodSubtitleDataListener(new ITXVodPlayListener.ITXVodSubtitleDataListener() {
256256
@Override
257257
public void onSubtitleData(TXVodDef.TXVodSubtitleData sub) {
258+
LiteavLog.i(TAG, "callback subtitle"
259+
+ " ,index:" + sub.trackIndex
260+
+ " ,startMs:" + sub.startPositionMs
261+
+ " ,durationMs:" + sub.durationMs
262+
+ " ,content:" + sub.subtitleData
263+
);
258264
Bundle bundle = new Bundle();
259265
bundle.putString(FTXEvent.EXTRA_SUBTITLE_DATA, sub.subtitleData);
260266
bundle.putLong(FTXEvent.EXTRA_SUBTITLE_START_POSITION_MS, sub.startPositionMs);

Flutter/android/src/main/java/com/tencent/vod/flutter/messages/FtxMessages.java

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2022 Tencent. All rights reserved.
2-
// Autogenerated from Pigeon (v22.6.0), do not edit directly.
2+
// Autogenerated from Pigeon (v22.6.1), do not edit directly.
33
// See also: https://pub.dev/packages/pigeon
44

55
package com.tencent.vod.flutter.messages;
@@ -1374,17 +1374,28 @@ public void setMediaType(@Nullable Long setterArg) {
13741374
this.mediaType = setterArg;
13751375
}
13761376

1377+
/** MP4 encryption playback: Supported since version 12.2. */
1378+
private @Nullable Long encryptedMp4Level;
1379+
1380+
public @Nullable Long getEncryptedMp4Level() {
1381+
return encryptedMp4Level;
1382+
}
1383+
1384+
public void setEncryptedMp4Level(@Nullable Long setterArg) {
1385+
this.encryptedMp4Level = setterArg;
1386+
}
1387+
13771388
@Override
13781389
public boolean equals(Object o) {
13791390
if (this == o) { return true; }
13801391
if (o == null || getClass() != o.getClass()) { return false; }
13811392
FTXVodPlayConfigPlayerMsg that = (FTXVodPlayConfigPlayerMsg) o;
1382-
return Objects.equals(playerId, that.playerId) && Objects.equals(connectRetryCount, that.connectRetryCount) && Objects.equals(connectRetryInterval, that.connectRetryInterval) && Objects.equals(timeout, that.timeout) && Objects.equals(playerType, that.playerType) && Objects.equals(headers, that.headers) && Objects.equals(enableAccurateSeek, that.enableAccurateSeek) && Objects.equals(autoRotate, that.autoRotate) && Objects.equals(smoothSwitchBitrate, that.smoothSwitchBitrate) && Objects.equals(cacheMp4ExtName, that.cacheMp4ExtName) && Objects.equals(progressInterval, that.progressInterval) && Objects.equals(maxBufferSize, that.maxBufferSize) && Objects.equals(maxPreloadSize, that.maxPreloadSize) && Objects.equals(firstStartPlayBufferTime, that.firstStartPlayBufferTime) && Objects.equals(nextStartPlayBufferTime, that.nextStartPlayBufferTime) && Objects.equals(overlayKey, that.overlayKey) && Objects.equals(overlayIv, that.overlayIv) && Objects.equals(extInfoMap, that.extInfoMap) && Objects.equals(enableRenderProcess, that.enableRenderProcess) && Objects.equals(preferredResolution, that.preferredResolution) && Objects.equals(mediaType, that.mediaType);
1393+
return Objects.equals(playerId, that.playerId) && Objects.equals(connectRetryCount, that.connectRetryCount) && Objects.equals(connectRetryInterval, that.connectRetryInterval) && Objects.equals(timeout, that.timeout) && Objects.equals(playerType, that.playerType) && Objects.equals(headers, that.headers) && Objects.equals(enableAccurateSeek, that.enableAccurateSeek) && Objects.equals(autoRotate, that.autoRotate) && Objects.equals(smoothSwitchBitrate, that.smoothSwitchBitrate) && Objects.equals(cacheMp4ExtName, that.cacheMp4ExtName) && Objects.equals(progressInterval, that.progressInterval) && Objects.equals(maxBufferSize, that.maxBufferSize) && Objects.equals(maxPreloadSize, that.maxPreloadSize) && Objects.equals(firstStartPlayBufferTime, that.firstStartPlayBufferTime) && Objects.equals(nextStartPlayBufferTime, that.nextStartPlayBufferTime) && Objects.equals(overlayKey, that.overlayKey) && Objects.equals(overlayIv, that.overlayIv) && Objects.equals(extInfoMap, that.extInfoMap) && Objects.equals(enableRenderProcess, that.enableRenderProcess) && Objects.equals(preferredResolution, that.preferredResolution) && Objects.equals(mediaType, that.mediaType) && Objects.equals(encryptedMp4Level, that.encryptedMp4Level);
13831394
}
13841395

13851396
@Override
13861397
public int hashCode() {
1387-
return Objects.hash(playerId, connectRetryCount, connectRetryInterval, timeout, playerType, headers, enableAccurateSeek, autoRotate, smoothSwitchBitrate, cacheMp4ExtName, progressInterval, maxBufferSize, maxPreloadSize, firstStartPlayBufferTime, nextStartPlayBufferTime, overlayKey, overlayIv, extInfoMap, enableRenderProcess, preferredResolution, mediaType);
1398+
return Objects.hash(playerId, connectRetryCount, connectRetryInterval, timeout, playerType, headers, enableAccurateSeek, autoRotate, smoothSwitchBitrate, cacheMp4ExtName, progressInterval, maxBufferSize, maxPreloadSize, firstStartPlayBufferTime, nextStartPlayBufferTime, overlayKey, overlayIv, extInfoMap, enableRenderProcess, preferredResolution, mediaType, encryptedMp4Level);
13881399
}
13891400

13901401
public static final class Builder {
@@ -1557,6 +1568,14 @@ public static final class Builder {
15571568
return this;
15581569
}
15591570

1571+
private @Nullable Long encryptedMp4Level;
1572+
1573+
@CanIgnoreReturnValue
1574+
public @NonNull Builder setEncryptedMp4Level(@Nullable Long setterArg) {
1575+
this.encryptedMp4Level = setterArg;
1576+
return this;
1577+
}
1578+
15601579
public @NonNull FTXVodPlayConfigPlayerMsg build() {
15611580
FTXVodPlayConfigPlayerMsg pigeonReturn = new FTXVodPlayConfigPlayerMsg();
15621581
pigeonReturn.setPlayerId(playerId);
@@ -1580,13 +1599,14 @@ public static final class Builder {
15801599
pigeonReturn.setEnableRenderProcess(enableRenderProcess);
15811600
pigeonReturn.setPreferredResolution(preferredResolution);
15821601
pigeonReturn.setMediaType(mediaType);
1602+
pigeonReturn.setEncryptedMp4Level(encryptedMp4Level);
15831603
return pigeonReturn;
15841604
}
15851605
}
15861606

15871607
@NonNull
15881608
ArrayList<Object> toList() {
1589-
ArrayList<Object> toListResult = new ArrayList<>(21);
1609+
ArrayList<Object> toListResult = new ArrayList<>(22);
15901610
toListResult.add(playerId);
15911611
toListResult.add(connectRetryCount);
15921612
toListResult.add(connectRetryInterval);
@@ -1608,6 +1628,7 @@ ArrayList<Object> toList() {
16081628
toListResult.add(enableRenderProcess);
16091629
toListResult.add(preferredResolution);
16101630
toListResult.add(mediaType);
1631+
toListResult.add(encryptedMp4Level);
16111632
return toListResult;
16121633
}
16131634

@@ -1655,6 +1676,8 @@ ArrayList<Object> toList() {
16551676
pigeonResult.setPreferredResolution((Long) preferredResolution);
16561677
Object mediaType = pigeonVar_list.get(20);
16571678
pigeonResult.setMediaType((Long) mediaType);
1679+
Object encryptedMp4Level = pigeonVar_list.get(21);
1680+
pigeonResult.setEncryptedMp4Level((Long) encryptedMp4Level);
16581681
return pigeonResult;
16591682
}
16601683
}
@@ -3019,17 +3042,27 @@ public void setTmpPreloadTaskId(@Nullable Long setterArg) {
30193042
this.tmpPreloadTaskId = setterArg;
30203043
}
30213044

3045+
private @Nullable Map<String, String> httpHeader;
3046+
3047+
public @Nullable Map<String, String> getHttpHeader() {
3048+
return httpHeader;
3049+
}
3050+
3051+
public void setHttpHeader(@Nullable Map<String, String> setterArg) {
3052+
this.httpHeader = setterArg;
3053+
}
3054+
30223055
@Override
30233056
public boolean equals(Object o) {
30243057
if (this == o) { return true; }
30253058
if (o == null || getClass() != o.getClass()) { return false; }
30263059
PreLoadInfoMsg that = (PreLoadInfoMsg) o;
3027-
return Objects.equals(appId, that.appId) && Objects.equals(fileId, that.fileId) && Objects.equals(pSign, that.pSign) && Objects.equals(playUrl, that.playUrl) && Objects.equals(preloadSizeMB, that.preloadSizeMB) && Objects.equals(preferredResolution, that.preferredResolution) && Objects.equals(tmpPreloadTaskId, that.tmpPreloadTaskId);
3060+
return Objects.equals(appId, that.appId) && Objects.equals(fileId, that.fileId) && Objects.equals(pSign, that.pSign) && Objects.equals(playUrl, that.playUrl) && Objects.equals(preloadSizeMB, that.preloadSizeMB) && Objects.equals(preferredResolution, that.preferredResolution) && Objects.equals(tmpPreloadTaskId, that.tmpPreloadTaskId) && Objects.equals(httpHeader, that.httpHeader);
30283061
}
30293062

30303063
@Override
30313064
public int hashCode() {
3032-
return Objects.hash(appId, fileId, pSign, playUrl, preloadSizeMB, preferredResolution, tmpPreloadTaskId);
3065+
return Objects.hash(appId, fileId, pSign, playUrl, preloadSizeMB, preferredResolution, tmpPreloadTaskId, httpHeader);
30333066
}
30343067

30353068
public static final class Builder {
@@ -3090,6 +3123,14 @@ public static final class Builder {
30903123
return this;
30913124
}
30923125

3126+
private @Nullable Map<String, String> httpHeader;
3127+
3128+
@CanIgnoreReturnValue
3129+
public @NonNull Builder setHttpHeader(@Nullable Map<String, String> setterArg) {
3130+
this.httpHeader = setterArg;
3131+
return this;
3132+
}
3133+
30933134
public @NonNull PreLoadInfoMsg build() {
30943135
PreLoadInfoMsg pigeonReturn = new PreLoadInfoMsg();
30953136
pigeonReturn.setAppId(appId);
@@ -3099,20 +3140,22 @@ public static final class Builder {
30993140
pigeonReturn.setPreloadSizeMB(preloadSizeMB);
31003141
pigeonReturn.setPreferredResolution(preferredResolution);
31013142
pigeonReturn.setTmpPreloadTaskId(tmpPreloadTaskId);
3143+
pigeonReturn.setHttpHeader(httpHeader);
31023144
return pigeonReturn;
31033145
}
31043146
}
31053147

31063148
@NonNull
31073149
ArrayList<Object> toList() {
3108-
ArrayList<Object> toListResult = new ArrayList<>(7);
3150+
ArrayList<Object> toListResult = new ArrayList<>(8);
31093151
toListResult.add(appId);
31103152
toListResult.add(fileId);
31113153
toListResult.add(pSign);
31123154
toListResult.add(playUrl);
31133155
toListResult.add(preloadSizeMB);
31143156
toListResult.add(preferredResolution);
31153157
toListResult.add(tmpPreloadTaskId);
3158+
toListResult.add(httpHeader);
31163159
return toListResult;
31173160
}
31183161

@@ -3132,6 +3175,8 @@ ArrayList<Object> toList() {
31323175
pigeonResult.setPreferredResolution((Long) preferredResolution);
31333176
Object tmpPreloadTaskId = pigeonVar_list.get(6);
31343177
pigeonResult.setTmpPreloadTaskId((Long) tmpPreloadTaskId);
3178+
Object httpHeader = pigeonVar_list.get(7);
3179+
pigeonResult.setHttpHeader((Map<String, String>) httpHeader);
31353180
return pigeonResult;
31363181
}
31373182
}

Flutter/android/src/main/java/com/tencent/vod/flutter/tools/TXCommonUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ public static Map<String, Object> getParams(int event, Bundle bundle) {
9999
Set<String> keySet = bundle.keySet();
100100
for (String key : keySet) {
101101
Object val = bundle.get(key);
102-
param.put(key, val);
102+
if (null != val) {
103+
param.put(key, val);
104+
}
103105
}
104106
}
105107

0 commit comments

Comments
 (0)