An AVPlayerItem can occupy only one position in a player's queue at a time

后端 未结 5 372
梦如初夏
梦如初夏 2020-12-11 04:59

Im getting this error when trying to play a video from my temp directory:

NSString *tmpDir = [NSTemporaryDirectory() stringByAppendingString:@\"/\"];
NSStrin         


        
相关标签:
5条回答
  • 2020-12-11 05:34

    All. follow this answer to find the solution to this problem. devforums.apple.com/message/467199

    I am on IOS 5 beta 2.

    0 讨论(0)
  • 2020-12-11 05:39

    I got this because i had invalid parameters for movieSourceType, i thought you were supposed to put a MPMovieMediaTypeMask in there (video/audio,etc) but instead you are supposed to put a MPMovieSourceType. Fixing that made it work for me

    0 讨论(0)
  • 2020-12-11 05:40

    try to check control style and source type. Im getting this error ,and when change source type to unknow(auto detect,maybe) It goes right.

    0 讨论(0)
  • 2020-12-11 05:44

    I tried various solutions provided in apple dev forums. In my case what worked was just changing the source type from streaming to unknown:

    // player.movieSourceType = MPMovieSourceTypeStreaming;

      player.movieSourceType = MPMovieSourceTypeUnknown;
    
    0 讨论(0)
  • 2020-12-11 05:44

    Use following statement to avoid such error. Please keep in mind that, THE sdk that you are using is under NDA.

    [self.mPlayer.moviePlayer setControlStyle:MPMovieControlStyleDefault];

    0 讨论(0)
提交回复
热议问题