VideoJS 5 with fluid option is unable to start (undefined function on ima3.js)
See original GitHub issueBug
The new responsive css for VideoJS causes tap / touch events to never fire. The iFrame seems to be above the video player listeners.
You can “fix” this by setting the z-index of the video
element to say, 1200, and then click. It’ll start the ad, but there will need to be code that re-hides the video. If you keep the z-index at 1200, the ad is ran below an empty video element.
Uncaught TypeError: Cannot read property 'apply' of undefined | # => ima3.js#288
Recreate
- Setup a video with IMA (used Sample app in repo)
- Set video options:
fluid: true
- View in a mobile device (OS doesn’t matter as far as I can tell)
- Tap the video and note that nothing will happen
Work around
To get around this, I’ve updated the z-indexes of the items videojs is listening to. I did not test this without a poster, I’m always running a poster image.
player.posterImage.el().style.zIndex = 1400
player.bigPlayButton.el().style.zIndex = 1410
player.loadingSpinner.el().style.zIndex = 1420
JS Bin
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Troubleshooting - Video.js
A guide to troubleshooting common issues with Video.js. ... nor adaptive streaming is a consideration, MP4 with h264 video and acc audio is...
Read more >Player - Video.js Documentation
tag, Element, yes, The original video tag used for configuring options. options, Object, no, Object of option names and values. ready, function, no,...
Read more >Getting Started with Video.js - Video.js: The Player Framework
Using these hosted files is probably the easiest way to get started using Video.js, you simply need to include the following links in...
Read more >How to Fix Event Conflicts Between Swiper and Video.Js
I'm using Swiper for a simple slideshow with images and videos. This works like a charm. However, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm I’m still not able to repro, though I’m on Android 7. I’ll see if I have an Android 5 phone here to test with.
Still fixed in 1.1.0 Closing this out.