-
Notifications
You must be signed in to change notification settings - Fork 1
Creative size #311
base: master
Are you sure you want to change the base?
Creative size #311
Conversation
@@ -55,6 +55,9 @@ export default class Revealed extends React.Component { | |||
let specialCoverage = this.props.targetSpecialCoverage || 'None'; | |||
let autoplayInViewBool = typeof this.props.autoplayInView === 'string'; | |||
|
|||
// Allowing creativeSize to be passed in in root.js | |||
let creativeSize = this.props.creativeSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this an optional attribute, with a default value of 640x480
, so simply change this to:
let creativeSize = this.props.creativeSize || '640x480';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do!
@@ -60,6 +60,7 @@ Object.assign(RailPlayer, { | |||
}, | |||
propTypes: { | |||
channel: PropTypes.string.isRequired, | |||
creativeSize: PropTypes.string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you actually need the creativeSize
propType defined here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true statement, still works without it
@@ -171,7 +176,7 @@ export default class Revealed extends React.Component { | |||
let type; | |||
|
|||
// See docs (https://support.google.com/dfp_premium/answer/1068325?hl=en) for param info | |||
baseUrl += '?sz=640x480'; | |||
baseUrl += `?sz=${this.props.creativeSize}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, you should either find a way to use the creativeSize
you defined above in the let
assignment or do what you're doing here but otherwise the assignment above isn't used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if I removed the PropTypes line, does that mean this gets to stay?
…idden from the default of 640x480
Purpose
Add ability to pass in a VAST video size for the rail unit rather than have it hardcoded
Ticket
https://app.asana.com/0/342156387987716/354541582224232
@spra85 I'm not sure how to do like a test link, but I was testing it in the bulbs local webpack on the rail-player with campaign and it is working there..
Also not sure how the tests work yet, but figured I'd put this up here for now!