javascript - How does jQuery implement preloading of sound effects on mobile pages?
phpcn_u1582
phpcn_u1582 2017-05-19 10:41:56
0
2
577

The mobile page animation will be accompanied by sound effects. The first loading of music will cause a delay in the sound effects. How can I solve this problem?

phpcn_u1582
phpcn_u1582

reply all(2)
曾经蜡笔没有小新

Just use PxLoader for preloading. It’s pxloader-all.min.jsthat file.

曾经蜡笔没有小新

Now all mobile terminals prohibit the automatic loading and playback of audio and video resources, requiring manual triggering of user interaction events, such as click, touchstart等事件.
对于自动播放, 这个是无解的, 当然有一些浏览器改了内核表现可以实现, 比如微信.
对于自动加载, 可以使用dataurl来实现, 比如base64编码的src.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!