-
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
Changes from 2 commits
3721a1c
b9649ab
2037cdb
44d65e9
f22a4ea
b4ee622
9af05ae
6315084
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
|
||
| let videoAdConfig = 'None'; | ||
| if (this.props.disableAds || this.props.video.disable_ads) { | ||
| videoAdConfig = 'disable-ads'; | ||
|
|
@@ -79,6 +82,8 @@ export default class Revealed extends React.Component { | |
| dimensions | ||
| ); | ||
|
|
||
|
|
||
|
|
||
| // Making assignment copies here so we can mutate object structure. | ||
| let videoMeta = Object.assign({}, this.props.video); | ||
| videoMeta.hostChannel = hostChannel; | ||
|
|
@@ -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}`; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, you should either find a way to use the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
| baseUrl += `&iu=/4246/${window.Bulbs.settings.DFP_SITE_CODE}`; | ||
| baseUrl += '&impl=s'; | ||
| baseUrl += '&gdfp_req=1'; | ||
|
|
@@ -361,6 +366,7 @@ Revealed.propTypes = { | |
| autoplay: PropTypes.bool, | ||
| autoplayInView: PropTypes.string, | ||
| autoplayNext: PropTypes.bool, | ||
| creativeSize: PropTypes.object.string, | ||
| controller: PropTypes.object.isRequired, | ||
| defaultCaptions: PropTypes.bool, | ||
| disableAds: PropTypes.bool, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ Object.assign(RailPlayer, { | |
| }, | ||
| propTypes: { | ||
| channel: PropTypes.string.isRequired, | ||
| creativeSize: PropTypes.string, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you actually need the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. true statement, still works without it |
||
| recircUrl: PropTypes.string.isRequired, | ||
| src: PropTypes.string.isRequired, | ||
| targetCampaignId: 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 would make this an optional attribute, with a default value of
640x480, so simply change this to: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!