How to Make a Video Background View Using UIWebView ?

I need to do a video background, but i dont how to start this, i try to use a gif file with the UIImage

Posts

  • illomiillomi USMember ✭✭

    Hi try to use this code.

    MPMoviePlayerControllerplayer = new MPMoviePlayerController(NSUrl.FromFilename("video.mp4"))
           {
               AllowsAirPlay = true,
               Fullscreen = true,
               ScalingMode = MPMovieScalingMode.AspectFill,
               RepeatMode = MPMovieRepeatMode.One
           };
           player.ControlStyle = MPMovieControlStyle.None;
    
    
           player.View.Frame = new CGRect(0, 0, View.Frame.Width, View.Frame.Height);
    
           View.Add(player.View);
    
    
            player.PrepareToPlay();
            player.Play();
    
           /* THEN ADD OTHER ELEMENT IN YOUR VIEW.
    

    If video is too height try to use this code

    player.View.Frame = new CGRect(0, 64, View.Frame.Width, View.Frame.Height-64);

Sign In or Register to comment.