音频标签自动播放不适用于手机 [英] Audio Tag Autoplay Not working in mobile

查看:137
本文介绍了音频标签自动播放不适用于手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用这段代码,当我看到控件时,我发现自动播放功能无法正常工作。



<音频自动播放= 真 SRC = 音乐/ lathe_di_chadar.mp3 类型= 音频/ MP3 环路GT;< /音频>



,它不适用于移动设备,并且在网站上工作得很好。
谁能告诉我的问题呢?



感谢和高度赞赏。


解决方案

无法在移动浏览器中使用自动播放功能。 (这是不允许的)



但是有一些技巧可以做到这一点。

点击下面的链接查看一些技巧


developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html的rel = noreferrer> IOS的​​具体考虑|循环属性


i am using this code and when i see the controls i see the autoplay is not working.

<audio autoplay="true" src="music/lathe_di_chadar.mp3" type="audio/mp3" loop></audio>

and its not working in the mobile devices and very well working in website. Can anyone tell me the problem in this?.

Thanks and well Appreciated

解决方案

There is no way to get autoplay working in mobile browsers. (This is not allowed)

But some tricks do this thing.

Click on the links below to view some tricks

Autoplay audio on mobile safari

iOS-Specific Considerations | Loop Attribute

这篇关于音频标签自动播放不适用于手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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