1

I am using the MP Movie Player for playing a live channel feed, i am also adding a tap gesture on a view, for hiding and unhiding of a collection view, this view is then added on the player view.

    player.shouldAutoplay=YES;
    player.controlStyle=MPMovieControlStyleDefault;
    viewVideo.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
    [viewVideo addSubview:player.view];
    
    
    
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap)];
    tapGesture.delegate=self;
    CGRect aViewFrame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
    aView = [[UIView alloc] initWithFrame:aViewFrame];
    [aView addGestureRecognizer:tapGesture];
    [player.view setUserInteractionEnabled:YES];
    [player.view addSubview:aView];

Now the problem i am facing is that when the tap gesture is disabled, then i can use this control state buttons such as (full screen and the pause, play), but if i keep the tap gesture enabled on the player view, then i cannot use this control state bar.

Is there a way i can put bring the control state bar in front so that i can use this functions. And also what is the fixed height of this control state, Please specify dimensions for landscape and portrait both.

enter image description here

Arpit Dhamane
  • 503
  • 7
  • 19
  • check [mpmovieplayercontrollers-view-does-not-recognize-touch](http://stackoverflow.com/questions/7487182/mpmovieplayercontrollers-view-does-not-recognize-touch) and [MpMovieplayerController tap gesture recognizer doesn't trigger when in fullscreen](http://stackoverflow.com/questions/15179095/mpmovieplayercontroller-tap-gesture-recognizer-doesnt-trigger-when-in-fullscree) – Paresh Navadiya Sep 24 '15 at 11:31
  • The tap gesture are working fine, and i have tried all the 4 control states offered by the mp player, but that doesn't solve it. – Arpit Dhamane Sep 24 '15 at 11:39

2 Answers2

1

As far as i understand you are not using the main view for the video, So the thing you can do is you can reduce the height of the view on which you are adding the tap gesture, in your case it will be “aView.” The reduced height should be the height of the control state bar. There maybe different values of this bar in landscape and portrait orientation.

Karishma
  • 11
  • 1
  • 3
  • 1
    Not getting the exact height of the control state bar, so i dont know how much height should i reduce. But currently this is working, i have subtracted 100 for time being. – Arpit Dhamane Sep 24 '15 at 11:43
0

Just try adding your tap recognizer to player.backgroundView instead.

Arthur Gevorkyan
  • 2,069
  • 1
  • 18
  • 31