视频在iOS 9.0.1中不起作用

时间:2015-09-25 09:41:57

标签: ios video

我的代码在ios8上工作正常,但它在ios 9上不起作用。它实际上不适用于其他视频,对于照片库中的视频,它运行良好。请帮忙!

这是一款视频播放应用,主要代码如下:

AVURLAsset *movieAsset = [[AVURLAsset alloc] initWithURL:wpTrack.url options:nil];
    AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:movieAsset];
    _audioPlayer = [AVPlayer playerWithPlayerItem:playerItem];
    AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:_audioPlayer];
    playerLayer.frame = _playerView.layer.bounds;
    playerLayer.videoGravity = AVLayerVideoGravityResizeAspect;


for (CALayer *layer in [_playerView.layer sublayers]) {
    if ([layer isKindOfClass:[AVPlayerLayer class]]) {
        [layer removeFromSuperlayer];
    }
}
[_playerView.layer addSublayer:playerLayer];
[_audioPlayer setAllowsExternalPlayback:YES];
[playerItem addObserver:self forKeyPath:@"status" options:0 context:nil];

1 个答案:

答案 0 :(得分:0)

看起来iOS9添加了一些网络安全检查的东西,我将下面的代码添加到Info.plist后修复了这个问题。

from selenium.webdriver.common.action_chains import ActionChains

actions = ActionChains(driver)
actions.move_to_element(element).send_keys("hey").perform()