ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.07k stars 13.51k forks source link

click on videoplayer inside ion-content doesn't work #1607

Closed jvanaert closed 10 years ago

jvanaert commented 10 years ago

I embedded a simple video player in the side-menu example. When I replace the default content with a video player, the controls of the video player don't work(tested on Nexus 5). When I remove the surrounding ion-content, the buttons do work, but I guess the ion-content should be there ?

http://codepen.io/jvanaert/pen/EBics

perrygovier commented 10 years ago

Hey @jvanaert it's a symptom of the fast-click implementation. Listening for drag events like scrolling, we have to ignore events on the video element, as it would otherwise eat touch events and leave us unable to scroll. The solution in your situation is to use webkit scrolling by applying overflow-scroll="true" to that page's content. You'll loose the ability to do things like infinite scroll and pull to refresh, but in your case, I think that's fine.

Here's a codepen example http://codepen.io/perrygovier/pen/cazjd?editors=101

jvanaert commented 10 years ago

Thanks for the answer. On the ionic forum somebody suggested to wrap the player inside a regular div with data-tap-diable="true" Have you any idea which of the two solutions is the best ?

Also in you response you state that

You'll loose the ability to do things like infinite scroll and pull to refresh, but in your case, I think that's fine.

Does that mean that there is a solution for cases where the player is for example part of a list item where all the items have a video player in them, and I want scrolling ?

Thanks !

ktayfiasma commented 9 years ago

Hi , how to display a video from firebase in ionic application ??

russelljjackson commented 8 years ago

@perrygovier Thanks for this Perry, you're a life saver! Been beating my head on this for hours.