Like many of you, I am counting the minutes until the Battle for the Dawn this Sunday on Game of Thrones. Episode 2, “A Knight of the Seven Kingdoms,” tied a nice bow on so many character arcs ahead of their possible demise. However, it was the moment in which Jaime knighted Brienne that stood out as a testament to how far these characters have all come to be in this moment together.

While waiting for Sunday, I thought I would hack together a simple web app that recreates the knighting ceremony using my iPhone’s Device Orientation events. Specifically, I would like to progress through audio clips from Jamie’s speech as I place my phone onto the shoulders of a deserving warrior. I’ve created a very rough version of this concept on Codepen which you can try from your iPhone. However, you will need to make sure Orientation access is turned on since it is now disabled by default.

General > Safari > Privacy & Security > Motion & Orientation Access

Start by holding your phone vertically and clicking “Begin Knighting.” Make sure your audio is turned up and you have a subject to practice on. The instructions on the screen are for the next step so let the audio clips play through when they are triggered.

Read on to find out how I approached this concept.