HMSLocalPeer class
100ms HMSLocalPeer.
To use, import package:hmssdk_flutter/model/hms__local_peer.dart
.
HMSLocalPeer model contains everything about a local peer and it's tracks 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_local_audio_track.dart, hms_role.dart, hms_track.dart, hms_local_video_track.dart library. HMSLocalPeer instance of the localPeer means your instance in the room.
Constructors
-
HMSLocalPeer({required String peerId, required String name, required bool isLocal, required HMSRole role, required bool isHandRaised, String? customerUserId, String? metadata, HMSLocalAudioTrack? audioTrack, HMSLocalVideoTrack? videoTrack, List<
HMSTrack> ? auxiliaryTracks, HMSNetworkQuality? networkQuality, DateTime? joinedAt, DateTime? updatedAt, HMSPeerType type = HMSPeerType.regular}) - HMSLocalPeer.fromMap(Map map)
-
factory
Properties
- audioTrack ↔ HMSAudioTrack?
-
audioTrack of the peer in the room
getter/setter pairinherited
-
auxiliaryTracks
→ List<
HMSTrack> ? -
auxiliary tracks include Screenshare, Audio or Video files, etc published by this peer in the room
finalinherited
- customerUserId → String?
-
optional data which can be linked to a peer while joining room
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHandRaised → bool
-
returns whether peer's hand is raised or not
finalinherited
- isLocal → bool
-
returns whether the peer is local or not.
finalinherited
- joinedAt → DateTime?
-
joinedAt is the time when peer joined the room
finalinherited
- metadata → String?
-
optional metadata of the peer in the room
finalinherited
- name → String
-
name of the peer in the room.
finalinherited
- networkQuality → HMSNetworkQuality?
-
networkQuality of the peer in room
finalinherited
- peerId ↔ String
-
id of the peer
latefinalinherited
- role → HMSRole
-
the current role of the peer in the room
finalinherited
- 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
finalinherited
- updatedAt → DateTime?
-
updatedAt is the time when the peer object was last updated
finalinherited
- videoTrack ↔ HMSVideoTrack?
-
videoTrack of the peer in the room
getter/setter pairinherited
Methods
-
getAllTracks(
) → Future< List< HMSTrack> > -
inherited
-
getTrackById(
{required String trackId}) → Future< HMSTrack> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
important to compare using peerId
inherited