@htmlbricks/hb-player-input-streaming
v0.71.9
Published
Requests camera and microphone with `getUserMedia`, binds the stream to a `<video>` element, and exposes basic controls (play/pause, fullscreen, enable/disable video and audio tracks). Emits `AudioVideoAccess` with grant result and `VideoInitialized` with
Readme
hb-player-input-streaming — player input streaming
Category: media
Tags: media, video, camera
What it does
Requests camera and microphone with getUserMedia, binds the stream to a <video> element, and exposes basic controls (play/pause, fullscreen, enable/disable video and audio tracks). Emits AudioVideoAccess with grant result and VideoInitialized with the video element reference once the stream is attached.
Custom element
hb-player-input-streaming
Attributes (snake_case; use string values in HTML)
id(optional): string — echoed on dispatched events.
Events
AudioVideoAccess:{ granted: boolean; id: string }.VideoInitialized:{ videoElement; id: string }.event:{ test: boolean }(test hook in source).
Usage notes
- Requires secure context and user permission for camera/microphone.
- Types in
webcomponent.type.d.tsonly listevent; runtime also dispatchesAudioVideoAccessandVideoInitialized(seecomponent.wc.svelte).
Minimal HTML example
<hb-player-input-streaming id="cam1"></hb-player-input-streaming>