Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FirebaseSignaling

Hierarchy

  • BaseSignaling
    • FirebaseSignaling

Index

Constructors

constructor

Properties

Protected _autoclean

_autoclean: boolean = true

Protected _roomRecordEmitter

_roomRecordEmitter: EventEmitter<RoomRecord>

Protected _uuid

_uuid: string = ''

Private db

db: Firestore

Private pairRecordMap

pairRecordMap: Map<string, DocumentReference<DocumentData>> = ...

Protected pairingMap

pairingMap: Map<string, PairingItem> = ...

Protected roomRecord

roomRecord: null | RoomRecord = null

Private roomRef

roomRef: null | DocumentReference<DocumentData> = null

Private roomsCollectionRef

roomsCollectionRef: CollectionReference<DocumentData>

Accessors

autoclean

  • get autoclean(): boolean
  • set autoclean(value: boolean): void

roomRecordEmitter

  • get roomRecordEmitter(): EventEmitter<RoomRecord>

uuid

  • get uuid(): string

Methods

Private bindRoom

  • bindRoom(roomId: string, username: string): Promise<boolean>

Protected cleanup

  • cleanup(): void

hostRoom

  • hostRoom(roomId: string, username: string, uuid: string): Promise<boolean>
  • Parameters

    • roomId: string
    • username: string
    • uuid: string

    Returns Promise<boolean>

Protected internalHostRoom

  • internalHostRoom(roomId: string, username: string): Promise<boolean>

Protected internalJoinRoom

  • internalJoinRoom(roomId: string, username: string): Promise<boolean>

joinRoom

  • joinRoom(roomId: string, username: string, uuid: string): Promise<boolean>
  • Parameters

    • roomId: string
    • username: string
    • uuid: string

    Returns Promise<boolean>

newPairings

  • newPairings(mesh: Mesh): Promise<string>

Protected pairingRecordChanged

  • pairingRecordChanged(mesh: Mesh, info: PairingRecord, peer: PeerRecord, myIndex: number, index: number): void
  • Parameters

    • mesh: Mesh
    • info: PairingRecord
    • peer: PeerRecord
    • myIndex: number
    • index: number

    Returns void

Protected roomRecordChanged

  • roomRecordChanged(info: RoomRecord, roomId: string, username: string, uuid: string): void
  • Parameters

    • info: RoomRecord
    • roomId: string
    • username: string
    • uuid: string

    Returns void

Protected saveIceCandidate

  • saveIceCandidate(uuid: string, candidate: string): void

Protected savePairing

  • savePairing(mesh: Mesh, myIndex: number, index: number, peer: PeerRecord): void

Protected savePairingRecord

  • savePairingRecord(info: PairingRecord, uuid: string): void

Protected saveRoomInfo

  • saveRoomInfo(): void

startPairings

  • startPairings(mesh: Mesh): Promise<boolean>

upatePlayerStatus

  • upatePlayerStatus(ready: boolean): void
  • Parameters

    • ready: boolean

    Returns void

Generated using TypeDoc