|
|
@@ -68,6 +68,15 @@
|
|
|
|
|
|
// self.player.orientationObserver.supportInterfaceOrientation = ZFInterfaceOrientationMaskLandscape;
|
|
|
// [self.player rotateToOrientation:UIInterfaceOrientationLandscapeRight animated:NO completion:nil];
|
|
|
+
|
|
|
+ self.playerManager.playerPlayFailed = ^(id<ZFPlayerMediaPlayback> _Nonnull asset, id _Nonnull error) {
|
|
|
+ mainBlock(^{
|
|
|
+ @zf_strongify(self)
|
|
|
+ self.controlView.failBtn.hidden = YES;
|
|
|
+ [[iToast makeText:NSLocalizedString(@"play_video_fail_tip",nil)] show];
|
|
|
+ });
|
|
|
+
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
- (void)viewDidAppear:(BOOL)animated
|
|
|
@@ -79,14 +88,38 @@
|
|
|
if(!self.playerManager.assetURL){
|
|
|
NSString *filePath = _VideoDataMode.path;
|
|
|
NSString *urlStr = ksharedAppDelegate.NASFileByBoxService;
|
|
|
- //NSString *urlStr = ksharedAppDelegate.NASFileByBoxService;
|
|
|
NSString *fileUrl = [[NSString alloc] initWithFormat:@"%@getFile?path=%@",urlStr,filePath];
|
|
|
+
|
|
|
+// NSString *string = filePath;
|
|
|
+// NSString *filePathBase64 = [iTools base64UrlEncoder:string];
|
|
|
+// NSString *fileUrl = [[NSString alloc] initWithFormat:@"%@getFiles/%@",urlStr,filePathBase64];
|
|
|
+
|
|
|
NSString *showUrl = [[NSString alloc] initWithFormat:@"%@getThumbnail?path=%@",urlStr,filePath];
|
|
|
- HLog(@"%@",fileUrl);
|
|
|
+ HLog(@"video url:%@",fileUrl);
|
|
|
//fileUrl = @"http://transfertest.armclouding.com:10010/getFile?path=/sdcard/bb.mp4";
|
|
|
- //fileUrl = @"http://m10.music.126.net/20240527160012/d3f165dc686ac01afd4497400b2c2c58/ymusic/5353/0f0f/0358/d99739615f8e5153d77042092f07fd77.mp3";
|
|
|
+
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/123.mp4";//可以播放
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/movTest.mov";//可以播放
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/yinwei4.mp4";//可以播放
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe2.mp4";//可以播放
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe.m4v";//可以播放
|
|
|
+
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/qisheng.ts";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/wmvTest.wmv";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/复仇者联盟.3gp";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe3.mpeg";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe4.mpg";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe5.rm";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/fuchouzhe5.vob";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/gamemkv.mkv";//加载失败
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/j14_yinyue.ogg";//
|
|
|
+
|
|
|
+ //fileUrl = @"http://file.phone.androidscloud.com:8210/document/newFile/download/1/ikIm5C0KjKNvusTF6tIH/LowLevelMultipartUpload_45050149837826456388";//可以播放
|
|
|
+ //fileUrl = @"http://testprivacy.phone.armclouding.com:1801/h5/我的视频.mp4";
|
|
|
+
|
|
|
fileUrl = [fileUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
|
|
showUrl = [showUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
|
|
+ //HLog(@"video url:%@",fileUrl);
|
|
|
|
|
|
NSURL * sourceMovieURL= [NSURL URLWithString:fileUrl];
|
|
|
|