Skip to content

Commit e93d671

Browse files
author
ccharlesren
committed
验证h265云存播放兼容,添加loading弹框
Change-Id: I707111a8a0071a78ada97abcdd9b580c58271ab1
1 parent 4afa4f1 commit e93d671

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

Source/LinkSDKDemo/Video/PlayBack/CloudStorage/Controller/TIoTCloudStorageVC.m

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,11 @@ - (void)getFullVideoURLWithPartURL:(NSString *)videoPartURL withTime:(TIoTDemoCl
446446
[[TIoTCoreDeviceSet shared] requestVideoOrExploreDataWithParam:paramDic action:GenerateSignedVideoURL vidowOrExploreHost:TIotApiHostVideo success:^(id _Nonnull responseObject) {
447447
TIoTDemoCloudStoreFullVideoUrl *fullVideoURl = [TIoTDemoCloudStoreFullVideoUrl yy_modelWithJSON:responseObject];
448448
NSLog(@"--fullVideoURL--%@",fullVideoURl.SignedVideoURL);
449-
449+
450+
if (timeModel.EndTime.integerValue == 0 || [NSString isNullOrNilWithObject:timeModel.EndTime]) {
451+
[MBProgressHUD showError:@"视频连接有误"];
452+
}
453+
450454
if (isChange == YES) {
451455
self.videoTimeModel = [[TIoTDemoCloudEventModel alloc]init];
452456
self.videoTimeModel.StartTime = timeModel.StartTime;
@@ -462,15 +466,17 @@ - (void)getFullVideoURLWithPartURL:(NSString *)videoPartURL withTime:(TIoTDemoCl
462466
[self.player play];
463467
[self autoHideControlView];
464468
}
465-
469+
[MBProgressHUD dismissInView:self.view];
466470
} failure:^(NSString * _Nullable reason, NSError * _Nullable error, NSDictionary * _Nullable dic) {
467-
471+
[MBProgressHUD dismissInView:self.view];
468472
}];
469473
}
470474

471475
///MARK: 云存事件列表
472476
- (void)requestCloudStoreVideoList {
473477

478+
[MBProgressHUD showLodingNoneEnabledInView:self.view withMessage:@""];
479+
474480
NSString *startString = [NSString stringWithFormat:@"%@ 00:00:00",self.currentDayTime?:@""];
475481
NSString *endString = [NSString stringWithFormat:@"%@ 23:59:59",self.currentDayTime?:@""];
476482
NSString *startTimestampString = [NSString getTimeStampWithString:startString withFormatter:@"YYYY-MM-dd HH:mm:ss" withTimezone:@""];
@@ -496,7 +502,7 @@ - (void)requestCloudStoreVideoList {
496502
self.isInnerScroll = NO;
497503
self.isPause = NO;
498504
// [self getFullVideoURLWithPartURL:self.listModel.VideoURL?:@"" withTime:self.dataArray[0] isChangeModel:YES];
499-
[self setScrollOffsetWith:self.dataArray[0]];
505+
[self setScrollOffsetWith:self.dataArray.lastObject];
500506

501507
[self.tableView reloadData];
502508

@@ -510,7 +516,7 @@ - (void)requestCloudStoreVideoList {
510516
}
511517

512518
} failure:^(NSString * _Nullable reason, NSError * _Nullable error, NSDictionary * _Nullable dic) {
513-
519+
[MBProgressHUD dismissInView:self.view];
514520
}];
515521
}
516522

@@ -765,6 +771,7 @@ - (void)playVideo:(UIButton *)button {
765771
[self.player play];
766772
[self autoHideControlView];
767773
}
774+
[MBProgressHUD showLodingNoneEnabledInView:self.view withMessage:@""];
768775
}
769776

770777
///MARK: 设置播放器样式
@@ -1130,6 +1137,7 @@ - (void)moviePlayBackStateDidChange:(NSNotification*)notification
11301137
self.player.currentPlaybackTime = self.currentTime;
11311138
}
11321139
[self startPlayVideoWithStartTime:self.videoTimeModel.StartTime.integerValue endTime:self.videoTimeModel.EndTime.integerValue sliderValue:self.currentTime];
1140+
[MBProgressHUD dismissInView:self.view];
11331141
break;
11341142
}
11351143
case IJKMPMoviePlaybackStatePaused: {

0 commit comments

Comments
 (0)