File size: 673 Bytes
4a5ef51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {NativeModule, registerWebModule} from 'expo';

import type {
  MentraVideoStreamReceiverModuleEvents,
  WebRtcReceiverResult,
} from './MentraVideoStreamReceiver.types';

class MentraVideoStreamReceiverModule extends NativeModule<MentraVideoStreamReceiverModuleEvents> {
  async isSupported(): Promise<boolean> {
    return false;
  }

  async startWebRtcReceiver(): Promise<WebRtcReceiverResult> {
    throw new Error('The video stream receiver is only available in the native example app.');
  }

  async stopWebRtcReceiver(): Promise<void> {}
}

export default registerWebModule(MentraVideoStreamReceiverModule, 'MentraVideoStreamReceiver');