Check video and position are both valid before reporting playback info

This commit is contained in:
Neil Burrows 2021-04-10 16:01:07 +01:00
parent a17b93824e
commit b6a772184b

View File

@ -314,6 +314,9 @@ function getAudioInfo(meta as object) as object
end function end function
function ReportPlayback(video, state = "update" as string) function ReportPlayback(video, state = "update" as string)
if video = invalid or video.position = invalid then return void
params = { params = {
"PlaySessionId": video.PlaySessionId, "PlaySessionId": video.PlaySessionId,
"PositionTicks": int(video.position) * 10000000&, 'Ensure a LongInteger is used "PositionTicks": int(video.position) * 10000000&, 'Ensure a LongInteger is used