Hello @JanS7, I've spent a lot of time figuring out a way to handle the mini player with RAF. For the project I am working on, it's not viable to use the SGDEX framework due to the significant rework required for integration. SGDEX is an option, but I'll provide a solution using the regular RAF. I believe you are using the showAds() function from the RAF library. You need to create an overlay layer for your view and pass it for showAds(), the view usually is video.getParent(). By doing this, you ensure that the new overlay is on top of the video view. You can then resize it using the overlay scale. In this example, I am using 0.58 of the full 1080 size, but you can adapt it to your size. The translation 0,0 means it will be positioned at the same x and y coordinates as the parent. You can also choose different x and y coordinates if you want to move it, but I believe you want this on the same video player at a reduced size. Here is the example of what I said :
m.overlayNode = createObject("roSGNode", "Group")
view = video.getParent()
if isFullScreen = false
' Create a new overlay node to display ads
m.overlayNode.translation = [0, 0] ' Adjust as needed to position over the video
m.overlayNode.scale = [0.58, 0.58] ' Adjust the scale as needed
' Add the overlay node to the top of the screen (or relevant parent)
screen = view
screen.appendChild(m.overlayNode)
end if
'Your Call for ads
video.control = "stop"
if m.top.isFullScreen = true
keepPlaying = RAF.showAds(adPods, invalid, view)
else
keepPlaying = RAF.showAds(adPods, invalid, m.overlayNode)
end if
I hope this helps you. You will probably face issues with RAF grabbing focus for the overlay but a workaround would be to create a custom ads callback and use RAF.SetTrackingCallback function to identify when the ad started for you to set Focus for your video root parent. It's tricky since RAF needs the focus to itself to handle a lot of internal important stuff.