From 251742c9a58920a5c4c39a3805017b91ce57f0be Mon Sep 17 00:00:00 2001 From: Yuto Suzuki Date: Wed, 20 Nov 2019 13:22:43 +0900 Subject: [PATCH 1/3] fix iframe resource using pointer --- vast.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vast.go b/vast.go index a4023dc..6d9803e 100644 --- a/vast.go +++ b/vast.go @@ -287,7 +287,7 @@ type Companion struct { // URL to a static file, such as an image or SWF file StaticResource *StaticResource `xml:",omitempty"` // URL source for an IFrame to display the companion element - IFrameResource CDATAString `xml:",omitempty"` + IFrameResource *CDATAString `xml:",omitempty"` // HTML to display the companion element HTMLResource *HTMLResource `xml:",omitempty"` } From 6ae3f7b1812ad34290782943da2fbdb98ba9d4e3 Mon Sep 17 00:00:00 2001 From: Yuto Suzuki Date: Wed, 20 Nov 2019 14:03:01 +0900 Subject: [PATCH 2/3] fix iframe resource using pointer for icon clicks --- vast.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vast.go b/vast.go index 6d9803e..a810dbb 100644 --- a/vast.go +++ b/vast.go @@ -426,7 +426,7 @@ type Icon struct { // URL to a static file, such as an image or SWF file StaticResource *StaticResource `xml:",omitempty"` // URL source for an IFrame to display the companion element - IFrameResource CDATAString `xml:",omitempty"` + IFrameResource *CDATAString `xml:",omitempty"` // HTML to display the companion element HTMLResource *HTMLResource `xml:",omitempty"` } From 7e2c924dc2c1f6aea8d12409f111f00b518cff69 Mon Sep 17 00:00:00 2001 From: Naoki Tomita Date: Fri, 7 Feb 2020 16:20:33 +0900 Subject: [PATCH 3/3] Icons>IframeResource can be omit --- vast.go | 4 ++-- vast_test.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vast.go b/vast.go index a4023dc..a810dbb 100644 --- a/vast.go +++ b/vast.go @@ -287,7 +287,7 @@ type Companion struct { // URL to a static file, such as an image or SWF file StaticResource *StaticResource `xml:",omitempty"` // URL source for an IFrame to display the companion element - IFrameResource CDATAString `xml:",omitempty"` + IFrameResource *CDATAString `xml:",omitempty"` // HTML to display the companion element HTMLResource *HTMLResource `xml:",omitempty"` } @@ -426,7 +426,7 @@ type Icon struct { // URL to a static file, such as an image or SWF file StaticResource *StaticResource `xml:",omitempty"` // URL source for an IFrame to display the companion element - IFrameResource CDATAString `xml:",omitempty"` + IFrameResource *CDATAString `xml:",omitempty"` // HTML to display the companion element HTMLResource *HTMLResource `xml:",omitempty"` } diff --git a/vast_test.go b/vast_test.go index a4181fb..639e6a8 100644 --- a/vast_test.go +++ b/vast_test.go @@ -203,6 +203,7 @@ func TestInlineLinear(t *testing.T) { if assert.NotNil(t, comp1.StaticResource) { assert.Equal(t, "image/jpeg", comp1.StaticResource.CreativeType) assert.Equal(t, "http://demo.tremormedia.com/proddev/vast/Blistex1.jpg", comp1.StaticResource.URI) + assert.Nil(t, comp1.IFrameResource) } if assert.Len(t, comp1.TrackingEvents, 1) { assert.Equal(t, "creativeView", comp1.TrackingEvents[0].Event) @@ -605,6 +606,7 @@ func TestIcons(t *testing.T) { assert.Equal(t, "image/png", icon1.StaticResource.CreativeType) assert.Equal(t, "https://s.aolcdn.com/ads/adchoices.png", icon1.StaticResource.URI) assert.Equal(t, "https://adinfo.aol.com", icon1.IconClickThrough.CDATA) + assert.Nil(t, icon1.IFrameResource) } } }