问题描述:

I'm trying to setup a muses radio player (https://www.muses.org) without the skin files. Instead, I would like to design the player with css and trigger the play/stop events in javascript.

Does anyone know if this is possible?

I've tried setting the skin value to an empty string, false, null, and omitted it completely from:

<script type="text/javascript" src="http://hosted.muses.org/mrp.js">

</script>

<script type="text/javascript">

MRP.insert({

'url':'http://localhost/stream-url',

'codec':'mp3',

'volume':100,

'autoplay':false,

'buffering':5,

'title':'test',

'bgcolor':'#FFFFFF',

'skin':'',

'width':180,

'height':60

});

</script>

Nothing works.

网友答案:

No go. Muses works in shockwave flash. Its a precompiled control program, and without the source code what you want to do won't work. (update) I did look at the linked JavaScript file, and wow, its 3000 lines of code without any documentation and obfuscated variable names. So what you want to do might be achievable, but you'd first have to understand each of those 3000 lines of code (good luck with that!) So I'd have to say, what you want to do might be achievable, but its not totally clear on what the shockwave flash tool does exactly, and how it integrates to the site, so maybe not. (In practical terms, I still call this a No-Go.)

If you'd like you can create your own player via JavaScript, but that's a totally different conversation, but certainly can be done. There are some great examples out there. I'd start the learning process by looking at the stuff generated by Chris Wilson. That guy is brilliant on this stuff. Check out his github repository HTML5 has some very nice audio tools in the interface. Check out this site.

相关阅读:
Top