Skylight Docs
Search
K

Media Management

When building a Skylight application, a developer has access to media (video, photo, and audio) from two different source types: application media and session media.

Application Media

Application media is uploaded as a core resource for an application to be used as reference media in the application UX.
Application media applies to and is accessible by the application in general. It is created at design time and is transferred to the various clients as part of the application definition.
Note: ALL media added as application media will be downloaded onto the client as part of the application. Unused media should be deleted from the application prior to deployment to better optimize media sync time on the client.
To add media to an application, you can upload it through the Media page in Application Builder:
Media tab in App Builder
A photo added to Application Media
Unused application media should be removed from the app prior to deployment to optimize sync time on the client. To delete, select the item in the media tab and then select the
button. Note that this is a permanent deletion and the media item will not be retrievable.
Application media can be added to a card as an image or icon using the media selector or by directly setting the uri to skylight://mediaId.
Select an image from Application Media to add to a card
Bind the image.uri to skylight://mediaId

Relevant Events

  • application_media_created
  • application_media_updated

Session Media

Session media is created as part of the execution process of an application in conjunction with a session. This includes captured media that would be stored in the session media and have properties on it that identify the session. This also includes media that may be uploaded by a data connector for a specific session.
Session media applies to a single session and is not accessible outside of that session.

Sources

There are three ways to work with session media: API, captures, and calls.
API
Captures
Calls
Media can be managed for a session using the Integration API and the scripting API. The Integration API would typically be used by a data connector to populate a user's session with relevant media or to download captured media to be stored outside of Skylight. The scripting API could be used to display session media to the user within the app itself.
Only the Integration API can be used to retrieve session media even after the session has been closed.
Photo and video captures are added to the session that initiated the capture. When initiating the capture, you can specify labels and gallery filter parameters for organizing within the session. labels are tags that can be added to a capture so that the gallery filters can be applied to only display the captures having particular label(s). See Media Capture for more details about using labels and gallery filter.
Captured media are accessible through the Integration API and scripting API as standard session media.
Snapshots taken during a call are automatically added to the call session in session.media. Some differences from regular photo captures include
  • Filename : prefixed with LiveSnapshot
  • Properties: includes the room id and wasRemotelyRequested flag
Some Skylight clients have the ability to share media during a call by uploading a local media file. The uploaded media file then becomes a session.media with some notable differences from captured media and snapshots:
  • Filename: the original name of the file that was shared
  • Properties: includes the room id and sharedMedia flag
Snapshots and shared media are accessible through the Integration API and scripting API as standard session media.

Relevant Events

  • session_media_created
  • session_media_updated (when the media has finished uploading to Skylight)

Permissions

Application developers can configure various role-based media permissions. To access, a developer opens the application in the web portal and navigates to the app's "Permissions" page.
Select the "MANAGE ROLES" button on the page, then edit an existing role's permissions (or create a new role).
  • Scroll down the expanded modal to the "Media" section, then select the desired media permissions for the role
  • There are two "Super Permissions" which, if checked, grant the role permission to access all child properties
    • Selecting the super property Session: Media: Create gives the role access to perform all actions (read, update, and create)
    • Selecting the super property Session: Media: Read gives the role access to READ all media properties, such as viewing the media's title, labels, and annotations.

Annotations

Visual annotations (e.g., drawings) can be applied to photos in session media from some Skylight clients. They can be used to make a quick note or to point out an important part of the photo.
Annotations are made by selecting the photo from the media gallery associated with a media capture card. They can also be made on a snapshot or shared media file during the active call. They are kept in a separate annotations field within the media object, with the actual annotation data stored as an svg. The original media is untouched. The annotations have to be applied separately. The Skylight clients automatically apply the annotations when displaying the photo or snapshot in the app. If the media is downloaded externally, the annotations would need to be applied to the original media file.

Relevant Events

  • session_media_annotation_created
  • session_media_annotation_deleted

Delete vs. Archive

Session media can be either archived or permanently deleted using the Integration API.
Archived media still exists in Skylight, but is not accessible through the standard API calls. Attempts to retrieve archived session media will result in a 404. Archived media can be unarchived to regain access.
Deleted media is permanently purged from Skylight and no longer exists. Deleted media can not be undone. Attempts to retrieve deleted session media will result in a 404.

Relevant Events

  • session_media_archived
  • session_media_unarchived
  • session_media_deleted