File tree Expand file tree Collapse file tree 7 files changed +20
-2
lines changed
SuperPlayerDemo/SuperPlayer
SuperPlayerKit/SuperPlayer
Resource/SuperPlayerKitBundle.bundle Expand file tree Collapse file tree 7 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 121121 EDC1B2C02847C9A60077A920 /* VideoCacheListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC1B2AE2847C9A60077A920 /* VideoCacheListCell.m */; };
122122 EDC1B2C12847C9A60077A920 /* VideoCacheListView.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC1B2AF2847C9A60077A920 /* VideoCacheListView.m */; };
123123 EDC1B2C22847C9A60077A920 /* VideoCacheListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC1B2B32847C9A60077A920 /* VideoCacheListModel.m */; };
124+ EDF0D82929A8BC4600EA1238 /* SuperPlayerKitBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = ED59415D2938C908006FFA17 /* SuperPlayerKitBundle.bundle */; };
124125/* End PBXBuildFile section */
125126
126127/* Begin PBXContainerItemProxy section */
13241325 47E8C8CC260AECC4001CF672 /* TRTCDemoLocalized.strings in Resources */,
13251326 4009235A1F4FCC6E009B882D /* LaunchScreen.storyboard in Resources */,
13261327 47642A9F261491B90020F1BA /* launchimage_en@3x.png in Resources */,
1328+ EDF0D82929A8BC4600EA1238 /* SuperPlayerKitBundle.bundle in Resources */,
13271329 47E8C8D9260AECC4001CF672 /* LivePlayerLocalized.strings in Resources */,
13281330 6BF315D4271E715300D4A72C /* ShortVideo.xcassets in Resources */,
13291331 40A7CFF02461102E00E792A5 /* SuperPlayer.bundle in Resources */,
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ - (int)getplayinfo:(NSInteger)appId fileId:(NSString *)fileId psign:(NSString *)
3131 }
3232
3333 NSMutableDictionary *params = [NSMutableDictionary new ];
34+
35+ // V4协议子版本号,值为1标识为V4.1版本
36+ params[@" subversion" ] = @" 1" ;
3437
3538 if (psign) {
3639 params[@" psign" ] = psign;
Original file line number Diff line number Diff line change 1515
1616 NSString *preferredLang = [languages objectAtIndex: 0 ]; // zh-Hant-GB
1717 NSString *languageProj = [preferredLang stringByReplacingOccurrencesOfString: @" -GB" withString: @" " ];
18+ languageProj = [languageProj stringByReplacingOccurrencesOfString: @" -CN" withString: @" " ];
1819 NSString *resourceDict = [[NSBundle mainBundle ] pathForResource: @" SuperPlayerKitBundle" ofType: @" bundle" ];
1920 if (resourceDict.length == 0 ) { // 资源Bundle文件目录
2021 return key;
Original file line number Diff line number Diff line change 2929"SuperPlayer.tryagain" = "Try Again";
3030"SuperPlayer.backtolive" = "Back to Live Streaming";
3131"SuperPlayer.notsupportpip" = "This device does not support picture-in-picture";
32+ "SuperPlayerDemo.MoviePlayer.multitrackvideo" = "multi track video";
33+ "SuperPlayerDemo.MoviePlayer.multisubtitledvideo" = "multi subtitled video";
Original file line number Diff line number Diff line change 2828"SuperPlayer.tryagain" = "重新试看";
2929"SuperPlayer.backtolive" = "返回直播";
3030"SuperPlayer.notsupportpip" = "该设备不支持画中画";
31+ "SuperPlayerDemo.MoviePlayer.multitrackvideo" = "多音轨视频";
32+ "SuperPlayerDemo.MoviePlayer.multisubtitledvideo" = "多字幕视频";
Original file line number Diff line number Diff line change @@ -533,7 +533,11 @@ - (void)setOrientationPortraitConstraint {
533533 self.trackView .hidden = YES ;
534534 self.subtitlesView .hidden = YES ;
535535 self.resolutionView .hidden = YES ;
536-
536+ [self .nextBtn mas_remakeConstraints: ^(MASConstraintMaker *make) {
537+ make.trailing .equalTo (self.bottomImageView .mas_trailing ).offset (-35 );
538+ make.centerY .equalTo (self.startBtn .mas_centerY );
539+ make.width .height .mas_equalTo (30 );
540+ }];
537541 [self .totalTimeLabel mas_remakeConstraints: ^(MASConstraintMaker *make) {
538542 if (!self.nextBtn .hidden ) {
539543 make.trailing .equalTo (self.nextBtn .mas_leading );
Original file line number Diff line number Diff line change @@ -953,6 +953,11 @@ - (void)prepareAutoplay {
953953 if ([self .delegate respondsToSelector: @selector (superPlayerDidStart: )]) {
954954 [self .delegate superPlayerDidStart: self ];
955955 }
956+
957+ // 重新添加字幕
958+ if (self->_lastSubtitleIndex != -1 ) {
959+ [self .vodPlayer selectTrack: self ->_lastSubtitleIndex];
960+ }
956961}
957962
958963- (NSArray <NSURL *> *)convertImageSpriteList : (NSArray <NSString *> *)imageSpriteList
@@ -2104,7 +2109,6 @@ - (void)controlViewSwitch:(UIView *)controlView withSubtitlesInfo:(TXTrackInfo *
21042109- (void )_removeOldPlayer {
21052110 for (UIView *w in [self subviews ]) {
21062111 if ([w isKindOfClass: NSClassFromString (@" TXCRenderView" )]) [w removeFromSuperview ];
2107- if ([w isKindOfClass: NSClassFromString (@" TXCiOSVideoRenderView" )]) [w removeFromSuperview ];
21082112 if ([w isKindOfClass: NSClassFromString (@" TXIJKSDLGLView" )]) [w removeFromSuperview ];
21092113 if ([w isKindOfClass: NSClassFromString (@" TXCAVPlayerView" )]) [w removeFromSuperview ];
21102114 if ([w isKindOfClass: NSClassFromString (@" TXCThumbPlayerView" )]) [w removeFromSuperview ];
You can’t perform that action at this time.
0 commit comments