Class: MintegralAdapter
Mintegral playables work the opposite way to most networks: instead of injecting a global for the playable to call, Mintegral's wrapper LOOKS FOR functions the playable defines on window and rewrites them at runtime.
window.install()— the CTA. The playable defines a placeholder (e.g. a console.log or end-card transition for local testing); Mintegral's wrapper replaces the body with its store-redirect logic at serve time.window.gameEnd()— mandatory completion signal. Mintegral rejects bundles that don't call this on both win and lose.window.gameStart()— Mintegral CALLS this at the beginning of the playable (opposite direction from gameEnd). The adapter publishes one that re-emits as the framework's canonicalgameStartevent so engine code (music, countdowns, etc.) can subscribe via the normal IAdAdapter event API instead of patching globals.window.gameReady()/window.gameClose()— optional pre/post hooks; rarely required.
Detection: the Mintegral host environment exposes gameReady, gameEnd, gameRetry, and install as functions on window before the playable script runs (it provides stubs that the playable replaces with its own implementations). The combined presence of all four uniquely identifies a Mintegral runtime.
Extends
Constructors
Constructor
ts
new MintegralAdapter(): MintegralAdapter;Returns
MintegralAdapter
Inherited from
Properties
| Property | Modifier | Type | Default value | Overrides |
|---|---|---|---|---|
name | readonly | string | 'mintegral' | AdAdapter.name |
Methods
Close()
ts
Close(): void;Returns
void
Overrides
EmitGameComplete()
ts
EmitGameComplete(): void;Returns
void
Inherited from
EmitGameStart()
ts
EmitGameStart(): void;Counterpart emitters for game code — adapters that route to a network SDK override these to add the SDK-specific call alongside the local listener fan-out.
Returns
void
Inherited from
Finished()
ts
Finished(): void;Returns
void
Overrides
GameplayStart()
ts
GameplayStart(): void;Returns
void
Inherited from
GameplayStop()
ts
GameplayStop(): void;Returns
void
Inherited from
HappyTime()
ts
HappyTime(): void;A highlight (a level beaten, a record): portals may celebrate it.
Returns
void
Inherited from
Init()
ts
Init(): Promise<void>;Returns
Promise<void>
Overrides
IsSupported()
ts
IsSupported(): boolean;Returns
boolean
Overrides
OnCtaClick()
ts
OnCtaClick(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnCtaConfirmed()
ts
OnCtaConfirmed(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnGameComplete()
ts
OnGameComplete(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnGameStart()
ts
OnGameStart(cb): AdUnsubscribe;Canonical playable-ad lifecycle events. Game code emits gameStart / gameComplete through the adapter; the adapter routes them to whichever analytics path the network SDK expects. CTA events fire from inside OpenStore() so analytics see them even if the SDK redirect is asynchronous.
Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnPause()
ts
OnPause(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnReady()
ts
OnReady(cb): AdUnsubscribe;OnReady replays if Init has already fired ready. Other On* may never fire on some networks.
Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnResume()
ts
OnResume(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
OnViewableChange()
ts
OnViewableChange(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | (v) => void |
Returns
Inherited from
OpenStore()
ts
OpenStore(_url?): void;Some networks (Facebook) configure the destination externally and ignore the url.
Parameters
| Parameter | Type |
|---|---|
_url? | string |
Returns
void
Overrides
Ready()
ts
Ready(): void;Returns
void
Overrides
SetStoreUrls()
ts
SetStoreUrls(urls): void;Parameters
| Parameter | Type |
|---|---|
urls | StoreUrls |
Returns
void
Inherited from
ShowInterstitial()
ts
ShowInterstitial(): Promise<void>;Portal ads: none outside a portal adapter.
Returns
Promise<void>
Inherited from
ShowRewarded()
ts
ShowRewarded(): Promise<boolean>;Resolves true when the player watched it to the end (grant the reward), false otherwise.
Returns
Promise<boolean>
Inherited from
Shutdown()
ts
Shutdown(): void;Returns
void