Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for AltText for StaticResource companion ad #154

Closed
giannoudak opened this issue Jan 13, 2017 · 2 comments · Fixed by #155
Closed

Request for AltText for StaticResource companion ad #154

giannoudak opened this issue Jan 13, 2017 · 2 comments · Fixed by #155

Comments

@giannoudak
Copy link

Hello and thanks for this great tool!

We noticed that the parser doesn't parse altText attribute if a staticresource is being served
in file vast-client-js/src/companionad.coffee the VASTCompanionAd class doen't define an alttext property

class VASTCompanionAd
    constructor: ->
        @id = null
        @width = 0
        @height = 0
        @type = null
        @staticResource = null
        @htmlResource = null
        @iframeResource = null
        @companionClickThroughURLTemplate = null
        @trackingEvents = {}

module.exports = VASTCompanionAd

Is this a bug? or is there any other way we can fetch the alttext property?
Is this going to be developed?

thanks a lot in advance

@vagelkara
Copy link
Contributor

I found a solution that could be help someone:

Just add this, at companionad.coffee, so you declare a new variable:

 @altText = null

And change the parser.coffee as below:

 for staticElement in @childsByName(companionResource, "StaticResource")
                companionAd.type = staticElement.getAttribute("creativeType") or 0
                for child in @childsByName(companionResource, "AltText")
                    companionAd.altText = @parseNodeText(child)
                companionAd.staticResource = @parseNodeText(staticElement)

@giannoudak

@briganti
Copy link
Contributor

Sorry for the late reply @giannoudak, we've been quite busy lately and we didn't had time to adress the reported issues.

@vagelkara fix works well, and if one of you guys can do a PR that would be perfect (don't forget to update the unit test, it's pretty straight forward).

