Home - xrchisense/xrevent-broadcaster-unity GitHub Wiki

Problem Statement

This project focusses on low-latency video streaming into VR worlds created with Unity and experienced using Oculus, Oculus2 or Pico 4. Low-latency video streaming can solve two interaction problems in VR:

  1. Presence between remote performer and visitors.
  2. Communication between visitors about video content (synchronicity).

1 Cross-Reality Presence

Cross-Realiy applications are focussed on facilitating interaction among users who's presence may origin from different environments. Users presence may origin from bodily activities in VR or videostreams containing their presence representations. In our use case a creator is streaming live video to a VR world. In order to react on his audience (e.g. in a live set), a timely feedback is essential. Think of a commedian pacing reactions and new actions. A delay of 3-5 seconds breakes up the communication cycle. It may even dissolve the perceived presence among creator and audience. The below diagram shows latencies typical for HLS (HTTP Live-Streaming) we may be familiar with when watching a youtube livetream connecting video presence of the streamer with the live chat presence of the audience.

HLS versus WebRTC Diagram.

With the xrevent-broadcaster plugin, the video stream can use WebRTC boosting up the round trip speed of a stimulus-response cycle to sub-second transmission time. A greater greater perceived presence is the result.

2 Synchronicity:

The second issue when socializing in VR in a multi-user scenario regards the information which is perceived. Typically video and audio is often played in a "onStart" or "onEnter" basis in Unity. Ambient music for examle just starts e.g. when entering the elevator. This results in offset information presented to each user. In our opinion this is a wasted opportinity to facilitate conversations about e.g. personal preferences an opportunity for a shared encounter is lost by design.

With the xrevent-broadcaster all visitors perceive the same information in a timely manner, eventhough their internet bandwith may vary greatly. Depending on the used steaming service (e.g. we recommend livekit), the xrevent-broadcaster is able to reduce video quality in order to keep realtime streaming up without falling back to buffering states.

Quickstart Demo

We have created two demos to illustrate either of the two stated problems above. Have a look at the LiveSet Demo and the CinemaDemo to explore the live streaming experience in a readymade multiplayer scenario.

Main repositories

  1. To get the xrevent-broadcaster plugin to work you need to use a WebRTC provider. We used livekit to create a browser based video ingest and signal testing react app. The repository for the app can be found here: https://github.com/xrchisense/xrevent-broadcaster-react

  2. The plugin to use in your Unity app, can be found here: https://github.com/xrchisense/xrevent-broadcaster-unity

  3. And the low-level code, the actual Android Plugin, can be found here: https://github.com/xrchisense/xrevent-broadcaster-android

⚠️ **GitHub.com Fallback** ⚠️