Rethink creative data
There are problems regarding the fields we set on VPAID's creativeData.
- The extra fields are not industry standard. In other words, not all players provide them. Only
AdParametersis standard. - The
AllandOptionsexposes implementation details. Can't change them without affecting the vpaid creatives.
I propose getting the clickUrl, skipTime and duration from the AdParameters (via VAST XML). Since the creative (e.g. vpaid-html.js) comes from the adserver, it makes sense that its parameters also come from the same adserver (the source of the VAST). I've made changes to vpaid-html.js and vpaid-handler.js demonstrating this.
The skipTime does not need to use the player's options.skipTime. VPAID creative can use its own setting. In other words, they can take as long as they like. The player can intervene and put its own skip button on using options.skipTime (but we won't do that). NOTE: if it makes it easier, you can use the same name VAST spec uses: skipoffset which has a value format of either XX% or HH:MM:SS.
You don't have to provide clickUrl. You can ask the player when firing the AdClickThru event to do the job. By passing in null for the url (see code). So it can be optional (doesn't need to be on AdParameters). PR related to this: https://github.com/philipwatson/videojsx-vast-plugin/pull/55
Hi @nachoaguirre What do you think? Does it work for you?
Hi @philipwatson Let me check it out and test it and I'll let you know asap!
Merging this. If not ok with it, just open another PR or issue :)