Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Showing a video under iOS 7

$
0
0

Hi,

The following code works fine under iOS6, but not under iOS7

        private void startAnimation()
        {
            using (var pool = new NSAutoreleasePool())
            {
                InvokeOnMainThread(() =>
                {
                    player = new MPMoviePlayerController(NSUrl.FromFilename("Graphics/videos/noaudio-data-download.mp4"))
                    {
                        AllowsAirPlay = true,
                        Fullscreen = true,
                        ScalingMode = MPMovieScalingMode.Fill,
                        RepeatMode = MPMovieRepeatMode.One,
                        SourceType = MPMovieSourceType.File,
                        ShouldAutoplay = true,
                        ControlStyle = MPMovieControlStyle.Fullscreen,
                    };
                    player.View.Frame = View.Bounds;

                    View.AddSubview(player.View);
                    View.BringSubviewToFront(player.View);
                    player.PrepareToPlay();
                    player.Play(); 
                });
            }
        }

        private void stopAnimation()
        {
            player.Stop();
            player.Dispose();
        }

The video is a 320 x 480 mp4 file that displays fine under quicktime and vlc.

Did something change between iOS 6 and 7 that changed the way video is handled?

Paul


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>