 Right, let's have a little chat about a brand new API that's just coming out on the platform called the Media Session API. I heard about it when I started doing this app. It was mentioned to me by a couple of the Chrome engineers. But Francois, who's on my team, there's a brilliant Google web developer's update where he explains in complete detail about how to set up the Media Sessions API. So check the notes below. We're going to pop in a link for that. I will just show you briefly what it actually looks like in the context of the app on the phone here. In fact, because you probably can't see it, let's switch across to the direct scream cam. There you go. That's what it looks like on the phone. So as I start playing a video like this, you see that if I swipe down from the top, we actually get a notification which has an icon here and it has play and rewind and fast forward buttons. And you get to configure those yourself. In fact, let me go into another one of these videos where I think I've actually set up to load some custom album art as well. So there's me and Jake. And you can see here now we've got custom album art, which is the picture of Jake. And the previous and next, the fast forward and rewind buttons are actually set to be skip forward 30 and go back 30. So I should be able to tap that and go forward 30, which you can see there. Oh, it's just skipped it right to the end. Whoops, a daisy. But I can replay the video. Don't worry. The other thing that it actually does, which I really like, is if I turn off the screen then on again, you can actually see that the picture, the album art, is actually the picture for my phone in the background. That is very exciting, isn't it? So let me show you a little bit as well since we're here. Let me show you a little bit of the code. It's very straightforward. We have a quick check whether we support the Media Session API, which is basically looking for, let me show you actually, it is just simply looking for Media Session in Navigator. And if we have Media Session in Navigator, then we consider ourselves having the Media Session API. And what we do is we say, navigator.mediasession.metadata. And then we create one of these new Media Metadata thingamajigs, which is very exciting. ESLint doesn't like it. It doesn't think it's a real thing. It is a real thing. You can totally use it. And you give it things like the title, the album, the artwork. I've only set the 512 and the 256, but very much like your manifest files for progressive web apps, you can set as many of these as you need. And the user agent will choose whichever one it thinks it makes the most sense for the device that it's on. And it will upscale and downscale as necessary. But I currently am just setting a couple of them. I may need more as time goes by. And then afterwards, after we've set up the metadata, we set some action handlers for things like the play, the pause, the seek backwards, and the seek forwards. The thing to bear in mind here is that any that you set will have the buttons appear in the notification. If you don't set one, because there are other ones that you can set as well. And I forget which ones they are, but check out Francois' post. He explains the whole Kikaboodle. Any that you don't set won't appear. Any that you do set will appear in the notification. And then somebody can control your stuff from the lock screen, or by just dragging down from the top. All very good, isn't it, that? And very straightforward code to be writing. So a brilliant little progressive enhancement thing that you can chuck on and that I have chucked on my media app. Cool. Toodaloo. Hey, folks, thanks for watching. Don't forget that there is more content that you can find kind of over here-ish. And if you want to subscribe, there's probably a button. Oh, maybe there. Maybe somewhere around there. Click that if you've not done that. Brilliant.