Raven Docs

Screen Sharing

Publishing a screen share — Web and Flutter today; not yet on React Native.

await room.enableScreenShare();

Or, using the create-then-publish pattern:

const track = await client.createScreenShareTrack();
await room.publish(track);

Both use the browser's native getDisplayMedia() — there's no custom capture code, and no dependency on a particular browser's screen-picker UI.

Not available on React Native yet. @corvidhq/react-native reuses the same Room class as web and Flutter for camera/microphone, but mobile screen capture needs its own native integration per platform (ReplayKit on iOS, MediaProjection on Android) that hasn't been built. Calling enableScreenShare() there is not documented and should not be relied on.

What's not included (Web and Flutter)

Screen sharing currently surfaces video only. If the browser or OS also offers a screen-share-audio track (sharing a browser tab with sound, for instance), it isn't exposed by the SDK yet. If your application needs system audio alongside the shared screen, that's a gap to plan around rather than something to work around client-side.

Stopping

await room.disableScreenShare();

Same shape as camera/microphone on both platforms — see Audio & Video for the mute-vs-unpublish distinction, which applies here too.

Expected behavior

A remote participant sees a screen share exactly like any other video track — it arrives via trackSubscribed/participantChanges and attaches the same way. There's no separate "screen share" event; the track's kind is what distinguishes it ('screenShare').

Common errors

ErrorWhyFix
User cancels the browser's share pickerNo error thrown, enableScreenShare()'s promise rejects.Treat a rejection here as "user declined," not a real failure.
enableScreenShare() throws on iOS (Flutter)No Broadcast Upload Extension configured.Add one in Xcode — there's no software-only workaround.

Production notes

  • Don't assume screen share is available — check the platform before showing the button, especially on React Native.
  • A screen share ending unexpectedly (user stops sharing from the OS chrome, not your UI) still fires the normal unpublish path — listen for it rather than assuming your own button is the only way it stops.