Looking-Glass / bridge.js

Bridge.js is a javascript API for interacting with Looking Glass displays via Looking Glass Bridge 2.2.0+
https://lookingglassfactory.com/software/looking-glass-bridge
MIT License
8 stars 0 forks source link

Is there a way to pass in raw data instead of a URI? #14

Open edhyah opened 11 months ago

edhyah commented 11 months ago

When creating a hologram, is it possible to pass in raw buffer data (such as uint8 array, base64 string) instead of a URI? Looking to dynamically create a video to play on the device.

BryanChrisBrown commented 11 months ago

Hi Edhyah,

currently Bridge can load data from either a url, or a file path. For dynamically creating a video, you could download it to the user's computer then have them play it back. Do you know what format the video would be in? We don't currently support raw buffer data.

BryanChrisBrown commented 11 months ago

You can use the legacy HoloPlay Service endpoint, demonstrated here: https://codesandbox.io/s/detect-a-looking-glass-l5o9d?from-embed using the HoloPlayCore.JS library

however this only works for images and is much slower than passing a url/uri in.

edhyah commented 11 months ago

Thanks. What about a mediastream object? I'm trying to stream an image stream to the looking glass programmatically without using looking glass studio

BryanChrisBrown commented 11 months ago

right now the legacy endpoint only supports images, you may be interesting in our webXR library which allows you to draw a canvas directly to the Looking Glass, this will allow for realtime approaches.

https://github.com/Looking-Glass/looking-glass-webxr