mirror of
https://github.com/SrIzan10/helium.git
synced 2026-06-06 00:56:58 +00:00
16 lines
378 B
TypeScript
16 lines
378 B
TypeScript
import { defineStore} from 'pinia';
|
|
|
|
export const useStreamerStore = defineStore('streamer', {
|
|
state: () => ({
|
|
code: '',
|
|
peerConnections: {} as Record<string, RTCPeerConnection>,
|
|
}),
|
|
actions: {
|
|
setCode(code: string) {
|
|
this.code = code;
|
|
},
|
|
addPeerConnection(id: string, pc: RTCPeerConnection) {
|
|
this.peerConnections[id] = pc;
|
|
},
|
|
},
|
|
}); |