Skip to content

Commit

Permalink
Added suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 committed Nov 7, 2023
1 parent 1bf4201 commit 51cfdf8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Any>()
peer.auxiliaryTracks.forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions packages/hmssdk_flutter/lib/src/model/hms_date_extension.dart
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
1 change: 0 additions & 1 deletion packages/hmssdk_flutter/lib/src/model/hms_peer.dart
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 51cfdf8

Please sign in to comment.