livekit / components-js

Official open source React components and examples for building with LiveKit.
https://livekit.io
Apache License 2.0
149 stars 64 forks source link

Support referencing components via refs #827

Closed lukasIO closed 4 months ago

lukasIO commented 4 months ago

not being able to reference the underlying elements has been a long standing caveat with the react components. This PR adds the ability to reference e.g. the underlying HTMLVideoElement of the VideoTrack component via

const videoEl = React.createRef(null);

return <VideoTrack ref={videoEl} ... />
changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 23aa0cc566ce74cf1d7fcfe92d802b8367e6f948

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages | Name | Type | | --------------------------------- | ----- | | @livekit/components-react | Minor | | @livekit/component-example-next | Patch | | @livekit/components-js-docs | Patch | | @livekit/component-docs-storybook | Patch | | @livekit/components-docs-gen | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 4 months ago

size-limit report 📦

Path Size
LiveKitRoom only 1.87 KB (+0.9% 🔺)
LiveKitRoom with VideoConference 28.08 KB (+0.23% 🔺)
All exports 33.17 KB (+0.4% 🔺)