Open ssssam opened 5 years ago
Images and videos can be injected following this example: https://github.com/zachkrall/hydra-workshop/blob/master/examples/07-use-image.js
var myElement = document.createElement('img');
myElement.src = '/path/to/img.jpg';
s0.init( { src: myElement , dynamic: false /* set true for video */ });
Security restrictions seem to prevent images from loading anywhere other than the server's public/
directory. But putting files in there is easy enough for now.
It would be nice to add a s0.initImage() and s0.initVideo() function that would create the element for you!
Need to update the hydra-synth README.md
Maybe if the server can share these over WebRTC, they can be used in the client as sources.