Question

If I just call MediaElement and not MediaElementPlayer, can I still skin both the HTML and Flash players using only CSS? Or do I have to modify the actual FLA?

Was it helpful?

Solution

So, I did some playing around, and it turns out that yes, it is possible (with a catch): the controls are literally the same UI, i.e. it's all done in HTML/JS which isn't actually read by Flash at all. All you're doing is controlling the HTML5 and SWF players using the MediaElement API.

It wasn't immediately apparent, but in order to remove the default SWF controls, all you have to do is remove the controls attribute of your video with JavaScript (if it's set) before you call MediaElement, and MediaElement.js will intelligently exclude the SWF controls as well.

However, the catch is that there is currently a bug (which I have filed) that prevents the Flash player from being controlled via HTML until play() is activated through other means (SWF controls or with JS directly). So until that is fixed it isn't safe for production use.

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