Question

I have a few rotating videos on a home page. The first video shows up fine, but all videos that are hidden to begin with end up being displayed with a 0px width time rail.

http://thewellcommunity.org

I'm assuming that mediaelement.js is just trying to measure the width of the video while it's hidden and coming up with 0px. Is there any way around this?

Has anyone ever done something similar?

Thanks!

Was it helpful?

Solution

I had a similar problem on some work that I did. My work-around was to invoke mediaelement.js after I made the video visible. So, in your case, when a new video is faded in I would call the .mediaelementplayer() method on that video. (This also prevented an issue in IE8 where the audio would play, but the video would not.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top