Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 8

BUG: RAF CSAS - the user is able to skip over the ads

If you create a stitched stream with enableJITPod() set to true the user can seek over the ad blocks in the video without triggering them.

Steps to reproduce (code borrowed from the scenegraph-master-sample):

' here we retrieve all ads and configure it to our playback
sub PlayContentWithAds()
	' `parentNode` is the node to which the stitched stream can be attached (passed as 2nd argument of renderStitchedStream)
	parentNode =
	content = = ' assume that index of last played item equals to index of first played one
	items = content.getChildren(-1, 0)
	' This is the main entry point for instantiating the ad interface.
	' This object manages ad server requests, parses ad structure, schedules and renders ads, and triggers tracking beacons.
	RAF = Roku_Ads()
	' Set the ad URL to be used for a new getAds() request.

	keepPlay = true
	index = - 1
	itemsCount = items.Count()
	while keepPlay
		' check if playlist isn't complete
		if itemsCount - 1 > index
			' we need to give parentNode a focus in order to handle "back" button key press during ads retrieving
			item = items[index] ' contentNode of the video which should be played next
			' Content details used by RAF for ad targeting
			if item.categories <> invalid
			end if
			RAF.SetContentLength(int(item.length)) ' in seconds
			adPods = RAF.GetAds() ' ads retrieving = index ' save the index of last played item to navigate to appropriate detailsScreen
			' combine video and ads into a single playlist
			csasStream = RAF.constructStitchedStream(item, adPods)
			' render the stitched stream
			keepPlay = RAF.renderStitchedStream(csasStream, parentNode)
			keepPlay = false
		end if
	end while
end sub

It can be reproduced always if the provided URL has a few midroll ads, and the user can seek over them. Run the channel (scenegraph-master-sample, VideoAds) and start playback of any video. Seek forward, and move past the midroll ad start position; observe that the ad-pod wasn't triggered and that non-ad content at that position is playing.

Remove, or comment out RAF.enableJITPods(true) from the above code, run the channel (scenegraph-master-sample, VideoAds) and repeat the steps. Observe that after seeking, the jumped over ad-pod is triggered and that ads are playing and not the non-ad content.

Expected behavior

Not sure what the expected behavior should be here, as there is nothing in the docs for this scenario, but I think that the last ad-pod the user has jumped over should be played instead of the main content.

Tags (2)
0 Kudos