How can i make custom buttons to control the <embed>?
Im trying to play some sound(mp3) in my browser. Found <embed>
but the default controllers (pause button, volume and timeslider) 开发者_开发技巧aint really pretty so what im wondering is how i could control it with some jquery buttons?
i would then hide the embed and call controls with jquery and the embed tags id.
Is this possible, and where could i find a overview of that?
Actually you can do this better with html5 (less load from CPU, but less crossbrowser too) (google it: custom html5 audio player)
but if you want flash behind the scenes, better go with jPlayer : http://www.happyworm.com/jquery/jplayer/
I agree with Fusion on that fact that HTML5 is probably the easiest way to go with the best result. However what are you going to do with the non-HTML5 compliant browsers? What about mobile?
My suggestion would be to use the HTML5 solution with compliant browsers, and a jQuery fall back solution for non-HTML5 browsers. That way the users with the most current technology get the best solution, but you don't leave everyone else behind.
jQuery has a wonderful ability to modify DOM so swapping out files in the tag would not be an issue. Check out this sound plugin ( http://plugins.jquery.com/project/sound_plugin ) and see if that fits your need.
精彩评论