在网站上不间断地播放 mp3?

2023-06-22php开发问题
2

本文介绍了在网站上不间断地播放 mp3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

客户要求在整个网站上播放单个曲目.通常我建议不要这样做,但他们坚持.那么,在网站中嵌入 Flash 播放器的最直接方法是什么,并且当用户转到另一个页面时不会出现间隙/中断?

Client is requesting a single track to be heard across the website. Generally I advise against it, but they insist. So, what is the most straightforward way of having a flash player embedded in a site, and when a user goes to another page there isn't a gap/interruption?

我认为 iframe 是必需的.我尝试搜索 SO 以寻找答案..

I am thinking an iframe is required.. I am using a flash player that has autoresume, but that only solves picking up where you last left off on the song before going to another page. I tried searching SO for an answer..

推荐答案

如果您希望它完全不受干扰,则必须将整个站点嵌入到 iframe 中,或通过 Ajax 加载页面.

If you want it totally uninterrupted, you'll have to embed the whole site in an iframe, or load pages via Ajax.

如果您可以容忍音乐中的停顿,您可以做的是修改 Flash 音乐播放器,将 cookie 保留在歌曲中的当前位置,并在加载时检查 cookie 并在该位置继续播放.

If you can tolerate a pause in the music, what you could do is modify your Flash music player to keep a cookie with the current position in the song and when it loads checks for the cookie and resumes playing at that place.

两者都是丑陋的黑客,但强迫用户听音乐也是如此.

Both are kind of ugly hacks, but so is forcing the user to listen to music.

这篇关于在网站上不间断地播放 mp3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17