@livekit/components-core
Version:
This package is a wrapper around the [livekit/client-sdk-js](https://github.com/livekit/client-sdk-js) package. It transforms the event based logic into simple to use observable state and component level APIs. This package is the core for all framework sp
14 lines (12 loc) • 529 B
text/typescript
import type { Room } from 'livekit-client';
import { log } from '../logger';
import { roomAudioPlaybackAllowedObservable } from '../observables/room';
import { prefixClass } from '../styles-interface';
export function setupStartAudio() {
const handleStartAudioPlayback = async (room: Room) => {
log.info('Start Audio for room: ', room);
await room.startAudio();
};
const className: string = prefixClass('start-audio-button');
return { className, roomAudioPlaybackAllowedObservable, handleStartAudioPlayback };
}