Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Creative size #311

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Creative size #311

wants to merge 8 commits into from

Conversation

kjacovino
Copy link
Contributor

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!

@@ -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;
Copy link
Contributor

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';

Copy link
Contributor Author

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,
Copy link
Contributor

@spra85 spra85 Jun 6, 2017

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.

Copy link
Contributor Author

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}`;
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants