Asset Provider Plugin
The Asset Provider Plugin enables users to easily register UI components to render their assets. It’s used internally by the Reference Assets. The matches follow the same rules as asset transforms (more specific matches take priority).
Usage
Platform
Install the plugin:
Create an instance, and add it to your Player instance.
The API is similar to the JavaScript Map
, and takes a list of [match, Component]
tuples.
This will register a match on { type: 'custom-asset' }
and { type: 'custom', key: 'asset' }
in the view to use your React components.
Content
In this example, when your content has assets of type custom-asset
and custom
, they will render <div>Hello World!</div>
and <div>Other Custom Asset</div>
.
This will register a match on { type: 'custom-asset' }
and { type: 'custom', key: 'asset' }
in the view to use your React components.