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

1

13

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?

iPad lockscreen

Doubleedged answered 3/2, 2015 at 16:2 Comment(2)
Actually, this is a counter question: I only able to see play/pause button on the locked screen of iPhone/android phone. How you able to get next/prev. button when the locked screen?Fineable
I think the prev/next buttons are only shown if the audio has a fixed length (.currentDuration), in contrast to e.g. a live stream.Bergmans
A
17

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>
Artis answered 30/9, 2015 at 11:12 Comment(1)
Thanks for the tips. Note that this doesn't work on Android (it only display the url of the video/audio file)Triclinic

© 2022 - 2024 — McMap. All rights reserved.