Video "play" bug, FF and Edge

Page: 1

Author Post
Member
Registered: Oct 2017
Posts: 35
If a video is not set to autoplay, clicking on the video frame/poster image in Firefox and Edge causes the frame to go black, but video play doesn't commence:

https://misterneutron.com/vidplaybug/

On a simple <video> tag in FF, it works properly:

https://misterneutron.com/videoTag/

(In that simple case, Edge doesn't respond at all to a click on the video frame - it responds only to a click on the control bar "play" icon.)

Oddly, this works properly in Firefox on Android.
Administrator
Registered: Aug 2008
Posts: 3381
Actually, video play does occur on that click, but it lasts for only one frame. (The first frames in your example video are all black.)

The problem is that the click handler which toggles play and pause on video click is added twice in the case of non-autostart videos with poster images. So, one click toggles the video to the play state and then fires the handler again to toggle the video back to the pause state.

This will of course be remedied in subsequent releases.

You can fix this behaviour in current versions with a simple edit in Floatbox's video.html file: change the only occurrence of 'click' to 'onclick'.
Member
Registered: Oct 2017
Posts: 35
With that change, it works properly in Edge, Chrome, and Firefox on Win10, Chrome and Firefox on macOS 10.13, and Chrome on Android.

But it now doesn't work properly on Safari on macOS 10.13 and Firefox on Android (I don't have an iOS device, so that's the one I can't test). For those, the unfixed version works correctly, so the results have flipped.

Chrome gets it right either way.

Edit: demo with altered video.html: https://misterneutron.com/vp2/
« Last edit by jGromit on Tue Oct 31, 2017 6:58 am. »
Member
Registered: Oct 2017
Posts: 35
I take part of that back - the uncorrected version also fails in Chrome on the desktop, but is OK in Chrome on Android (too many combos to test, and testing the Android browsers is a minefield because they stubbornly cache things).

So, to recap:

Uncorrected works?:
N - Chrome
N - Firefox
N - Edge
Y - Safari
Y - Chrome Android
Y - Firefox Android.

Corrected works?:
Y - Chrome
Y - Firefox
Y - Edge
N - Safari
Y - Chrome Android
N - Firefox Android.
Member
Registered: Oct 2017
Posts: 35
Some quick testing of FB 7.5.1 tells me that this is now behaving nicely in every browser combination I've got:

- Chrome, Edge, and Firefox in Win10
- Chrome, Firefox, and Safari in macOS 10.13.2
- Chrome and Firefox in Android

Can't test iOS - that's the one beast I don't have anywhere.

(Demo links above are now 404's.)
Administrator
Registered: Aug 2008
Posts: 3381
Please re-download and use a fresh copy of 7.5.1. There were some minor cosmetic problems with the original that I posted yesterday. (The wrong build date, a spurious 'console.log' call that shouldn't be there, and some documentation corrections.)

Page: 1