Skip to content

Commit

Permalink
fix:Convert Media Session Timestamps to UNIX (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmustafa-tse authored Jul 24, 2024
1 parent 8a68e7d commit d2077b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mParticle-Apple-Media-SDK/MPMediaSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ let PlayerOvp = "player_ovp"
let mediaEvent = self.makeMediaEvent(name: .sessionSummary, options: nil)

var customAttributes: [String:Any] = mediaEvent.getEventAttributes()
customAttributes[startTimestampKey] = self.mediaSessionStartTimestamp
customAttributes[endTimestampKey] = self.mediaSessionEndTimestamp
customAttributes[startTimestampKey] = Int(self.mediaSessionStartTimestamp.timeIntervalSince1970 * 1_000)
customAttributes[endTimestampKey] = Int(self.mediaSessionEndTimestamp.timeIntervalSince1970 * 1_000)
customAttributes[contentIdKey] = self.mediaContentId
customAttributes[contentTitleKey] = self.title
customAttributes[mediaTimeSpentKey] = self.mediaTimeSpent
Expand Down

0 comments on commit d2077b8

Please sign in to comment.