How to set the HTML video title that is shown in Chrome and Windows?



How can I set the name (label) of HTML5 <video> element that browsers (like Chrome) and Windows OS display?

Like the title that Windows shows for this youtube video (when changing speaker volume):

enter image description here

Currently for me the page title is shown (the title set in page head).
I tried adding a title="..." attribute to the video element but it had no effect. Also didn’t find a solution on StackOverflow.


As the other answer stated, it can be done with JavaScript and Media Session API.
Check out this YouTube video.

if ("mediaSession" in navigator) {
  navigator.mediaSession.metadata = new MediaMetadata({
    title: "Unforgettable",
    artist: "Nat King Cole",
    album: "The Ultimate Collection (Remastered)",
    artwork: [
      { src: "", sizes: "128x128", type: "image/png" },
      { src: "", sizes: "512x512", type: "image/png" }

Answered By – Mahozad

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More