What the iPhone Duo means for web development (and Video.js)
Published 2026-10-06.
You would think our first post after the Video.js v10.0.0 release would be some fascinating deep dive on our composable architecture, or our compiler, or maybe a multi-part series on our library agentic experience research.
But you know what? We’ve been working really hard to get Video.js out the door. So instead of writing a real blog post, I decided to spend the weekend on a little side project: digging into the web APIs that we’ll have access to on the iPhone Duo.
I know, I know, this kind of folding stuff has been kicking around on Android for years. But I’ve been an iOS user since my beloved HTC One died over ten years ago. And now, Tim John Apple has finally decreed it to be my turn to fold a phone.
And I’m excited for my turn. Not only for the joy of once again having a small phone (iPhone mini, i miss u 🥺). But also for what this means for developers. Apple released six videos on building great apps for the iPhone Duo. The videos cover APIs that tell you about the device’s physical characteristics and state, and they’re brimming with design inspiration for the types of apps and interactions developers can build now.
But this is Apple. Did they leave any scraps for us web developers?
What web APIs are available for the iPhone Duo?
After downloading Xcode 27.1 beta1, I immediately fired up the simulator Device Hub, booted an iPhone Duo, beelined for the settings, and dug into the feature flags.2

I love feature flags. This list is an absolute toy box of the future of the web; the cool features that maybe, someday we’ll get to play with. I pause and look up a few as I pass by. Like, what the heck is CSS Rhythmic Sizing??
But no. I’ve got to focus. I’m here for two specific things. And after a bit of scrolling, I find them. The Device Posture API and the Viewport Segment API.
The Device Posture API
The Device Posture API basically tells you whether the display you’re looking at is continuous (e.g., your normie screen, flat or curved, so 2018) or folded (e.g., a folding phone partially folded, like a laptop). This works in JavaScript — navigator.devicePosture — or in CSS — @media (device-posture: folded).
The Viewport Segments API
The Viewport Segments API tells you about the individual regions of your display. In JavaScript, window.viewport.segments gives you an array of DOMRects telling you about the size, shape, and location of the segments.
In CSS, you can learn about segments in two ways. First, @media (horizontal-viewport-segments: n) and @media (vertical-viewport-segments: n) let you respond to the number of (you guessed it) horizontal and vertical viewport segments. Second, you can access the position and size of any segment with CSS environment variables. Want to access the width of the top-right segment? env(viewport-segment-width 1 0) will get you there. (The first number is the horizontal index, the second is vertical).
Let’s say, for example, you have a full-bleed two-column layout that you want to snap to the segments when the screen is folded so your content doesn’t go in the crease. You might write something like this…
Which would create an effect like this


Building a web video player for folding phones
Ok, that’s all fine and good, but let me tell you why we’re really here. After the Apple media event, I saw a few folks try out the new Netflix app for iPhone Duo and the folded player made perfect sense. Video in the top half, controls in the bottom, and a subtle flourish that reflected the video onto the bottom screen.

Having spent the year in Video.js, obviously my first thought was “can we do this?”
The short answer is “no”. Despite an open Duo being basically an iPad, Apple still doesn’t allow our elements in fullscreen. We’re stuck with native controls.

But that’s a boring end to a blog post. And for some reason, the Fullscreen API is available as a feature flag. So I go in and enable it… and…

omg are those Video.js controls in full screen on the iPhone Duo?? I don’t think it takes too much imagination to figure out what comes next.
Let’s see if I can reproduce the Netflix UI with Video.js components and CSS.
Putting controls on the bottom screen
I start by grabbing a Video.js skin with the shadcn CLI and adding a whole new section to it.3
I also need some extra controls and icons to match that Netflix UI, so I add just a bit more JS:
And from here? If you’ve been paying attention, this CSS shouldn’t be too surprising. We check to see if we’re in a vertical, folded posture, and we position the video and controls.4
And voila! If you ignore the custom fullscreen controls Apple draws along the top, you could almost pretend this is a native app.

Reflecting the video on the bottom screen
While we’re here, let’s go one step further. The Netflix video “reflects” onto the bottom screen. Can we do that, too?
First, I try -webkit-box-reflect, which happily reflects normal DOM elements, but unfortunately not a <video>. At least not on iOS Safari. Then, I remember that one of my colleagues built a version of Mux Player that mimics YouTube’s Ambient Mode.
Here’s the gist of it. First, we copy each frame onto a tiny canvas:
Then, we flip that canvas, blur it, and fade it:
And there it is. A gentle cast behind the controls.

And on that bombshell…
It’s about now that I remember that I had to enable three feature flags to get here. And while I can imagine Apple enabling the Viewport Segments API and Device Posture API, it’s a lot harder to imagine the Fullscreen API considering the ergonomic and power-consumption concerns Apple likely has.
Of course, as much as the fanboys (like tbh me) want to pretend otherwise, there is a whole ecosystem of fantastic Android folding phones. So let’s try this on a Pixel 9 Pro Fold emulator I’ve got lying around… Running Chromium 157…
![]()
Nope. Despite the CSS media query reporting the correct posture and segments, Chromium only displays fullscreen content on the top half. The bottom gets clipped, intentionally.5
So. On both the iPhone Duo and the Pixel Fold, the Netflix UI remains but a dream.
Oh well. I’m still pleased we got pretty close. And at the end of it all? This turned into a Video.js v10 launch post anyways. I love that our new composable architecture let me imagine a video player and just build it with some straightforward HTML/CSS. Pretty neat.
Footnotes
-
Not 27.2, that would make too much sense. If you’re managing multiple versions of Xcode, our team is partial to the app Xcodes. ↩
-
For the curious, Apps > Safari > Advanced > Feature Flags. Yes the setting exists, it’s just weirdly buried below a yawning gap at the bottom of the screen. ↩
-
I could reposition existing controls, but for the sake of this demo, it’s easier to duplicate stuff in the DOM. ↩
-
Full disclosure. Not everything worked the way I expected it to. When positioning the top content,
bottom: env(viewport-segment-bottom 0 0)placed the video smack dab on the seam. Meanwhile, when positioning controls,height: env(viewport-segment-height 0 1)made content flow wayyy off the bottom of the screen. Not sure why. If you know what I missed, let me know! ↩ -
In theory, this makes sense. You only want the
<video>in the top half so it doesn’t span across the seam. In practice, maybe Chromium could do what WebKit seems to have done and reposition just the<video>while letting the whole fullscreen container span both segments. Maybe I should hit Chromium with a PR… ↩