Forum Discussion
Blackhawk
10 years agoRoku Guru
Where do I put this?
shouldPlayContent = true
adBreakIndex = 0
while shouldPlayContent
videoMsg = wait(0, contentVideoScreen.GetMessagePort())
if videoMsg.isPlaybackPosition()
curPos = videoMsg.GetIndex()
nextPod = scheduledPods[adBreakIndex]
if curPos > nextPod.renderTime and not nextPod.viewed
contentVideoScreen.Close()
' stop playback of content
shouldPlayContent = adIface.showAds(nextPod)
' render next ad pod
adBreakIndex = adBreakIndex + 1
if shouldPlayContent
' *** Insert client app’s resume-playback code here
end if
end if
end if
' *** Insert client app’s video event handler code here
end while
' close the blank canvas and return the user to the previous UI screen
canvas.Close()