HMSPeer class
100ms HMSPeer.
To use, import package:hmssdk_flutter/model/hms_peer.dart
.
HMSPeer model contains everything about a peer and it's track information.
A peer
is the object returned by 100ms SDKs that contains all information about a user - name, role, video track etc.
This library depends only on core Dart libraries and hms_audio_track.dart, hms_role.dart, hms_track.dart, hms_video_track.dart library.
- Implementers
Constructors
-
HMSPeer({required String peerId, required String name, required bool isLocal, required HMSRole role, required bool isHandRaised, String? customerUserId, String? metadata, HMSAudioTrack? audioTrack, HMSVideoTrack? videoTrack, List<
HMSTrack> ? auxiliaryTracks, HMSNetworkQuality? networkQuality, DateTime? joinedAt, DateTime? updatedAt, HMSPeerType type = HMSPeerType.regular}) - HMSPeer.fromMap(Map map)
-
factory
Properties
- audioTrack ↔ HMSAudioTrack?
-
audioTrack of the peer in the room
getter/setter pair
-
auxiliaryTracks
→ List<
HMSTrack> ? -
auxiliary tracks include Screenshare, Audio or Video files, etc published by this peer in the room
final
- customerUserId → String?
-
optional data which can be linked to a peer while joining room
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isHandRaised → bool
-
returns whether peer's hand is raised or not
final
- isLocal → bool
-
returns whether the peer is local or not.
final
- joinedAt → DateTime?
-
joinedAt is the time when peer joined the room
final
- metadata → String?
-
optional metadata of the peer in the room
final
- name → String
-
name of the peer in the room.
final
- networkQuality → HMSNetworkQuality?
-
networkQuality of the peer in room
final
- peerId ↔ String
-
id of the peer
latefinal
- role → HMSRole
-
the current role of the peer in the room
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → HMSPeerType
-
contains the type of peer whether it's a regular or SIP peer
Default value is regular
final
- updatedAt → DateTime?
-
updatedAt is the time when the peer object was last updated
final
- videoTrack ↔ HMSVideoTrack?
-
videoTrack of the peer in the room
getter/setter pair
Methods
-
getAllTracks(
) → Future< List< HMSTrack> > -
getTrackById(
{required String trackId}) → Future< HMSTrack> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
important to compare using peerId
override
Static Methods
-
fromListOfMap(
List peersMap) → List< HMSPeer>