Je travaille sur RAF (Roku Advertising Framework) en utilisant un script brillant. Sur l'image ci-dessus, nous voyons (Annonce 1 sur 1) lors de la lecture des annonces. S'il vous plaît me donner des suggestions pour résoudre ce problème, Toute aide très appréciée.Comment supprimer le texte defalult lors de l'utilisation de RAF eg (Ad 1 of 1)
Répondre
Dans la version actuelle de la RAF (1.9.6) il n'y a aucun moyen de le faire.
Merci beaucoup pour votre réponse, s'il vous plaît me fournir toute référence. –
Vous pouvez trouver tous les documents sur RAF ici: https://sdkdocs.roku.com/display/sdkdoc/Roku+Advertising+Framework. Il n'y a pas de méthodes pour un tel type de personnalisation. –
Nas est correct jusqu'à une certaine limite. La liste de contrôle de Roku voudra que l'interface de rétroaction soit activée si vous regardez des annonces (ceci est l'annonce 1 sur 1)
Maintenant, il est possible de créer votre propre roVideoPlayer pour lire les publicités. Il exige plus de travail à faire ...
'handle this else where (like the construct):
function main
'm._raf = Roku_Ads()
'm._raf.setDebugOutput(true)
'm._raf.setAdPrefs(false, 2)
'm._raf.setAdUrl(url)
'playAds()
end function
function playAds()
' sleep for half a second
sleep(500)
' setup some variables we'll be using
canvas = createObject("roImageCanvas")
' get the ads from the url
adPods = m._raf.getAds()
if adPods <> invalid and adPods.Count() > 0 then
' quick display for us to know how many ads we're playing
print "playing " adPods.Count() " ads"
' loop through each ad pod
for each adPod in adPods
' handle any top level logic here
' loop through each ad within the adPod now
for each ad in adPod.ads
' default ad rendering by raf: m._raf.showAds(adPods)
' start playing the ad
adVideoPlayer = playVideoContent(ad.streams)
playingAd = true
' custom event loop for the ad video player
while playingAd
videoMsg = wait(500, adVideoPlayer.getMessagePort())
if type(videoMsg) = "roVideoPlayerEvent" then
if videoMsg.isStreamStarted() then
canvas.clearLayer(2) ' clear buffering layer
canvas.setLayer(1, [{ color: "#00000000", CompositionMode: "Source" }])
canvas.show()
else if videoMsg.isPlaybackPosition() then
' loop through all trackers to see if we need to trigger any of them
for each tracker in ad.tracking
' make sure its not triggered first and that the tracker has a "time" property
if not tracker.triggered and tracker.time <> invalid then
print "* ad position: " videoMsg.getIndex() "/" adVideoPlayer.getPlaybackDuration()
if (int(videoMsg.getIndex()) + 1) >= int(tracker.time) then
print "triggering ad event " tracker.event ", triggered at position " tracker.time
m._raf.fireTrackingEvents(ad, {type: tracker.event})
tracker.triggered = true
end if
end if
end for
end if
if videoMsg.isStatusMessage() then
status = videoMsg.getMessage()
if status = "startup progress" then
' handle loading bar or anything else here
else if status = "start of play" then
' we should be playing the video, nuke the buffering layer and set layer 1 to a black background
canvas.clearLayer(2) ' clear buffering layer
canvas.setLayer(1, [{ color: "#00000000", CompositionMode: "Source" }])
canvas.show()
else
print "ad status: " status
end if
' roVideoPlayer sends "end of stream" last for all exit conditions
if status = "playback stopped" or status = "end of playlist" or status = "end of stream" then
print "done playing ads"
playingAd = false
end if ' end status check
end if ' end isStatusMessage
end if ' end type(videoMsg)
end while
if type(adVideoPlayer) = "roVideoPlayer" then
print "stop the ad video player"
adVideoPlayer.stop()
end if
end for
end for
else
print "no ads to play"
end if
end function
C'est une mauvaise idée. L'interface utilisateur devrait transmettre aux utilisateurs qu'ils regardent une annonce et un indice de combien de temps ils vont en souffrir. Le texte "Ad 1 of 3" fait bien ce travail. "Obtenez avec le programme!" déjà, déplacez la tache "dfp video" dans le coin droit si besoin est? –