Skip to content

Commit 88a54c9

Browse files
authored
Merge pull request #37 from avct/video-placement
Video placement
2 parents 452a3c5 + 15d50ba commit 88a54c9

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

openrtb.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ const (
8686
VideoPlaybackMouseOver = 4
8787
)
8888

89+
// 5.9 Video Placement Types (Spec 2.5)
90+
const (
91+
VideoPlacementInStream = 1
92+
VideoPlacementInBanner = 2
93+
VideoPlacementInArticle = 3
94+
VideoPlacementInFeed = 4
95+
VideoPlacementInterstitial = 5
96+
)
97+
8998
// 5.10 Video Start Delay
9099
const (
91100
VideoStartDelayPreRoll = 0

testdata/video.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@
6464
"companiontype": [
6565
1,
6666
2
67-
]
68-
}
67+
],
68+
"placement": 1
69+
}

video.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type Video struct {
4141
CompanionAd []Banner `json:"companionad,omitempty"`
4242
Api []int `json:"api,omitempty"` // List of supported API frameworks
4343
CompanionType []int `json:"companiontype,omitempty"`
44+
Placement int `json:"placement,omitempty"` // Video placement type
4445
Ext Extension `json:"ext,omitempty"`
4546
}
4647

video_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var _ = Describe("Video", func() {
4040
{W: 300, H: 250, ID: "1234567893-1", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}, ExpDir: []int{ExpDirRight, ExpDirDown}},
4141
{W: 728, H: 90, ID: "1234567893-2", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}},
4242
},
43+
Placement: VideoPlacementInStream,
4344
Api: []int{APIFrameworkVPAID1, APIFrameworkVPAID2},
4445
CompanionType: []int{VASTCompanionStatic, VASTCompanionHTML},
4546
}))

0 commit comments

Comments
 (0)