AVPlayer in weird places

In order to view a livestream on Apple devices, you need to use AVPlayer, and pass in an HLS m3u8 stream. The thing is, you can use an AVPlayer in pretty much any context, even in places where you wouldn't expect to be able to use AVPlayer.

I first found this out when I was trying to send a livestream of my iPad to my Apple Watch. I used OBS to get an RTMP stream sent to my homelab, which used nginx to convert the RTMP stream to HLS. I was then able to see the stream on my watch! Some Apple engineer actually sat down and coded in livestream capabilities on the Apple Watch.

screenshot of WatchOS Simulator, showing a frame of Big Buck Bunny
I tried to get this to run on my real Apple Watch, but XCode wasn't playing nice so here's the simulator

That's still not as weird as this next one. Apps can have things called Keyboard Extensions. Think like Bitmoji Keyboard or SwiftKey. Those can have AVPlayers, and consequently livestreams. Ever wanted to watch Big Buck Bunny as you were searching for something in Spotlight? Neither did I.

screenshot of spotlight, with Big Buck Bunny playing
Shoutout Tailscale fr fr

Some guy at Apple, at some point, tested and programmed livestreaming a video on a keyboard. For science, I guess.