开发者

MediaElement.js - Splash Screen for Audio Playback

开发者 https://www.devze.com 2023-03-01 06:53 出处:网络
Is there a way to display a static splash s开发者_JAVA技巧creen to accompany an audio clip using MediaElement.js?You could use javascript to change the source of an image file on the play event of MEJ

Is there a way to display a static splash s开发者_JAVA技巧creen to accompany an audio clip using MediaElement.js?


You could use javascript to change the source of an image file on the play event of MEJS. Look in the bottom right hand corner of the site for an example of how the JS is generally formatted: http://mediaelementjs.com/

For you, the event listener would look something like:

mediaElement.addEventListener('play', function(e) {
 document.getElementById('myImgID').src = 'funnybunny.jpg';
}, false);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号