Skip to content

Commit

Permalink
1、Upgrade SDK to solve the UI problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ianyanzhang committed Feb 24, 2023
1 parent b4b9f85 commit 57918f3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Demo/TXLiteAVDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
EDC1B2C02847C9A60077A920 /* VideoCacheListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC1B2AE2847C9A60077A920 /* VideoCacheListCell.m */; };
EDC1B2C12847C9A60077A920 /* VideoCacheListView.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC1B2AF2847C9A60077A920 /* VideoCacheListView.m */; };
EDC1B2C22847C9A60077A920 /* VideoCacheListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC1B2B32847C9A60077A920 /* VideoCacheListModel.m */; };
EDF0D82929A8BC4600EA1238 /* SuperPlayerKitBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = ED59415D2938C908006FFA17 /* SuperPlayerKitBundle.bundle */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -1324,6 +1325,7 @@
47E8C8CC260AECC4001CF672 /* TRTCDemoLocalized.strings in Resources */,
4009235A1F4FCC6E009B882D /* LaunchScreen.storyboard in Resources */,
47642A9F261491B90020F1BA /* [email protected] in Resources */,
EDF0D82929A8BC4600EA1238 /* SuperPlayerKitBundle.bundle in Resources */,
47E8C8D9260AECC4001CF672 /* LivePlayerLocalized.strings in Resources */,
6BF315D4271E715300D4A72C /* ShortVideo.xcassets in Resources */,
40A7CFF02461102E00E792A5 /* SuperPlayer.bundle in Resources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ - (int)getplayinfo:(NSInteger)appId fileId:(NSString *)fileId psign:(NSString *)
}

NSMutableDictionary *params = [NSMutableDictionary new];

// V4协议子版本号,值为1标识为V4.1版本
params[@"subversion"] = @"1";

if (psign) {
params[@"psign"] = psign;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

NSString *preferredLang = [languages objectAtIndex:0]; // zh-Hant-GB
NSString *languageProj = [preferredLang stringByReplacingOccurrencesOfString:@"-GB" withString:@""];
languageProj = [languageProj stringByReplacingOccurrencesOfString:@"-CN" withString:@""];
NSString *resourceDict = [[NSBundle mainBundle] pathForResource:@"SuperPlayerKitBundle" ofType:@"bundle"];
if (resourceDict.length == 0) { // 资源Bundle文件目录
return key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
"SuperPlayer.tryagain" = "Try Again";
"SuperPlayer.backtolive" = "Back to Live Streaming";
"SuperPlayer.notsupportpip" = "This device does not support picture-in-picture";
"SuperPlayerDemo.MoviePlayer.multitrackvideo" = "multi track video";
"SuperPlayerDemo.MoviePlayer.multisubtitledvideo" = "multi subtitled video";
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@
"SuperPlayer.tryagain" = "重新试看";
"SuperPlayer.backtolive" = "返回直播";
"SuperPlayer.notsupportpip" = "该设备不支持画中画";
"SuperPlayerDemo.MoviePlayer.multitrackvideo" = "多音轨视频";
"SuperPlayerDemo.MoviePlayer.multisubtitledvideo" = "多字幕视频";
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,11 @@ - (void)setOrientationPortraitConstraint {
self.trackView.hidden = YES;
self.subtitlesView.hidden = YES;
self.resolutionView.hidden = YES;

[self.nextBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.trailing.equalTo(self.bottomImageView.mas_trailing).offset(-35);
make.centerY.equalTo(self.startBtn.mas_centerY);
make.width.height.mas_equalTo(30);
}];
[self.totalTimeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
if (!self.nextBtn.hidden) {
make.trailing.equalTo(self.nextBtn.mas_leading);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,11 @@ - (void)prepareAutoplay {
if ([self.delegate respondsToSelector:@selector(superPlayerDidStart:)]) {
[self.delegate superPlayerDidStart:self];
}

// 重新添加字幕
if (self->_lastSubtitleIndex != -1) {
[self.vodPlayer selectTrack:self->_lastSubtitleIndex];
}
}

- (NSArray<NSURL *> *)convertImageSpriteList:(NSArray<NSString *> *)imageSpriteList
Expand Down Expand Up @@ -2104,7 +2109,6 @@ - (void)controlViewSwitch:(UIView *)controlView withSubtitlesInfo:(TXTrackInfo *
- (void)_removeOldPlayer {
for (UIView *w in [self subviews]) {
if ([w isKindOfClass:NSClassFromString(@"TXCRenderView")]) [w removeFromSuperview];
if ([w isKindOfClass:NSClassFromString(@"TXCiOSVideoRenderView")]) [w removeFromSuperview];
if ([w isKindOfClass:NSClassFromString(@"TXIJKSDLGLView")]) [w removeFromSuperview];
if ([w isKindOfClass:NSClassFromString(@"TXCAVPlayerView")]) [w removeFromSuperview];
if ([w isKindOfClass:NSClassFromString(@"TXCThumbPlayerView")]) [w removeFromSuperview];
Expand Down

0 comments on commit 57918f3

Please sign in to comment.