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

hampusohlsson
  • 10,109
  • 5
  • 33
  • 50
  • 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? – Nikhil Pingle Apr 05 '17 at 13:59
  • 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. – ernesto Jul 28 '17 at 12:01

1 Answers1

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>
Corey Evans
  • 181
  • 1
  • 6