Const
Calls the MediaSFU create-room API and guards against duplicate in-flight room requests.
A short-lived localStorage marker is used to prevent accidental duplicate submissions while a room create request is still pending.
localStorage
API request options including credentials and create payload.
A result object containing either parsed response data or an error payload.
const created = await createRoomOnMediaSFU({ payload: { action: 'create', userName: 'Ada', duration: 60, capacity: 10, } as CreateMediaSFURoomOptions, apiUserName: 'sampleuser', apiKey: '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',});console.log(created.success); Copy
const created = await createRoomOnMediaSFU({ payload: { action: 'create', userName: 'Ada', duration: 60, capacity: 10, } as CreateMediaSFURoomOptions, apiUserName: 'sampleuser', apiKey: '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',});console.log(created.success);
Calls the MediaSFU create-room API and guards against duplicate in-flight room requests.
A short-lived
localStoragemarker is used to prevent accidental duplicate submissions while a room create request is still pending.