Skip to content

Introduction

Michao Player is a player for reward ads and outstream ads on the web. Pass it a VAST-format bid and it plays. The bid can come from anywhere; you can pass bids obtained client-side with Prebid.js or similar tools directly. The player itself never calls RTB.

  • Reward ad: A "watch an ad to claim a reward" modal. Grants the reward on completion.
  • Outstream ad: An in-feed video that plays when it enters the viewport and pauses when it leaves.

Ad-source-agnostic

You do not need to use Michao as your SSP or bidder. Any VAST-format bid plays, regardless of its source.

Beta

Michao Player is currently in beta. The legacy reward ads using window.alm (manager.js) still work, but we recommend this player for new integrations.

Prerequisites

  • You have obtained a bid for the ad slot. The source does not matter; you can pass bids obtained client-side with Prebid.js or similar tools directly.
    • Video (video / VAST): Plays directly (reward and outstream).
    • Banner (display): Available for reward. The caller draws the creative (Banner reward).

For the concrete wiring, see Prebid.js integration.

Supported standards

StandardSupport
VAST4.2 (backward compatible with 2.0 / 3.0 / 4.x)
VAST Wrapper / WaterfallYes
Ad PodYes (sequential playback of multiple ads)
VPAID2.0
SIMID1.2
Google IMAYes (mode: "ima")
OMID (Open Measurement)Yes (optional)

VAST 4.2 is supported, and thanks to backward compatibility, 2.0 / 3.0 / 4.x tags also play directly.

How to load

You can choose between the following two methods. Neither requires a build environment, and because the CSS is bundled in, no additional loading is needed.

Script tag (global window.michao)

Place one <script> and you can call each function from window.michao.

html
<script src="https://cdn.michao-ssp.com/player/v1/reward.js"></script>
<script>
  window.michao.createRewardPlayer({
    /* … */
  });
</script>

ESM import from a URL

Import directly from a URL.

html
<script type="module">
  import { createRewardPlayer } from "https://cdn.michao-ssp.com/player/v1/reward.mjs";
  // …
</script>

TypeScript types

Type definitions ship next to each bundle (…/player/v1/reward.d.ts / outstream.d.ts). They cover only the public API, not internal implementation. To make tsc apply types to a URL import, save the .d.ts into your project and map the URL via paths in tsconfig.json.

json
{
  "compilerOptions": {
    "paths": {
      "https://cdn.michao-ssp.com/player/v1/reward.mjs": ["./types/michao-reward.d.ts"]
    }
  }
}

Next steps

Michao!! player documentation