VR Video Player — reference workers and codecs
==============================================

A "worker" is any process that receives what VR Video Player is doing — the
video's companion files, every timeline event, and (for lighting) a live
stream of scene colors and human poses. Full protocol documentation:

    https://vrvideoplayer.app/workers.html

Contents
--------
  script_handler.py     Demo Script worker.   TCP 9000, web viewer on 9001.
  lighting_handler.py   Demo Lighting worker. TCP 9100, UDP 9101, viewer 9102.
  binary_reader.py      Python reference codec for the wire format.
  binary_writer.py
  BinaryReader.java     Java port of the same codec (byte-identical output).
  BinaryWriter.java

Requires Python 3.9+. No third-party packages.

Set your own key first
----------------------
Both handlers ship with APPKEY = "changeme" near the top of the file. Change
it to a value of your own, and pass the SAME value in the app's endpoint URL.
The key is a casual access check, not security — the traffic is plaintext.
Add TLS and a real token before running anything like this outside your own
network.

Run
---
    python3 script_handler.py      # TCP 9000 . viewer http://localhost:9001/?key=YOURKEY
    python3 lighting_handler.py    # TCP 9100 . UDP 9101 . viewer http://localhost:9102/?key=YOURKEY

Then, in the app's Script / Lighting settings, enter the LAN address of the
machine running the handler — not localhost, since the headset is a different
device:

    Script    <YOUR-IP>:9000?key=YOURKEY
    Lighting  <YOUR-IP>:9100?key=YOURKEY&pose=both

License
-------
Provided as-is, as reference implementations. Do what you like with them.
