mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-18 14:33:24 +00:00
16daf7b8d3
Add a custom virtual background feature. If the backend supports uploading files, backgrounds are stored in the backend for the user. Otherwise, only one background image can be selected.
29 lines
839 B
TypeScript
29 lines
839 B
TypeScript
import { useLocalParticipant } from '@livekit/components-react'
|
|
import { LocalVideoTrack } from 'livekit-client'
|
|
import { css } from '@/styled-system/css'
|
|
import { EffectsConfiguration } from './EffectsConfiguration'
|
|
import { useCanPublishTrack } from '@/features/rooms/livekit/hooks/useCanPublishTrack'
|
|
import { TrackSource } from '@livekit/protocol'
|
|
|
|
export const Effects = () => {
|
|
const { cameraTrack } = useLocalParticipant()
|
|
const localCameraTrack = cameraTrack?.track as LocalVideoTrack
|
|
|
|
const canPublishCamera = useCanPublishTrack(TrackSource.CAMERA)
|
|
|
|
return (
|
|
<div
|
|
className={css({
|
|
padding: '0 1.5rem',
|
|
overflowY: 'scroll',
|
|
})}
|
|
>
|
|
<EffectsConfiguration
|
|
isDisabled={!canPublishCamera}
|
|
videoTrack={localCameraTrack}
|
|
layout="vertical"
|
|
/>
|
|
</div>
|
|
)
|
|
}
|