Skip to content

Commit 7bb4b5d

Browse files
mmustafa-tseMohammed Mustafa
andauthored
feat: Calculate mediaTimeSpent based on current time (#42)
Co-authored-by: Mohammed Mustafa <[email protected]>
1 parent 0fb5035 commit 7bb4b5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mParticleCore.brs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,9 @@ function mParticleSGBridge(task as object) as object
22942294
logQoS: function(mediaSession as object, startupTime as integer, droppedFrames as integer, bitRate as integer, fps as integer, options = {} as object) as void
22952295
m.invokeFunction("media/logQoS", [mediaSession, startupTime, droppedFrames, bitRate, fps, options])
22962296
end function,
2297+
getMediaTimeSpent: function(mediaSession as object) as longinteger
2298+
return m.unixTimeMillis() - mediaSession.mediaSessionStartTime
2299+
end function,
22972300
unixTimeMillis: function() as longinteger
22982301
date = CreateObject("roDateTime")
22992302
currentTime = CreateObject("roLongInteger")

0 commit comments

Comments
 (0)