2

我有一个母版页和里面:一个音乐播放器。

            <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&amp;loop=1&amp;autoplay=1&amp;autoload=1" />
            </object>

它可以工作,我可以听到声音,但是如果我转到不同的页面,它会停止(暂停并返回开始,我仍然可以看到它并按下播放,因为它在我的母版页中)

我在浏览页面时如何让它播放?

注意:播放器包含暂停功能,不会自动播放,因此用户不会感到烦恼。

4

5 回答 5

3

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.

于 2011-01-05T23:17:32.800 回答
0

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.

于 2011-01-05T23:17:25.100 回答
0

I think frames or dynamic AJAX content are the only solutions.

于 2011-01-05T23:17:41.663 回答
0

大多数在整个体验中保持内容加载/运行的网站都使用 AJAX 来更新单个页面或Frames的内容。根据可用的内容,您可以使用这些技术中的任何一种来播放音乐,同时更改页面上的内容。

于 2011-01-05T23:18:54.487 回答
0

母版页只是应用于每个内容页面的“模板”。每次浏览到另一个内容页面时都会重新加载它。这就是您看到这种行为的原因。另一个弹出窗口是除了 AJAX 之外唯一想到的解决方案。

于 2011-01-05T23:19:57.903 回答