Class: MolocoAdapter
Moloco playables. Moloco's runtime piggy-backs on Meta's FbPlayableAd SDK — the CTA path is identical to FacebookAdapter. The difference is the packaging (Moloco wants inline HTML, Facebook wants ZIP), which is handled in the playable-packager, not here.
The adapter exists as a named export so build targets and analytics can identify Moloco vs Facebook explicitly. Detection is the same FbPlayableAd probe — auto-detect can't distinguish them at runtime, and that's fine; the packager owns the format split.
Extends
Constructors
Constructor
ts
new MolocoAdapter(): MolocoAdapter;Returns
MolocoAdapter
Inherited from
Properties
| Property | Modifier | Type | Default value | Overrides |
|---|---|---|---|---|
name | readonly | string | 'moloco' | FacebookAdapter.name |
Methods
Close()
ts
Close(): void;Returns
void
Inherited from
EmitGameComplete()
ts
EmitGameComplete(): void;Returns
void
Inherited from
FacebookAdapter.EmitGameComplete
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
Inherited from
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>
Inherited from
IsSupported()
ts
IsSupported(): boolean;Returns
boolean
Inherited from
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
FacebookAdapter.OnCtaConfirmed
OnGameComplete()
ts
OnGameComplete(cb): AdUnsubscribe;Parameters
| Parameter | Type |
|---|---|
cb | () => void |
Returns
Inherited from
FacebookAdapter.OnGameComplete
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
FacebookAdapter.OnViewableChange
OpenStore()
ts
OpenStore(_url?): void;Some networks (Facebook) configure the destination externally and ignore the url.
Parameters
| Parameter | Type |
|---|---|
_url? | string |
Returns
void
Inherited from
Ready()
ts
Ready(): void;Returns
void
Inherited from
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
FacebookAdapter.ShowInterstitial
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