在iOS Safari中播放音频时如何设置缩略图? [英] How do I set a Thumbnail when playing Audio in iOS Safari?

查看:66
本文介绍了在iOS Safari中播放音频时如何设置缩略图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚启动了一个新播客的网站.我们将音频嵌入到页面上的媒体播放器中.播放时,此音频出现在控制中心

I just launched a website for a new podcast. We're embedding the audio in a media player on the page. When playing, this audio appears on the Control Center

音频标签以及锁定屏幕上的

audio tab as well as on the lock screen

但是缩略图是普通的灰色音符.

However the thumbnail is a generic grey music note.

无论如何,是否可以使用 HTML JavaScript 设置此缩略图,还是仅为iOS应用程序保留此缩略图?

Is there anyway to set this thumbnail, using HTML or JavaScript, or is this thumbnail reserved only for iOS applications?

推荐答案

这是到目前为止我所见过的有关Media Session API的最佳手册:

Here is the best manual on Media Session API I've seen so far: https://web.dev/media-session/

但是它说:

在撰写本文时(2020年3月),Chrome是唯一在桌面设备和移动设备上均支持Media Session API的浏览器.Firefox对台式机上的Media Session API提供了部分支持,并带有标记,而Samsung Internet也提供了部分支持.有关最新信息,请参见浏览器兼容性.

At the time of writing (March 2020), Chrome is the only browser that supports the Media Session API both on desktop and mobile. Firefox has partial support for the Media Session API on desktop behind a flag, and Samsung Internet also has partial support. See Browser compatibility for up-to-date information.

这是浏览器兼容性列表

除了Chrome,还已经在Safari(iOS)和Firefox(在Android)上对其进行了测试,但到2020年7月运气不佳:(

Besides Chrome, have tested it on Safari (iOS) and Firefox (on Android), no luck in July 2020 :(

这篇关于在iOS Safari中播放音频时如何设置缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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