Deep Links
When working with MediaCentral Cloud UX, the URL used to access the user interface often includes additional data about the mode and state of the user session.
Users can connect to MediaCentral Cloud UX in either the standard User mode (main
mode)
which has access to the User apps such as Browse and Search,
or Administrator mode (admin
mode) which includes options to import users, license, or further configure the MediaCentral Cloud UX experience.
In addition to the mode, the URL might also contain information on apps (several applications can be loaded simultaneously in different zones) and the state of the Asset Editor.
All this information is contained in the browser URL.
The mechanism used to call this URL is referred to as a “deep link”.
MediaCentral Cloud UX can restore its state after refreshing the page using the URL (deep link).
A deep link can also be shared with another user to load MediaCentral Cloud UX with a defined application state.
You can specify the following in a deep link:
- admin mode (always specified first if needed)
- main application (with context)
- inspector zone context
- docked application (with context)
All deep link elements are combined with /
.
Application Mode
The deep link can contain information about the application mode.
- main mode: this is the default (nothing needs to be specified)
- admin mode: If you need to specify
admin
mode, the deep link has to contain/admin
Main Application
The deep link can contain information about the application that is to be shown in the main zone.
Pattern: /app/{app-name}
where app-name
is application name from your feature exports:
1 | export const avid = [{ |
The Asset Editor
The deep link can contain information about the Asset Editor and its context.
Pattern: /inspector/
Docked Application
The deep link can contain information about the application that is to be shown in the docked zone.
Pattern: /docked/{app-name}
Context
To generate a deep link, the application needs to implement the getContext method
and use the appStateChange event.
To restore the application context from the deep link, the application has to implement the setContext method.
For format details, see the section Context.
The getContext
method must return the minimal required information for restoring application context.
The context will be transformed using the following rules:
- Mime types will be simplified:
- text/x.avid.asset-list ->
asset
- text/x.avid.location-item-list ->
location-item
- text/x.avid.asset-list ->
- context value
{systemType}:{systemID}:{type}:{id}
The deep link context has to be encoded as a Uniform Resource Identifier (URI). To do so, use the method encodeURIComponent
.
Example: https://host-name/app/browse/ctx/location-item/interplay-pam%3A7B7E2886-81CC-4D66-B4F8-7C8431DA4176%3Acatalog%3A%2FCatalogs%2F
Usage
Following these rules, the deep link can be generated automatically or can be generated manually for sharing with other users.
Do not use the deep link mechanism to change the context of another application in the layout or the state of the current application.
Use appContextChange and appStateChange for this purpose.
Examples
- Main application:
https://host-name/app/browse
- Main application with context:
https://host-name/app/browse/ctx/location-item/interplay-pam%3A20AB378F-2BA3-4C34-912C-CB6ADEA3172E%3Afolder%3A%2F
- Main application and Asset Editor, both with context:
https://host-name/app/browse/ctx/location-item/interplay-pam%3A20AB378F-2BA3-4C34-912C-CB6ADEA3172E%3Afolder%3A%2F/inspector/ctx/asset/interplay-pam%3A20AB378F-2BA3-4C34-912C-CB6ADEA3172E%3Amasterclip%3A060a2b340101010101010f0013-000000-09090f00b0c00012-060e2b347f7f-d080/ctx/text%2Fx.avid.asset-list%2Bjson/%5B%7B%22systemType%22%3A%22interplay-pam%22%2C%22systemID%22%3A%2220AB378F-2BA3-4C34-912C-CB6ADEA3172E%22%2C%22type%22%3A%22masterclip%22%2C%22id%22%3A%22060a2b340101010101010f0013-000000-09090f00b0c00012-060e2b347f7f-d080%22%7D%5D
- Main and docked application:
https://host-name/app/search/docked/browse
- Admin application:
https://host-name/admin/app/configuration-settings