简体   繁体   中英

Can I use replaceCurrentItemWithPlayerItem with AVQueuePlayer?

I have used replaceCurrentItemWithPlayerItem : with AVPlayer but can it be also used with AVQueuePlayer ?

In following apple doc, it is given that:

This method must only be invoked on player instances created without queues. If the player is initialized with multiple items the method throws an exception.

What does it means? Please guide.

If it signifies that it throws exception if we use it with AVQueuePlayer , then I tried using it without any exception but dont know if it is right way to use.

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

No you can't, as per Apple docs:

Important

This method is not intended for use with AVQueuePlayer. If the player is initialized with multiple items this method throws an exception.

Here's the link: https://developer.apple.com/reference/avfoundation/avplayer/1390806-replacecurrentitemwithplayeritem?language=objc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM