Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GestureRecognizer attached to VideoView never gets called.

See original GitHub issue

I have a simple view view to which I am trying to add a gesture recognizer to hide\show the video controls. However, the gesture recognizer never gets hit.

The below is ain a

<ContentPage xmlns=""
			 Title="{Binding ActivityCode}" BackgroundColor="Black">
			<local:PrettyDateConverter x:Key="prettyDateConverter" />
		<ToolbarItem Text="Done" Icon="delete.png" x:Name="DoneToolBarItem" />
	<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand" Margin="0,30,0,20" x:Name="mainStack">
		<Label x:Name="statusLabel" FontSize="Micro" TextColor="#FFFFFF" HorizontalTextAlignment="Center" 
			   VerticalTextAlignment="Center" HeightRequest="20"></Label>
		<Grid VerticalOptions="Fill" >
				<RowDefinition Height="10*"/>
				<RowDefinition Height="1*"/>

			<forms:VideoView x:Name="player"
			Grid.Row="0" Grid.RowSpan="1" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" AspectMode="AspectFill"/>

			<Grid HorizontalOptions="FillAndExpand" Grid.Row="1" Grid.RowSpan="1" x:Name="gridControls">
					<RowDefinition Height="50"/>
					<ColumnDefinition Width="50"/>
					<ColumnDefinition Width="*"/>
				<Button Image="play.png" Grid.Column="0" x:Name="play"></Button>
				<Button Image="pause.png" x:Name="pause" Grid.Column="0"></Button>
				<ProgressBar x:Name="progress" VerticalOptions="CenterAndExpand" Grid.Column="1" BackgroundColor="Gray" HorizontalOptions="FillAndExpand"></ProgressBar>


OnAppearing is as follows:

        protected override void OnAppearing()
            CrossMediaManager.Current.StatusChanged += CurrentOnStatusChanged;
            CrossMediaManager.Current.PlayingChanged += OnPlayingChanged;
            player.Source = ca.FollowUpCode;
            pause.IsEnabled = false;
            pause.IsVisible = false;
            play.Clicked += OnPlayClicked;
            pause.Clicked += OnPauseClicked;
            player.AspectMode = VideoAspectMode.AspectFit;
            player.GestureRecognizers.Add(new TapGestureRecognizer 
                Command = new Command(() => {
                    Debug.WriteLine("May be this was what was wrong ");
                NumberOfTapsRequired = 1


I am not sure what is it that I am doing wrong here.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

15mgm15commented, Apr 8, 2018

@martijn00 I am having the same issue on latest version, is this by any chance merged?

Haza85commented, Oct 8, 2019

Have the same issue in 0.8.11 version

Read more comments on GitHub >

github_iconTop Results From Across the Web

GestureRecognizer attached to VideoView never gets called
I have a simple view to which I am trying to add a gesture recognizer to implement additional functionality. However, the gesture recognizer...
Read more >
swift - UISwipeGestureRecognizer not calling function on ...
I have added a UISwipeGestureRecognizer to the view however when testing, the function attached is not being called. Can anyone see what is ......
Read more >
UIGestureRecognizer | Apple Developer Documentation
Overview. A gesture recognizer decouples the logic for recognizing a sequence of touches (or other input) and acting on that recognition.
Read more >
Can't Get Simultaneous Gesture Recognition to Work
The gestureRecognizer function apparently never gets called by the delegator, but I don't understand why or know how to fix the problem.
Read more >
Detect common gestures
OnGestureListener never get called. This has the potential to cause unexpected problems in your app. The only time you should return false ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found