Video Element
The video element is created and managed by the ArcwareApplication
instance, which is responsible for playing the video stream.
Initialization
Initialize your ArcwarePixelStreaming
instance and create an ArcwareApplication
instance as follows, or use the ArcwareInit
method to initialize all you need in a single call.
const config = new ArcwareConfig({ /** ... */ });
const pixelStreaming = new ArcwarePixelStreaming(config);
const application = new ArcwareApplication({ stream: pixelStreaming });
// or
const { Application } = ArcwareInit(/** ... */);
Embedding the Video
After creating the ArcwareApplication
instance, append the video element to the stream container:
const container = document.querySelector(`#${containerId}`);
if (!container) throw new Error("Container is undefined.");
// Append the root element of the application to the container
container.appendChild(application.rootElement);
Last updated