-
Notifications
You must be signed in to change notification settings - Fork 50
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
Provide a way to use directly from JS #61
Comments
Add support for JS players (HTML5) is on the roadmap. We can have a chat on the specifications |
Ok, how do you want to proceed ? |
Sent you an email |
Here are the features I'd like to see :
I guess the current OVVAsset.js could include both the code injected by the SWF as well as the native JS API. |
Agreed, a JavaScript VPAID (non Flash) wrapper would be helpful. |
Instead of using the flash beacon for a pure JS implementation you should consider a postMessage implementation that consists of a host-side geometry component and a cross domain communication pipe. |
@clemos Did you get the standalone OVVAsset.js with the requirements you listed or the current version should have it? |
@EvgenySergeychik nope, I haven't been working on OVV for a while now, and unfortunately never made this standalone JS version :| |
@clemos Thanks for quick reply. So i need to use OVVAsset.js as a wrapper to interop with openvv.swc which has to be imported to project? |
@EvgenySergeychik If you want to use OVVAsset.js on it's own you need a Javascript class that performs the same functions as OVVAsset.as - https://github.com/InteractiveAdvertisingBureau/openvv/blob/master/src/org/openvv/OVVAsset.as Your OVVAsset.as replacement will have to create an instance of OVVAsset in JS. You'll need to modify OVVAsset.js in a few ways. One will be to modify what it uses as the player element. You'll have to change that to a specific DOM element you want to measure. The current version of OVV looks for a specific Flash embed on the page to find it - https://github.com/InteractiveAdvertisingBureau/openvv/blob/master/src/org/openvv/js/OVVAsset.js#L1638 Also, you'll need to update the beaconsStarted method that the Flash beacons call to, to tell the player they've started - You'll have to proxy the 'player' with something that can accept the 'onJsReady' calls, that calls back to OVVAsset.as - https://github.com/InteractiveAdvertisingBureau/openvv/blob/master/src/org/openvv/OVVAsset.as#L266 Not sure how urgent your need is, but it might be worth waiting for the HTML5 version of OpenVV to be released. We're still in the architecture phase, but I think the expectation is that it will be released sometime this year. It will make use of IntersectionObserver primarily for measurement. You can see how this works in the current OpenVV here - |
@jdreetz Thanks a lot for explanation and guidance. |
@EvgenySergeychik - yes, you could probably do that, but the Javascript side doesn't have any VPAID specific listeners. That's all handled on the Flash side - https://github.com/InteractiveAdvertisingBureau/openvv/blob/master/src/org/openvv/OVVAsset.as#L604 |
@jdreetz Thank you. |
I guess the title says it all :)
We have a JS video player, and would like to implement openVV on it.
Reviewing the code, it seems definitely possible to provide an additionnal "backend" that would wrap the JS code from https://github.com/openvv/openvv/blob/master/src/org/openvv/js/OVVAsset.js into a useable js lib.
Further structuring the js sources would also allow more events to be implemented (onViewable/notViewable, onFocus/onUnfocus), which would be very valuable.
The text was updated successfully, but these errors were encountered: