Note |
---|
The Embedded Unified DAM UI Connector requires MM 5.5.4 |
Integration Digizuite DAM into almost any other application using the Unified DAM UIConnector. It will give you a head start on development efforts and reduce both implementation time and risk.
Insert into any Host Application
The Unified DAM UI Connector can be inserted into any host application as an iframe to easily provide access to assets from your single source of truth. If you have the proper roles then you are able to access and login to the Unified DAM UI Connector from https://customer-mediamanager-url/embedded/ and then see the below view.
...
Besides from asset message, then the Unified DAM UI Connector also posts a message when trying to change the URL from menu (wanting to change MM URL) and then when the Unified DAM UI Connector is initialized properly so that the host application knows. The 3 important message types are:
DigizuiteInitPostMessage
- So you know it is the Digizuite IframeDigizuiteChangeUrlPostMessage
- If the user tries to change URLDigizuiteAssetPostMessage
- When a user clicks on asset. When multi-select you receive more.
Code Block |
---|
export enum interface DigizuitePostMessage { messageType: MessageType; } export class DigizuiteInitPostMessage implements DigizuitePostMessage { AssetMessagemessageType = 'AssetMessage', // When clicing an asset ChangeUrl = 'ChangeUrl', // When user clicks change URL SmartPickerInitialized = 'SmartPickerInitialized', // when iframe is initialized MessageType.SmartPickerInitialized; } export class DigizuiteChangeUrlPostMessage implements DigizuitePostMessage { messageType = MessageType.ChangeUrl; mmUrl: string; constructor(mmUrl: string) { this.mmUrl = mmUrl; } } export class interfaceDigizuiteAssetPostMessage implements DigizuitePostMessage { messageType: = MessageType.AssetMessage; mmUrl?asset: stringAssetMessage; constructor(asset?: AssetMessage) { this.asset = asset; } } export interface AssetMessage { assetId: number; itemId: number; title: string; description: string; downloadUrl: string; thumb: string; extension: string; } |
Listening to events
As mentioned above, the iframe will post messages to its parent / host application. Listening to these events are what makes the magic. It can be done in different ways and most modern frameworks have ways for handling it. But since all are JavaScript frameworks then the most basic way in any kind of application would be to use ‘addEventListener’.
...