Is it possible to change the iOS 8 lock screen audio label when playing from web?

喜夏-厌秋 提交于 2019-11-30 02:12:57

问题


I am building an HTML5 app that plays audio. However, when playing audio on iOS8 iPad/iPhone in lock screen mode, the URL of the audio is showing (see pic below). It would be great if it was possible to change that text to something more describing, such as the Artist/Title of the track. The logical solution would be to read from a title attribute or some apple-specific meta tag, but nothing I have tried seems to work.

Does anyone know if the text can be altered with html/javascript?


回答1:


You can give an audio and video tag a title attribute in HTML5. This is displayed in now-playing info center. I haven't found any other attributes that are used. Since you are building a web app, you are limited in what you can do.

<audio src="" type="" controls title=""></audio>
<video src="" type="" controls webkit-playsinline x-webkit-airplay="" poster="" title=""></video>


来源:https://stackoverflow.com/questions/28303376/is-it-possible-to-change-the-ios-8-lock-screen-audio-label-when-playing-from-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!