Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在播放视频时重置 MPMoviePlayerController 对象的内容 URL。
单击按钮时,我正在设置内容 URL,如下所示,
[videoPlayer setContentURL:url];
但我收到“错误访问”错误。
当电影播放器已经在播放视频时,有没有办法更改网址?它应该停止上一个视频,并应该启动新网址的视频。
这意味着您没有为视频播放器分配内存
MPMoviePlayerController * videoplayer = [MPMoviePlayerController alloc] init]; [videoplayer setcontenturl: url];
它不会给你任何错误。