ima 클래스
Roku IMA for PAL을 제어하는 전역 함수
ima.NonceLoader 클래스
메서드
게시자는 프로그래매틱 액세스 라이브러리를 통해 AdX 수요를 해결하는 데 사용할 수 있는 신호를 수집할 수 있습니다. 각 광고 요청에서 필요에 따라 관련 setter를 호출한 후 loadNonceManager를 호출합니다. 게시자는 NonceManager.getNonce()를 호출해 광고 요청에 추가해야 하는 문자열을
createNonceLoader()
반환하는 ima.NonceLoader
:
loadNonceManager(request)
반환하는 ima.NonceManager
: 광고 요청에 관한 nonce를 생성하는 nonce 관리자입니다.
매개변수 | 유형 | 설명 |
---|---|---|
request |
ima.NonceRequest |
요청 중인 nonce에 관한 정보가 포함된 요청입니다. |
ima.NonceManager 클래스
메서드
단일 콘텐츠 재생 세션의 nonce 및 이벤트 보고를 관리합니다.
프로그래매틱 수익 창출을 사용 설정하려면 각각의 이벤트가 발생할 때 ima.NonceManager.sendAdClick
, ima.NonceManager.sendAdTouch
, ima.NonceManager.sendPlaybackStart
, sendPlaybackEnd
등의 콘텐츠 재생 세션 수명 주기 메서드를 호출해야 합니다.
getNonce()
반환하는 String
: 로드 시 이 관리자에 대해 생성된 nonce입니다. 이 값은 지정된 NonceManager 인스턴스에서 절대 변경되지 않습니다. 이 nonce 값은 최대 기간인 6시간의 단일 콘텐츠 재생 세션에만 유효합니다.
poll()
재생 진행률을 추적할 수 있도록 관리자 상태를 업데이트합니다.
sendAdClick()
특정 콘텐츠 재생 세션 동안 광고 클릭이 발생했음을 Google 광고 서버에 알립니다.
sendAdImpression()
지원이 중단되었습니다. ima.NonceManager.sendPlaybackStart
및 ima.NonceManager.sendPlaybackEnd/code>.
사용
sendAdTouch(touch)
Notifies Google ad servers that a user touch or click on the ad other than a
clickthrough (for example, skip, mute, tap, etc.) has occurred during the given
content playback session.
Parameter
Type
Description
touch
roInputEvent|String
The key received from onKeyEvent (if using
SceneGraph), or the roInputEvent otherwise.
sendPlaybackEnd()
Notifies Google ad servers that playback for the given content playback
session has ended. This should be called when playback ends (for example, when the
player reaches end of stream, or when the user exits playback mid-way, or when
the user quits the channel, or when advancing to the next content item in a
playlist setting).
This method ends the asynchronous calls to Google servers started in
sendPlaybackStart.
sendPlaybackStart()
Notifies Google ad servers that playback for the given content playback
session has started. This should be called on "video player start". This may
be in response to a user-initiated action (click-to-play) or a channel
initiated action (autoplay).
This method will start asynchronous calls to Google servers to collect signal
needed for IVT monitoring and detection.
Class
ima.NonceRequest
Fields
adWillAutoPlay,
adWillPlayMuted,
continuousPlayback,
descriptionUrl,
directedForChildOrUnknownAge,
iconsSupported,
ppid,
sessionId,
storageAllowed,
supportedApiFrameworks,
videoHeight,
videoWidth
Methods
Information a publisher can provide when requesting a PAL nonce.
Properties
Name
Type
Description
adWillAutoPlay
Set to true if the ad will be auto played without waiting for user
interaction. Set to false if the ad will wait for user interaction before
being played.
adWillPlayMuted
Set to true if the ad will be played while muted. Set to false if the ad
will play unmuted.
continuousPlayback
Set to true if the player intends to continuously play the content videos
one after another similar to TV broadcast or video playlist. Set to false
otherwise.
descriptionUrl
The description URL of the content during which the ad will be played.
Any description URL string longer than 500 characters will be ignored and
excluded from the nonce.
directedForChildOrUnknownAge
Whether the ad request is directed to a child or user of an unknown age
(TFCD or TFUA). Default value is false.
iconsSupported
Whether VAST icons are supported by the video player. On Roku this value
should always be false.
ppid
The publisher provided ID. Any PPID longer than 200 characters will be
ignored.
Note: The PPID will not be used in personalisation. If it is appropriate to
use a ppid for personalization, include it separately in clear text in your
ad request.
sessionId
Session ID is a temporary random ID. It is used exclusively for frequency
capping. A session ID must be a UUID.
storageAllowed
Whether storage consent (purpose 1 consent) from the IAB TCF V2 spec has
been granted by the user. Defaults to true.
supportedApiFrameworks
Accepts an array of strings representing API framweworks supported by the
player as defined in AdCOM 1.0 "API Frameworks" list https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md#list--api-frameworks-.
Example: ["2","7","9"] indicates this player supports VPAID 2.0, OMID 1.0,
and SIMID 1.1.
videoHeight
The height of the ad video element.
videoWidth
The width of the ad video element.
createNonceRequest()
Returns ima.NonceRequest
: