自动播放的移动Safari浏览器的音频文件 [英] Autoplay an Audio File on Mobile Safari

查看:201
本文介绍了自动播放的移动Safari浏览器的音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经得到了我写了一个小系统仪表板的Web应用程序,充满了报警通知。我已经受够了工作在移动Safari相当长的一段时间,但最近想添加音频报警通知,让我很容易地知道,当有报警,我不会在显示屏直视。

I've got a little system dashboard web app that I've written, replete with alarm notifications. I've had it working for quite some time on mobile safari, but recently wanted to add audio to the alarm notifications to allow me to easily know when there are alarms and I'm not looking directly at the display.

报警通知通过一个(相对)不断地轮询AJAX的拉动,如果报警present显示报警横幅广告请求填充。我想添加一个自动播放报警听起来很好,但移动Safari浏览器没有骰子。

The alarm notifications are populated through a (relatively) constantly polling ajax request that pulls in and displays an alarm banner if alarms are present. I wanted to add an auto-playing 'alarm' sound as well, but no dice for Safari Mobile.

我已经使用HTML5和嵌入的对象与无济于事尝试。苹果文档中则状态,你不能自动播放音频文件,它必须通过用户操作被激活来节省带宽。

I've tried using HTML5 and embedded objects with no avail. The Apple documentation does state that you can't auto-play an audio file and it must be activated through user action to conserve bandwidth.

有没有人在WLAN设置中发现解决的办法?

Has anyone found a way around this in a WLAN setting?

推荐答案

我想这是不可能的,事实上,我希望如此。不是你,我敢肯定,你会使用它的一个很好的目的,但我真的不想让网站自动播放的音频文件。

I guess that it's impossible, in fact, I hope so. Not for you, I'm sure that you'll use it for a good purpose, but I really don't want allow sites to auto-play audio files.

呵呵,我记得的东西......这是可能与Flash!

Oh, I remember something... It's possible with Flash!

这篇关于自动播放的移动Safari浏览器的音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