mirror of
https://github.com/prebid/openrtb.git
synced 2026-06-14 05:56:34 +03:00
adcom1: rename StartDelayMode -> StartDelay
This commit is contained in:
@@ -11,7 +11,7 @@ type AudioPlacement struct {
|
||||
// Definition:
|
||||
// Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
|
||||
// For additional generic values, refer to List: Start Delay Modes.
|
||||
Delay StartDelayMode `json:"delay,omitempty"`
|
||||
Delay StartDelay `json:"delay,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// skip
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package adcom1
|
||||
|
||||
// StartDelay represents video or audio start delay.
|
||||
type StartDelay int64
|
||||
|
||||
// Options for the video or audio start delay.
|
||||
// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
|
||||
const (
|
||||
StartPreRoll StartDelay = 0 // Pre-Roll
|
||||
StartMidRoll StartDelay = -1 // Generic Mid-Roll
|
||||
StartPostRoll StartDelay = -2 // Generic Post-Roll
|
||||
)
|
||||
|
||||
// Ptr returns pointer to own value.
|
||||
func (d StartDelay) Ptr() *StartDelay {
|
||||
return &d
|
||||
}
|
||||
|
||||
// Val safely dereferences pointer, returning default value (StartDelayPreRoll) for nil.
|
||||
func (d *StartDelay) Val() StartDelay {
|
||||
if d == nil {
|
||||
return StartPreRoll
|
||||
}
|
||||
return *d
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package adcom1
|
||||
|
||||
// StartDelayMode represents video or audio start delay.
|
||||
type StartDelayMode int64
|
||||
|
||||
// Options for the video or audio start delay.
|
||||
// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
|
||||
const (
|
||||
StartDelayPreRoll StartDelayMode = 0 // Pre-Roll
|
||||
StartDelayGenericMidRoll StartDelayMode = -1 // Generic Mid-Roll
|
||||
StartDelayGenericPostRoll StartDelayMode = -2 // Generic Post-Roll
|
||||
)
|
||||
|
||||
// Ptr returns pointer to own value.
|
||||
func (s StartDelayMode) Ptr() *StartDelayMode {
|
||||
return &s
|
||||
}
|
||||
|
||||
// Val safely dereferences pointer, returning default value (StartDelayPreRoll) for nil.
|
||||
func (s *StartDelayMode) Val() StartDelayMode {
|
||||
if s == nil {
|
||||
return StartDelayPreRoll
|
||||
}
|
||||
return *s
|
||||
}
|
||||
@@ -31,7 +31,7 @@ type VideoPlacement struct {
|
||||
// Definition:
|
||||
// Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
|
||||
// For additional generic values, refer to List: Start Delay Modes.
|
||||
Delay StartDelayMode `json:"delay,omitempty"`
|
||||
Delay StartDelay `json:"delay,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// skip
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ type Audio struct {
|
||||
// Indicates the start delay in seconds for pre-roll, mid-roll, or
|
||||
// post-roll ad placements. Refer to List: Start Delay Modes in
|
||||
// AdCOM 1.0.
|
||||
StartDelay *adcom1.StartDelayMode `json:"startdelay,omitempty"`
|
||||
StartDelay *adcom1.StartDelay `json:"startdelay,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// rqddurs
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ type Video struct {
|
||||
// Indicates the start delay in seconds for pre-roll, mid-roll, or
|
||||
// post-roll ad placements. Refer to List: Start Delay Modes
|
||||
// in AdCOM 1.0.
|
||||
StartDelay *adcom1.StartDelayMode `json:"startdelay,omitempty"`
|
||||
StartDelay *adcom1.StartDelay `json:"startdelay,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxseq
|
||||
|
||||
Reference in New Issue
Block a user