Bug 38838 - MPMoviePlayerController can't open HLS stream
Summary: MPMoviePlayerController can't open HLS stream
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.2
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-17 10:54 UTC by Anton
Modified: 2016-02-17 14:21 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Anton 2016-02-17 10:54:48 UTC
MPMoviePlayerController moviePlayer = moviePlayer.ShouldAutoplay = true;
View.AddSubview (moviePlayer.View);
moviePlayer.SetFullscreen (true, true);
moviePlayer.ContentUrl = new NSUrl( @"http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8"); //hls
moviePlayer.Play ();

As the result of this code - player not open video HLS stream without errors. Just nothing happens.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-02-17 12:53:20 UTC
You need to set SourceType to Streaming: http://stackoverflow.com/a/23004339/183422
Comment 2 Anton 2016-02-17 14:05:20 UTC
I try it. If i set 
moviePlayer.SourceType = MPMovieSourceType.Streaming
i have the same result.
Check please this with HLS in the head ticket.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2016-02-17 14:20:58 UTC
It doesn't work in Objective-C either, so it's not a bug in Xamarin.iOS:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.
        window = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen].bounds];
        window.rootViewController = [[UIViewController alloc] init];
        window.rootViewController.view.backgroundColor = [UIColor greenColor];
        
        moviePlayer = [[MPMoviePlayerController alloc] init];
        moviePlayer.shouldAutoplay = YES;
        [window.rootViewController.view addSubview: moviePlayer.view];
        moviePlayer.fullscreen = YES;
        moviePlayer.contentURL = [[NSURL alloc] initWithString: @"http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8"];
        moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
        [moviePlayer play];
        
        [window makeKeyAndVisible];
        return YES;
    }

shows no video.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-02-17 14:21:45 UTC
If you still think you've found a bug in Xamarin.iOS, please attach a complete working Xcode project and the equivalent Xamarin.iOS project, and we'll have a look.