簡體   English   中英

我可以在AVQueuePlayer中使用replaceCurrentItemWithPlayerItem嗎?

[英]Can I use replaceCurrentItemWithPlayerItem with AVQueuePlayer?

我已經將replaceCurrentItemWithPlayerItem :與AVPlayer一起使用,但是它也可以與AVQueuePlayer一起AVQueuePlayer嗎?

在下面的蘋果文檔中,給出了:

此方法只能在不創建隊列的播放器實例上調用。 如果播放器使用多個項目初始化,則該方法將引發異常。

這是什么意思? 請指導。

如果它表示如果我們將其與AVQueuePlayer一起使用將引發異常,則我嘗試了使用它而沒有任何異常,但不知道這是否是正確的使用方式。

https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/

不,根據Apple文檔,您不能:

重要

此方法不適用於AVQueuePlayer。 如果播放器使用多個項目初始化,則此方法將引發異常。

這是鏈接: https : //developer.apple.com/reference/avfoundation/avplayer/1390806-replacecurrentitemwithplayeritem?language=objc

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM