3
NSURL *url = [NSURL URLWithString:@"http://yyyyy.com/radio.m3u"];
  moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];

   // Register to receive a notification when the movie has finished playing.
   [[NSNotificationCenter defaultCenter] addObserver:self
                                            selector:@selector(moviePlayBackDidFinish:)
                                                name:MPMoviePlayerPlaybackDidFinishNotification
                                              object:moviePlayer];
   NSLog(@"start");
   if ([moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]) {


       NSLog(@"IF");
       // Use the new 3.2 style API
       moviePlayer.controlStyle = MPMovieControlStyleNone;
       moviePlayer.shouldAutoplay = YES;
       [self.view addSubview:moviePlayer.view];
       [moviePlayer setFullscreen:YES animated:YES];
   } else {
       // Use the old 2.0 style API
      // moviePlayer.movie = MPMovieControlModeHidden;
       NSLog(@"else");
       [moviePlayer play];  
   }

上面的代码是用ios开发的,但是m3u播放只有20秒怎么玩完整的m3u不可阻挡请给一些教程。

4

0 回答 0