문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top