@tencentcloud/roomkit-web-vue3
Version:
<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,
17 lines (13 loc) • 436 B
text/typescript
import { StreamInfo } from '../../../stores/room';
export default function useStreamContainer() {
const isSameStream = (
stream1: StreamInfo | null | undefined,
stream2: StreamInfo | null | undefined
) => getStreamKey(stream1) === getStreamKey(stream2);
const getStreamKey = (stream: StreamInfo | null | undefined) =>
`${stream?.userId}_${stream?.streamType}`;
return {
isSameStream,
getStreamKey,
};
}