From b6a772184b1bb5908c1206f894160bd214c55f63 Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Sat, 10 Apr 2021 16:01:07 +0100 Subject: [PATCH] Check video and position are both valid before reporting playback info --- source/VideoPlayer.brs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/VideoPlayer.brs b/source/VideoPlayer.brs index 8dd3e8df..1a9b5742 100644 --- a/source/VideoPlayer.brs +++ b/source/VideoPlayer.brs @@ -314,6 +314,9 @@ function getAudioInfo(meta as object) as object end function function ReportPlayback(video, state = "update" as string) + + if video = invalid or video.position = invalid then return void + params = { "PlaySessionId": video.PlaySessionId, "PositionTicks": int(video.position) * 10000000&, 'Ensure a LongInteger is used