question-mark
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.

VideoJS 5 with fluid option is unable to start (undefined function on ima3.js)

See original GitHub issue

Bug

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

https://jsbin.com/vofigafuno/edit?css,js,console,output

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
shawnbusocommented, Jan 27, 2017

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.

0reactions
ypavlotskycommented, Feb 23, 2018

Still fixed in 1.1.0 Closing this out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Video.js Plugins
List of plugins for Video.js.
Read more >
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 >

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found