openrtbvideo

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package openrtbvideo is a reference adformat.Binding adapter (§3.2.12) associating a whole adformat.Format with an OpenRTB Video object's properties. It is a second, independent adapter (alongside adformat/openrtbnative) demonstrating that adding support for another external protocol never requires a change to adcorelib/adformat's core — only a new small package like this one.

Index

Constants

View Source
const Target = "openrtb_video"

Target identifies this adapter's Binding.Target value.

Variables

This section is empty.

Functions

func Video

func Video(p Params) adformat.Binding

Video builds a Binding associating a Format with an OpenRTB Video object's properties.

Types

type Params

type Params struct {
	Protocols      []int `json:"protocols,omitempty"`       // VAST versions
	APIs           []int `json:"apis,omitempty"`            // VPAID/MRAID versions
	Linearity      int   `json:"linearity,omitempty"`       // OpenRTB Video.Linearity
	PlaybackMethod []int `json:"playback_method,omitempty"` // OpenRTB Video.PlaybackMethod
}

Params carries the OpenRTB Video fields that have no protocol-agnostic equivalent on AssetRequirement (duration/allow_sound and similar are already covered by the generic model and are intentionally not duplicated here).

func Get

func Get(f adformat.Format) (Params, bool)

Get decodes the openrtb_video binding of f, if any.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL