title: How to play the video in landscape mode by default in AVPlayer?
body: <pre><code>- (void)playMethod
  {
      NSURL *url = [[NSURL alloc] initWithString:@"https://www.rmp- 
      streaming.com/media///bbb-360p.mp4"];
      player = [AVPlayer playerWithURL:url];
      controller = [[AVPlayerViewController alloc] init];
      [self addChildViewController:controller];
      [self.view addSubview:controller.view];
  
      controller.view.frame = CGRectMake(15,50,345,300);
      controller.player = player;
      controller.showsPlaybackControls = YES;
      player.closedCaptionDisplayEnabled = NO;
  
      UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
      [button1 addTarget:self
                  action:@selector(backMethod)
        forControlEvents:UIControlEventTouchUpInside];
      [button1 setTitle:@"Back" forState:UIControlStateNormal];
      [button1 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
       button1.frame = CGRectMake(50.0, CGRectGetMinY(controller.view.frame)+10, 160.0, 40.0);
      button1.tag = 1001;
      [self.view addSubview:button1];
      [controller.view  bringSubviewToFront:button1];
      [player pause];
      [player play];
      }
  </code></pre>
  
  <p>I want to play the video in landscape mode currently, its getting played in portrait mode. I want when the playMethod is called it should open the video in landscape mode only.</p>