如何在 Joomla 中完成的网站中添加背景音乐?
我想添加在为客户开发的网站后台运行的音乐。该网站是在 Joomla 中生成的。有谁知道我可以添加在网站后台运行的音乐的任何组件(或任何方式)。
我知道这可以通过在所选模板的索引页面中嵌入标签来实现,但一个额外的要求(来自客户端)是每当任何访问者单击任何其他链接时,音乐应该继续播放,但不能从头开始。可行吗?有人可以帮我解决这个问题吗?
I want to add music which runs in the background of a website being developed for a client. The site is generated in Joomla. Does anyone knows about any component (or any way) through which I can add music which runs in the background of the website.
I know it can be achieved via embed tag in the index page of the selected template, but one additional requirement (from the client) is whenever any visitor clicks on any other link, the music should continue but not start from the beginning. Is it feasible? Can anyone help me regarding this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
能够播放音乐而无需每次单击链接时重新启动歌曲的唯一方法是将 Joomla 站点加载到一个框架中,并将音频播放器加载到另一个框架中。
不过,我强烈建议您与客户交谈。音频是高跳出率的常见原因,在框架中加载网站会搞砸您的搜索引擎优化。
The only way you are going to be able to play the music without restarting the song every time a link is clicked is to load the Joomla site in a frame and the audio player in another frame.
I would seriously recommend talking to the client though. Audio is a common cause of high bounce rates and loading the site in a frame is going to screw up your SEO.
我还没有尝试过,但我想你可以添加一个自定义 html 模块。请阅读下面的 W3C 文档。
HTML5 音频
好的,我刚刚尝试过。
更新
我向 Joomla 添加了一个新模块。选择“自定义 HTML”。在内容中放置类似的内容
I haven't tried it but i'm thinking you can add a custom html module. Read the W3C documentation below.
HTML5 Audio
Ok, i just tried it.
Update
I added a new module to Joomla. Choose "Custom HTML". In the content put something similar to this
我说不要这样做...
但是,如果您仍然想继续背景音乐创意...这里有2个很好的插件/模块来完成这个侵入性功能。
I say DON'T DO IT...
However if you still want to carry on with background music idea... Here 2 good plug-in/module to accomplish this intrusive feature.
您查看过 Joomla 扩展,那里有一些媒体播放器。
如果您想要在没有控件的情况下在后台自动播放音乐,那么您将找不到它。如果这就是您的计划,请不要这样做!
Have you looked at the Joomla extensions, there are a few media players there.
If you're after after an auto playing music in the background with no controls, you won't find it there though. If that is what you're planning please don't!
最好是进入主题/模板标题代码,将其添加到正文中。
Best would be go to into the themes/template header code, add it to the body.