vagelkara pushed a commit to vagelkara/vast-client-js that referenced this issue Jan 17, 2017
briganti pushed a commit that referenced this issue Jan 17, 2017
briganti added a commit that referenced this issue Apr 14, 2017
* tag '1.7.0':
  1.7.0
  Bundle last changes
  Parser - handle click/clickthrough event for nonlinear/companion ads
  Parse nonlinear click tracking urls
  Parse all nonlinear attributes
  Parse VAST Duration tag with number instead of HH:MM:SS
  VAST parser returns creative id, adId, sequence and apiFramework attributes
  Wrapper limit handling (#157)
  changes to parse altText fixes #154 (#155)
  Added NonLinear AdParameter Parsing with adequate test in sample.xml #152 (#153)
  Add Common-tasks.md (#148)
  1.6.0
  Bundle last changes
  leftpad cachebusting macro
  rework resolveURLTemplates()
  Add unit test for #text extension
  Remove empty #text/ #comments from parsed extensions
  Add macros RANDOM/TIMESTAMP/ASSETURI
  Add setExpand() documentation
briganti added a commit that referenced this issue Apr 14, 2017
* Add setExpand() documentation

* Add macros RANDOM/TIMESTAMP/ASSETURI

* Remove empty #text/ #comments from parsed extensions

* Add unit test for #text extension

* rework resolveURLTemplates()

* leftpad cachebusting macro

* Bundle last changes

* 1.6.0

* Add Common-tasks.md (#148)

* Added NonLinear AdParameter Parsing with adequate test in sample.xml #152 (#153)

* changes to parse altText fixes #154 (#155)

* Wrapper limit handling (#157)

* Added wrapperLimit to options
* Fixed error forwarding inside wrappers

* VAST parser returns creative id, adId, sequence and apiFramework attributes

* Parse VAST Duration tag with number instead of HH:MM:SS

* Parse all nonlinear attributes

* Parse nonlinear click tracking urls

* Parser - handle click/clickthrough event for nonlinear/companion ads

* Bundle last changes

* 1.7.0
briganti added a commit that referenced this issue Apr 18, 2017
1.7.1

* tag 'v1.7.1': (22 commits)
  1.7.1
  Bundle last changes
  Handle VAST2/3/4 creative adId format
  1.7.0
  Bundle last changes
  Parser - handle click/clickthrough event for nonlinear/companion ads
  Parse nonlinear click tracking urls
  Parse all nonlinear attributes
  Parse VAST Duration tag with number instead of HH:MM:SS
  VAST parser returns creative id, adId, sequence and apiFramework attributes
  Wrapper limit handling (#157)
  changes to parse altText fixes #154 (#155)
  Added NonLinear AdParameter Parsing with adequate test in sample.xml #152 (#153)
  Add Common-tasks.md (#148)
  1.6.0
  Bundle last changes
  leftpad cachebusting macro
  rework resolveURLTemplates()
  Add unit test for #text extension
  Remove empty #text/ #comments from parsed extensions
  ...
rumesh pushed a commit that referenced this issue Jul 18, 2018
* Add .npmrc

* 2.0.0-alpha.0

* Fix parser error tracking (#137)

- Move VAST test files to /test/vastfiles/
- Add unit tests to check error scenarios that can happen while parsing VAST files
- Add Extensions data to Parser error events
- Update Parser doc

* Merge `v1.6.0` into `v2.x` (#144)

* Add setExpand() documentation
* Add macros RANDOM/TIMESTAMP/ASSETURI
* Remove empty #text/ #comments from parsed extensions
* Add unit test for #text extension
* rework resolveURLTemplates()
* leftpad cachebusting macro
* Bundle last changes
* 1.6.0

* Bundle last changes

* 2.0.0-alpha.1

* 2.0.0-alpha.2

* Remove duration restriction for parser

* Bundle last changes

* 2.0.0-alpha.3

* Merge 1.7.0 into v2.x (#162)

* Add setExpand() documentation

* Add macros RANDOM/TIMESTAMP/ASSETURI

* Remove empty #text/ #comments from parsed extensions

* Add unit test for #text extension

* rework resolveURLTemplates()

* leftpad cachebusting macro

* Bundle last changes

* 1.6.0

* Add Common-tasks.md (#148)

* Added NonLinear AdParameter Parsing with adequate test in sample.xml #152 (#153)

* changes to parse altText fixes #154 (#155)

* Wrapper limit handling (#157)

* Added wrapperLimit to options
* Fixed error forwarding inside wrappers

* VAST parser returns creative id, adId, sequence and apiFramework attributes

* Parse VAST Duration tag with number instead of HH:MM:SS

* Parse all nonlinear attributes

* Parse nonlinear click tracking urls

* Parser - handle click/clickthrough event for nonlinear/companion ads

* Bundle last changes

* 1.7.0

* 2.0.0-alpha.4

* Merge 1.7.1 into v2.x (#164)

* Handle VAST2/3/4 creative adId format

* Bundle last changes

* 2.0.0-alpha.5

* Merge 1.7.2 into v2.x (#171)

* Bundle last changes

* 2.0.0-alpha.6

* Merge 1.7.3 into v2.x (#173)

* Bundle last changes

* 2.0.0-alpha.7

* Merge 1.8.0 into v2.x (#183)

* Add new events resolving/resolved while parsing VastAdTagUri

* Bundle last changes

* 2.0.0-alpha.8

* Add ERRORMESSAGE & system on error (#191)

* Use webpack for boundle

* Use single string for require

* Split VASTParser into multiple components

* Remove old parser

* Add decaffeinate tools

* [ES6] move extension.coffee

* [ES6] convert extension.coffee

* [ES6] move icon.coffee

* [ES6] convert icon.coffee

* [ES6] move extensionchild.coffee

* [ES6] convert extensionchild.coffee

* [ES6] move ad.coffee

* [ES6] convert ad.coffee

* [ES6] move mediafile.coffee

* [ES6] convert mediafile.coffee

* [ES6] move nonlinear.coffee

* [ES6] convert nonlinear.coffee

* [ES6] move response.coffee

* [ES6] convert response.coffee

* [ES6] move companionad.coffee

* [ES6] convert companionad.coffee

* [ES6] move creative.coffee

* [ES6] convert creative.coffee

* Make properties and methods of VASTUtil non static

* [ES6] move util.coffee

* [ES6] convert util.coffee

* Refactoring fixes after VASTUtil es6 conversion

* Make properties and methods of urlhandlers non static

* [ES6] move urlhandler.coffee

* [ES6] convert urlhandler.coffee

* Refactoring fixes after URLHAndler es6 conversion

* [ES6] move node.coffee

* [ES6] convert node.coffee

* Refactoring fixes after NodeUrlHandler es6 conversion

* [ES6] move xmlhttprequest.coffee

* [ES6] convert xmlhttprequest.coffee

* Refactoring fixes after XHRUrlHandler es6 conversion

* [ES6] move flash.coffee

* [ES6] convert flash.coffee

* Refactoring fixes after FlashUrlHandler es6 conversion

* [ES6] move parser_utils.coffee

* [ES6] convert parser_utils.coffee

* Refactoring fixes after ParserUtils es6 conversion

* [ES6] move ad_parser.coffee

* [ES6] convert ad_parser.coffee

* Refactoring fixes after AdParser es6 conversion

* [ES6] move creative_companion_parser.coffee

* [ES6] convert creative_companion_parser.coffee

* Refactoring fixes after CreativeCompanionParser es6 conversion

* [ES6] move creative_linear_parser.coffee

* [ES6] convert creative_linear_parser.coffee

* Refactoring fixes after CreativeLinearParser es6 conversion

* Fix CreativeNonLinearParser indentation

* [ES6] move creative_non_linear_parser.coffee

* [ES6] convert creative_non_linear_parser.coffee

* Refactoring fixes after CreativeNonLinearParser es6 conversion

* [ES6] move tracker.coffee

* [ES6] convert tracker.coffee

* Refactoring fixes after VASTTracker es6 conversion

* [ES6] move index.coffee

* [ES6] convert index.coffee

* Make properties and methods of VASTParser non static

* [ES6] move parser.coffee

* [ES6] convert parser.coffee

* Refactoring fixes after VASTParser es6 conversion

* Make properties and methods of VASTClient non static

* [ES6] move client.coffee

* [ES6] convert client.coffee

* Refactoring fixes after VASTClient es6 conversion

* Fixes after decaffeination

* [ES6] move util.coffee

* [ES6] convert util.coffee

* Refactoring fixes after test/util.coffee es6 conversion

* [ES6] move urlhandler.coffee

* [ES6] convert urlhandler.coffee

* Refactoring fixes after test/urlhandler.coffee es6 conversion

* [ES6] move tracker.coffee

* [ES6] convert tracker.coffee

* Refactoring fixes after test/tracker.coffee es6 conversion

* [ES6] move storage.coffee

* [ES6] convert storage.coffee

* Refactoring fixes after test/storage.coffee es6 conversion

* [ES6] move parser.coffee

* [ES6] convert parser.coffee

* Refactoring fixes after test/parser.coffee es6 conversion

* Conversion fixes

* Remove decaffeinate tools

* Use es6 modules

* Remove coffeescript tools/support

* Update documentation

* Prettify code with Prettier

* Update bundling options

* Fix util track

* Remove var variables

* Fix static usage of VASTClient in VASTTracker

* Api improvements for VASTClient (and tests)

* Separate Storage logic and provide option for custom storage

* Improve documentation comments and Storage

* Add tests for custom storage

* Fix tests and improve Storage

* Rename client.js to vast_client.js

* Keep comment about disabled storage, better Date usage

* Improve parser API (methods and logic splitting and renaming)

* Add jsdoc comments for VASTParser methods

* Rename parser.js to vast_parser.js

* Use array.forEach instead than for of loops

* Add JsDoc to all the parsing classes

* Use forEach in vast parser loops

* Improve VASTTracker API and documentation comments

* Rename tracker.js to vast_tracker.js

* Use Date.now() and simpler boolean check

* Update documentation for 2.0 version

* Documentation fixes

* Fix index.js imports and use a single file for webpack config

* Remove bower file

* Quartile Fix: If ads seeked (IOS fullscreen) be sure to trigger all quartile regarding progress time

* Use better null checks in if conditions

* Use shorter if conditions

* Update potentially vulnreable old libraries

* Update webpack version after npm audit

* Back port work from @Walkerflocker to 2.x branch to convert coffee script to JavaScript
to apply sequence to single wrapped ads and fix testing

* Bundle last changes

* 2.0.0-alpha.9

* Use promises to handle wrapper resolving

* Update vast parser jsdoc

* Update vast parser documentation

* Update migration documentation

* Add tests for ad pod

* Fix storage initialization

* Method to get parser from VASTClient

* Allow usage of custom urlHandler

* Safe check to merge wrapper data

* Code review fixes

* Update documentation for client and parser

* Update bundled version

* 2.0.0-alpha.10

* Return Promise for client and parser (#224)

* Return Promise for client and parser

* Add Promises documentation

* Merge 1.8.4 into v2.x (#225)

* Update mocha to latest version

* Update node version

* 1.8.4

* Bundle last changes

* 2.0.0-alpha.11

* [parser] Resolve VAST wrappers by adPod

* [parser] Automatically resolve the following groups of ads if the first returns no ads

* [parser] Provide methods to access and resolve remaining ads

* [client] Pass false as default value for resolveAll in get method

* Fixing 2x docs (#227)

* [parser] update parser docs

* [tracker] fix 2.x docs

* [client] fix 2.x docs

* [parser] Add method to split a VAST response into Ad and AdPods

* [parser] Split VAST only once

* [client] Add methods to get next ads

* [parser] Fix typo in resolveAds jsdoc

* [client] Update documentation for get method

* [client] Update documentation for new remaining ads methods

* [parser] add splitVAST unit test

* [parser][test] remove unused module

* [client] Update documentation for resolveAll

* [parser] Delete incorrect ad.sequence

* [parser] Return error url templates based on the ad

* [client][test] Add test for resolveAll param, fix encountered issues

* [client][test] Remove wrong describe.only

* [client][parser] Split vast code review fixes

* [parser] Removed unused splittedVAST property

* [docs] Add commit guidelines

* [docs] Add PR labeling guidelines

* [tools] Bundle last changes

* 2.0.0-alpha.12

* [parser] When resolveAll is false parsing breaks on no ad VAST response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants