diff --git a/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSPeerExtension.kt b/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSPeerExtension.kt index a508cc3a9..68ad7efb6 100644 --- a/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSPeerExtension.kt +++ b/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSPeerExtension.kt @@ -20,7 +20,7 @@ class HMSPeerExtension { args["audio_track"] = HMSTrackExtension.toDictionary(peer.audioTrack) args["video_track"] = HMSTrackExtension.toDictionary(peer.videoTrack) args["network_quality"] = HMSNetworkQualityExtension.toDictionary(peer.networkQuality) - args["joined_at"] = peer.joinedAt // should be seconds since epoch time + args["joined_at"] = peer.joinedAt val auxTrackList = ArrayList() peer.auxiliaryTracks.forEach { diff --git a/packages/hmssdk_flutter/ios/Classes/Models/HMSPeerExtension.swift b/packages/hmssdk_flutter/ios/Classes/Models/HMSPeerExtension.swift index 8e84988de..873ddf980 100644 --- a/packages/hmssdk_flutter/ios/Classes/Models/HMSPeerExtension.swift +++ b/packages/hmssdk_flutter/ios/Classes/Models/HMSPeerExtension.swift @@ -19,8 +19,8 @@ class HMSPeerExtension { "is_hand_raised": peer.isHandRaised, "customer_description": peer.metadata ?? "", "customer_user_id": peer.customerUserID ?? "", - "joined_at": Int(peer.joinedAt.timeIntervalSince1970)*1000, - "updated_at": Int(peer.updatedAt.timeIntervalSince1970)*1000 + "joined_at": Int(peer.joinedAt.timeIntervalSince1970 * 1000), + "updated_at": Int(peer.updatedAt.timeIntervalSince1970 * 1000) ] as [String: Any] if let metadata = peer.metadata { diff --git a/packages/hmssdk_flutter/lib/src/model/hms_date_extension.dart b/packages/hmssdk_flutter/lib/src/model/hms_date_extension.dart index cd1e7c331..caf3f96c0 100644 --- a/packages/hmssdk_flutter/lib/src/model/hms_date_extension.dart +++ b/packages/hmssdk_flutter/lib/src/model/hms_date_extension.dart @@ -1,11 +1,12 @@ -import 'dart:developer'; - ///100ms HMSDateExtension /// ///[HMSDateExtension] is used to convert android and ios native time format to DateTime type ///in local time zone format. -class HMSDateExtension { +///Dart imports +import 'dart:developer'; + +class HMSDateExtension { ///Returns DateTime object from String static DateTime convertDateFromString(String date) { DateTime _dateTime = DateTime.parse(date).toLocal(); diff --git a/packages/hmssdk_flutter/lib/src/model/hms_peer.dart b/packages/hmssdk_flutter/lib/src/model/hms_peer.dart index 76ffb8ff1..d1eb9a1ac 100644 --- a/packages/hmssdk_flutter/lib/src/model/hms_peer.dart +++ b/packages/hmssdk_flutter/lib/src/model/hms_peer.dart @@ -1,6 +1,5 @@ // Project imports: import 'package:hmssdk_flutter/hmssdk_flutter.dart'; -import 'package:hmssdk_flutter/src/model/hms_date_extension.dart'; import 'package:hmssdk_flutter/src/service/platform_service.dart'; ///100ms HMSPeer.