Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3452336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:14:42+00:00 2026-05-18T09:14:42+00:00

every one. I’m trying to figure out how to play live stream using MPMoviePlayerController.

  • 0

every one. I’m trying to figure out how to play live stream using MPMoviePlayerController. For testing i’m using Apples test stream sample http://devimages.apple.com/iphone/samples/bipbopall.html.
It’s perfectly working in UIWebView, but i can’t make it work with MPMoviePlayerController. There is my piece of code:

NSURL *mediaURL = [NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbopall.html"];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:mediaURL];
[[NSNotificationCenter defaultCenter] addObserver:self 
                                         selector:@selector(moviePlayBackDidFinish:) 
                                             name:MPMoviePlayerPlaybackDidFinishNotification 
                                           object:nil]; 

[mp setControlStyle:MPMovieControlStyleFullscreen];
[mp setMovieSourceType:MPMovieSourceTypeStreaming];
[mp setFullscreen:YES];

[self.view addSubview:[mp view]];

[mp prepareToPlay];
[mp play];

Actually the controller recieves MPMoviePlayerPlaybackDidFinishNotification without playing anything. Where is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:14:43+00:00Added an answer on May 18, 2026 at 9:14 am

    Your problem is probably with the URL. MPMoviePlayerController wants the URL directly to the file you want to play. You are providing the URL for an HTML page which the movie player doesn’t understand. That is why it does work in UIWebView since a web browser understands HTML. If you want more information about what’s wrong you can check the error doing the following, quoted from Apple’s documentation:

    To check for errors in URL loading,
    register for the
    MPMoviePlayerContentPreloadDidFinishNotification
    or
    MPMoviePlayerPlaybackDidFinishNotification
    notifications. On error, these
    notifications contain an NSError
    object available using the @”error”
    key in the notification’s userInfo
    dictionary.

    It would look something like:

    - (void) moviePlayBackDidFinish:(NSNotification*)notification {
        NSError *error = [[notification userInfo] objectForKey:@"error"];
        if (error) {
            NSLog(@"Did finish with error: %@", error);
        }
    }
    

    If you want to try and play that sample you can try and access the URL for the stream directly, which would be: http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello every One i am trying to get Ist date of All months in
Hi every One I am trying to add column in Mysql. My Sql Query
every one i am using EKEventStore to add events into iphone calender from my
hi every one I'm using this code, through this I'm getting wrong time,i need
every one, i have been doing some work on rendering grass using billboard textures
every one i am trying to get the video frame or thumbnail from a
hiii every one i am new to iphone development in a sample downloaded app
every one. I want to connect a remote database using Sql Connection String in
Hi every one there is a link : link and there is a sample
Hello every one i'm trying to do a login method for my website, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.