Skip to content

Commit

Permalink
fix: add error message for peerlist iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 authored Oct 19, 2023
1 parent 2ca2577 commit 349472e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/hms-video-web/src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ export class HMSSdk implements HMSInterface {
}

getPeerListIterator(options?: HMSPeerListIteratorOptions) {
if (!this.transport || !this.store) {
throw ErrorFactory.GenericErrors.NotConnected(
HMSAction.VALIDATION,
`Ensure preview or join is called and room state is Preview or Connected before calling this`,
);
}
return new HMSPeerListIterator(this.transport, this.store, options);
}

Expand Down

0 comments on commit 349472e

Please sign in to comment.