Как удалить текст по умолчанию при использовании RAF, например (объявление 1 из 1)

Я работаю над RAF (Roku Advertising Framework), используя яркий скрипт. Как удалить (объявление 1 из 1 На изображении выше мы видим (объявление 1 из 1) при воспроизведении рекламы. Пожалуйста, дайте мне предложения по решению этой проблемы, любая помощь будет очень признательна.


person Vijay Kumar    schedule 29.11.2016    source источник
comment
Это плохая идея. Пользовательский интерфейс должен сообщать пользователям, что они смотрят рекламу, и подсказывать, как долго им еще предстоит страдать. Текстовое объявление 1 из 3 хорошо справляется с этой задачей. Получить с программой! уже переместите пятно видео dfp в правый угол, если это необходимо?   -  person Nas Banov    schedule 30.11.2016


Ответы (2)


В текущей версии RAF (1.9.6) нет способа сделать это.

person Eugene Smoliy    schedule 07.12.2016
comment
Большое спасибо за ваш ответ, пожалуйста, дайте мне любую ссылку. - person Vijay Kumar; 08.12.2016
comment
Все документы по RAF можно найти здесь: sdkdocs.roku.com/display/ sdkdoc/Roku+Реклама+Фреймворк. Там нет методов для такого типа настройки. - person Eugene Smoliy; 08.12.2016

Nas верен до определенного предела. Контрольный список Roku потребует, чтобы «интерфейс обратной связи» был включен, если вы смотрите рекламу (это «объявление 1 из 1»)

Теперь можно создать собственный roVideoPlayer для воспроизведения рекламы. Для этого требуется больше работы...

'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
person Jameson    schedule 01.12.2016