跨页播放的音乐播放器
我有一个母版页和里面:一个音乐播放器。
<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf"
width="200" height="20">
<param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="mp3=Preloader.mp3&loop=1&autoplay=1&autoload=1" />
</object>
它可以工作,我可以听到声音,但如果我转到不同的页面,它就会停止(暂停并返回开始,我仍然可以看到它并按播放,因为它在我的主页中)
我如何让它在我的主页中播放正在浏览页面?
注意:播放器具有暂停功能,不会自动播放,因此用户不会感到烦恼。
I have a master page and inside : a music player.
<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf"
width="200" height="20">
<param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="mp3=Preloader.mp3&loop=1&autoplay=1&autoload=1" />
</object>
It works and I can hear sound, but if I go to a different page, it stop (pause and return to start, I can still see it through and press play since its in my master page)
How do I make it play while I'm browsing through pages?
Note : The player contains a pause function and doesn't auto play so users wont be annoyed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
90 年代的老方法是使用浏览器框架。您可以将您的网站拆分为一个包含音乐播放器的框架和一个允许人们导航您的网站的框架。
然而,大多数人放弃浏览器框架是有原因的。它们会扰乱您的浏览体验。如果有人点击您网站上的链接前往其他地方,他们仍然可能被困在您的框架内。这不酷。
“Web 2.0”方法包括让整个站点使用 AJAX,因此用户根本不会真正离开“页面”,而只是在单击时将不同的元素加载到页面中。例如,在苹果收购并关闭 Lala.com 之前,Lala.com 就是这么做的。
The old '90s way of doing this would be with browser frames. You could split your site into a frame that contains the music player, and a frame that lets people navigate your site.
However, there's a reason that most people have moved away from browser frames. They mess with your browsing experience. If someone clicks a link on your site to go somewhere else, they could still be stuck inside your frames. It's not cool.
The "Web 2.0" way of doing this involves making your whole site use AJAX, so the user never really leaves the "page" at all, but just loads different elements into the page as they click around. This is what Lala.com did, for example, before Apple bought them out and shut them down.
唯一的方法是将播放器保留在页面上,同时以其他方式加载其余内容。这可以使用 AJAX 或可怕的 HTML 框架等来实现。
The only way is to keep the player on the page while the rest of the content loads in some other way. This could be achieved using AJAX or the dreaded HTML frame etc.
我认为框架或动态 AJAX 内容是唯一的解决方案。
I think frames or dynamic AJAX content are the only solutions.
大多数在整个体验过程中保持内容加载/运行的网站都使用 AJAX 来更新单个页面的内容或 框架。根据您可用的内容,您可以使用这些技术之一来播放音乐,同时更改页面上的内容。
Most sites that keep content loaded/running throughout the entire experience use AJAX to update the content of a single page or Frames. Depending on what you have available, you can use either of these techniques to play the music while changing content on your page.
母版页只是一个应用于每个内容页的“模板”。每次您浏览到另一个内容页面时都会重新加载它。这就是您看到此行为的原因。除了 AJAX 之外,我想到的唯一解决方案是另一个弹出窗口。
The master page is just a "template" that is applied to each content page. It is being reloaded everytime you browse to another content page. This is why you're seeing this behavior. Another popup window is the only solution that comes to mind besides AJAX.