Assets API is a part of the Player SDK used for fetching assets and theme.
enplug.assets object to access these methods.
const asset = await enplug.assets.getNext();
enplug.assets.getNext()- fetch the value of the asset that is to be displayed
enplug.assets.getTheme()- get the theme
Fetches the asset that is to be displayed by the app.
When it is time to present certain asset of your app, the Player will instantiate a new iframe with a new instance of your app. Then, the app can fetch the value of the asset, so it has access to all the settings and customizations made on the Dashboard part of the app.
const assetValue = await enplug.assets.getNext();
|Model of asset's value|
Returns a Promise that resolves to the single asset value. This is what was saved as 'asset.Value' on the Dashboard part of the app.