我正在尝试流式传输上传到filepicker上的视频,但它会在不播放视频的情况下继续加载。
链接是:https://www.filepicker.io/api/file/fLayj5bYTWuso1TVNknv
该页面是一个视频/ mp4页面,但正如您所看到的,该页面没有扩展名。
守则:
@interface RTVideo()
@property (nonatomic,strong) MPMoviePlayerController *moviePlayer;
@end
@implementation RTVideo
UIView *frame;
-(void)play
{
NSNumber *adId = 5 ;
NSString *session = [[NSUserDefaults standardUserDefaults]stringForKey:@"sessionID"];
NSString *type = @"video";
[NetworkManagerCenter retrievePageWithtype:type
Id:adId
session:session
success:^(RT *ad) {
[self playAD];
} failure:^(NSError *error) {
[self removeFromSuperview];
}];
}
-(void)playAD
{
frame = self;
NSURL *movieURL = [NSURL URLWithString: @"https://www.filepicker.io/api/file/fLayj5bYTWuso1TVNknv"];
self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[frame addSubview:self.moviePlayer.view];
self.moviePlayer.fullscreen = YES;
self.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
self.moviePlayer.initialPlaybackTime = -1.0;
[self.moviePlayer prepareToPlay];
[self.moviePlayer play];
}
@end
这不起作用,因为没有扩展,我该如何解决?