1

我有一个问题是如何在 Objective-C 中播放 VAST 视频格式?我试过这段代码:

NSURL *url = [NSURL URLWithString:@"http://ad3.liverail.com/?LR_PUBLISHER_ID=1331&LR_CAMPAIGN_ID=229&LR_SCHEMA=vast3"];
player.movieSourceType =MPMovieSourceTypeStreaming;

MPMoviePlayerController *controller = [[MPMoviePlayerController alloc] initWithContentURL:url];
[player prepareToPlay];
self.myPlayer = controller; //Super important
controller.view.frame = self.view.bounds; //Set the size

[self.view addSubview:controller.view]; //Show the view
[controller play]; //Start playing

但我只看到黑色的空白屏幕。在我看来,我必须解析这些链接,但我做不到。我们如何仅使用 Apple 框架而不是 3rd 方库来解析 VAST XML 解析器?

4

0 回答 0