Virtual Display Use Case Exploration

A Collection of Interesting Ideas

Second Screen WG/CG virtual meeting

8 June 2022

Anssi Kostiainen

Second Screen WG/CG virtual meeting

Deskreen demo

Sidecar demo

Second Screen WG/CG virtual meeting

Virtual Display?

"a display instance without a physical connection to the graphics card"

"a software representation of a physical display"

Second Screen WG/CG virtual meeting

UX Considerations 🤩

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

1️⃣ Display Arrangement

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

2️⃣ Display Source Picker

Second Screen WG/CG virtual meeting

(Chrome display source picker UI, https://www.webrtc-experiment.com/getDisplayMedia/)

Second Screen WG/CG virtual meeting

3️⃣ Virtual Display Creation

Second Screen WG/CG virtual meeting

(Deskreen Virtual Display Picker UI, https://deskreen.com/)

Second Screen WG/CG virtual meeting

2️⃣ getDisplayMedia UI vs 3️⃣ Deskreen Virtual Display UI

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

4️⃣ Window Placement

Second Screen WG/CG virtual meeting

Implicit consent example: drag and drop

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

OSes have a variety of implicit consenting mechanisms

  • Keyboard shortcuts in Windows: "Windows logo key + Shift + Left arrow or Right arrow to move an app or window in the desktop from one monitor to another."

  • Drag and drop evolved in macOS: "Drag the app window you want to move to the edge of the screen [or] enter Mission Control, then drag the window up to the space you want to use."

Could such implicit permission grants work for web app window placement?

Second Screen WG/CG virtual meeting

The traditional Web API approach: user's consent via browser prompt

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

OS-level: controls built into window manager

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

Browser prompt vs OS controls

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

Goal: Enable UX innovation and protect the user's privacy

How? Set a strong privacy baseline & leave room for Quality of Implementation differentiation?

Second Screen WG/CG virtual meeting

Virtual Display support for the web

Ideation 🧪

Second Screen WG/CG virtual meeting

Goals

  • "Let me create a new virtual display surface & place windows on it, get its relative positioning and a representation I can pass on to other Web APIs."
  • MediaStream as the "common currency" for getDisplayMedia & WebRTC interop
  • Reuse existing API constructs and browser and OS UI/UX

Constraints

  • Agnostic with regard to the display technology
  • Meet security and privacy expectations
Second Screen WG/CG virtual meeting

Assumptions

  • Web users expect multi-screen use cases to work similarly with Virtual Displays
  • Web APIs shouldn't(?) fully abstract away virtual/physical display boundary

Requirements (to make this a 1st class web capability) 👋

  • A new virtual display surface type that maps to an OS-level concept
  • Allow {extending|mirroring} of {monitor|window|browser} display surface to a virtual display surface
  • User-initiated and programmatic window placement
  • Use platform-native UX concepts (e.g. drag/move windows across, share controls)
Second Screen WG/CG virtual meeting

Related work

  • Platform-level: open-source projects (Deskreen), mainstream product features (Sidecar) and more...

Related, but different use cases

Second Screen WG/CG virtual meeting

Deskreen Experiments 🧪

Second Screen WG/CG virtual meeting

Use Case 1️⃣: Browser of the tablet as an ad-hoc Virtual Display

"Sometimes I want to use the display of my tablet along with my primary device's display and let web apps make use of both. I want to be able to control what web content to present on my tablet."

Second Screen WG/CG virtual meeting


Download video as .mp4

Second Screen WG/CG virtual meeting

Use Case 2️⃣: TV as an ad-hoc Virtual Display

"Sometimes when lounging in the living room I want to extend my workspace to the TV. I want to stay in control of what web content to share on the TV to a larger audience."

Second Screen WG/CG virtual meeting


Download video as .mp4

Second Screen WG/CG virtual meeting

1️⃣ Prototype Implementation Details

  1. Deskreen mirrors a virtual display (created with BetterDummy) to a browser window on a tablet
  • WebRTC MediaStream
  • Same LAN
Second Screen WG/CG virtual meeting

Deskreen Architecture

See also: session initiation sequence diagram

Second Screen WG/CG virtual meeting

2️⃣ Prototype Implementation Details

  1. Deskreen mirrors a virtual display (created with BetterDummy) to an offscreen browser window
  2. Presentation API mirrors that offscreen browser window to a TV connected to a Chromecast (1-UA mode triggered via browser UI)
Second Screen WG/CG virtual meeting

Design Noodling 🍜

Second Screen WG/CG virtual meeting

1️⃣ Display Arrangement

⚙️ OS & Platform APIs - built-in feature, some API gaps

🌍 Web APIs

Second Screen WG/CG virtual meeting

2️⃣ Display Source Picker

🌍 Web APIs

getDisplayMedia extension ideas (reusable for picking multiple virtual displays?):

Second Screen WG/CG virtual meeting

3️⃣ Virtual Display Creation

⚙️ OS & Platform APIs - "advanced users only"

🚫 Web APIs

Second Screen WG/CG virtual meeting

API Ideation 💡

Second Screen WG/CG virtual meeting

Reusable concepts

getDisplayMedia extensions

Second Screen WG/CG virtual meeting

IDL sketch

partial interface MediaDevices {
  Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamConstraints constraints = {});
};

enum DisplayCaptureSurfaceType {
  "monitor",
  "window",
  "browser",
  "virtual" // new
};
Second Screen WG/CG virtual meeting

Considered Alternatives

New "getDisplaySurface" API

  • Redundant if getDisplayMedia extensions satisfy reqs

Presentation API extension

Remote Playback API extensions

  • Remote Playback API via HTMLMediaElement.srcObject = ms too much indirection
Second Screen WG/CG virtual meeting

Possible path from an Exploration onwards

Second Screen WG/CG virtual meeting
  • 1️⃣   Explainer 🔗
    • Use cases, reqs, API sketch, considered alternatives     📍We are here!

  • 2️⃣   Explainer review
    • Web community, browser & OS vendors, hardware ecosystem

  • 3️⃣   Draft web spec
    • W3C Second Screen CG in collaboration with WebRTC WG?

  • 4️⃣  🧪 Prototype in code
  • 5️⃣  📢 Prototype feedback
    • Web developer feedback can change the shape of the API significantly

  • 6️⃣   Standards track
    • Subject to support, possible WG adoption

Second Screen WG/CG virtual meeting

</html>

Second Screen WG/CG virtual meeting
Second Screen WG/CG virtual meeting

# References ## Specs

## Product-related

## Somewhat Related Demos