Git Product home page Git Product logo

mmadview's Introduction

-- Update to work under Enyo 2.0

MillenialMedia AdView

This is based on the documentation and samples for other platforms provided by Millenial Media, at 
http://www.millenialmedia.com/ .

usage:

Add mmAdView.js to your package.js, prior to your main kind.  Add the following to your components list:

{ name: "AdView", kind: "MillenialMedia.AdView", apid: "*Your Assigned APID here*" }

That's basically it.  By default, the control will resize to fit the width/height of the received advertisement.
If this is not acceptable, you may specify autoResize: false within the component definition.

You may also specify additional metadata to provide to MM, as per their documentation, by passing it contained within
an object, as:

metadata: { "age":"25" }

In case it's ever needed, you can also specify the server to retrieve the advertisement from, as:

adserver: "ads.mp.mydas.mobi"

This advertising control does not automatically refresh on it's own -- I figured it would be better for the 
individual app authors to maintain their own refresh policies.  

To get a new ad, call: this.$.AdView.loadAd()

That is pretty much it.  After you configure a new APID from the MillenialMedia control panel, you will likely need
to wait several hours before their system will start serving ads to it.  

It appears from my initial testing, that if you specify "webOS" as the target operating system for your ads in 
the Millenial control panel, that you will nearly always receive a standard banner-sized 400x60 or thereabouts ad. 
You can specify an Android or iOS system in the app configuration, and receive different sizes and types of 
medias.  Hopefully they will begin to support these additional types and sizes of ads within webOS as well.

This has not undergone extensive testing, but it works for me.  Your mileage may vary.  If you find something that
doesn't work, or have any suggestions to enhance it, please feel free to let me know, or better yet, send a pull
request.

mmadview's People

Contributors

ericblade avatar rylan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rylan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.