File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -269,28 +269,28 @@ export class SfuClient extends EventTarget {
269269 await Promise . all ( proms ) ;
270270 return stats ;
271271 }
272- async startRecording ( ) {
272+ async startRecording ( ) : Promise < boolean > {
273273 if ( this . state !== SfuClientState . CONNECTED ) {
274- return ;
274+ throw new Error ( "Cannot start recording when not connected" ) ;
275275 }
276276 return this . _bus ?. request (
277277 {
278278 name : CLIENT_REQUEST . START_RECORDING
279279 } ,
280280 { batch : true }
281- ) ;
281+ ) as Promise < boolean > ;
282282 }
283283
284- async stopRecording ( ) {
284+ async stopRecording ( ) : Promise < boolean > {
285285 if ( this . state !== SfuClientState . CONNECTED ) {
286- return ;
286+ throw new Error ( "Cannot stop recording when not connected" ) ;
287287 }
288288 return this . _bus ?. request (
289289 {
290290 name : CLIENT_REQUEST . STOP_RECORDING
291291 } ,
292292 { batch : true }
293- ) ;
293+ ) as Promise < boolean > ;
294294 }
295295
296296 /**
You can’t perform that action at this time.
0 commit comments