gpt4 book ai didi

objective-c - 在 tvOS 上播放时出现 AVPlayer 错误

转载 作者:太空狗 更新时间:2023-10-30 03:14:21 24 4
gpt4 key购买 nike

我正在使用以下代码在 tvOS 上播放视频:

NSString *filePath = [[NSBundle mainBundle] pathForResource:name ofType:@"mov"];
NSURL *fileUrl = [NSURL fileURLWithPath:filePath];

self.player = [AVPlayer playerWithURL:fileUrl];
AVPlayerLayer *avPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];

avPlayerLayer.frame = CGRectMake(0, 0, view.frame.size.width, view.frame.size.height);
[view.layer addSublayer:avPlayerLayer];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(replayMovie:) name:AVPlayerItemDidPlayToEndTimeNotification object:nil];

[self.player play];

但我收到以下错误

ERROR: >aqme> 718: MEMixerChannel::EnableProcessor: failed to open processor type 0x705f6571

有什么解决办法吗?

最佳答案

您是在模拟器中还是在 Apple TV 开发套件中运行应用程序?

对于 tvOS,我遇到的大多数与 AV 相关的错误/崩溃只发生在我使用 Apple TV 模拟器时 - 一旦我在物理设备上运行该应用程序,它们往往会消失。

关于objective-c - 在 tvOS 上播放时出现 AVPlayer 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32844615/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com