This is a very basic example of drawing remote video tracks from sariska-media-transport on objects in Unity (WebGL only).
- When sariska-media-transport reports new a remote video track, it is attached to an HTML
videoelement, which is stored in a JS global. - A script component is attached to a Unity object. The script's
Startfunction creates a texture and attaches it to a material on the object. The script'sUpdatefunction calls a JS plugin method, passing a pointer to the texture. - The JS plugin method uses
texSubImage2Dto copy pixels from thevideoelement of the first remote track onto the texture. In a real application you would identify the remote tracks (e.g. by participant ID) and paint each one on a separate object.
For other platforms than WebGL, integration would be more complex as it would require the signalling to be implemented natively. Contact us if you are interested in native integration.