开发者

How can I get the mediaelement.js to work in a popup window?

开发者 https://www.devze.com 2023-02-19 15:14 出处:网络
I got the Media Element JS player to work, but when I tried to get it to play in a pop-up, I noticed that it breaks the popup. It looks like I can\'t call JavaScript inside a JavaScript.My popup is pr

I got the Media Element JS player to work, but when I tried to get it to play in a pop-up, I noticed that it breaks the popup. It looks like I can't call JavaScript inside a JavaScript. My popup is pretty simple, it just does window.open and uses document.write with code to build a new page with its own style sheet. However, I can't load the mediaelement.js stuff inside that. Maybe I should just load the Flash that comes with it? There's also a silverlight file.

Can someone please help? I need a player that doesn't require an XML file for the playlist, works in all browsers, plays MP3s and has a timer on it. I've been working on 开发者_运维问答it all day to no avail!


if you're document.writing into a new window you should be able to write a call to an external js file and that should run. Can you post the code you're using?

also why not just window.open('http://yoursite.com/path/to/an/html/file.html') instead of document.writing to it. This would be cleaner and would maintain the separation of structure and behavior.

0

精彩评论

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