Description
The Subtitle Viewer Interface Asset is a custom Interface Asset that makes it easy to extract and display subtitles from the contents of an SRT file.
This Interface Asset was built in conjunction with our Intuiface Coding Assistant. You can find more information about it here: Use the Intuiface Coding Assistant
This Interface Asset is only supported by Player 8 and above.
Want to use this Interface Asset within your experience? View this article about how to Reuse an Interface Asset from any Experience.
View a live demo below - yes, you can interact with the experience!:
The Subtitle Viewer is a simple yet powerful Interface Asset that reads the contents of an SRT file and syncs subtitles in real time based on a video or audio file's timestamp.
An SRT SubRip Subtitle file is a simple text format used to display subtitles at specific times during video or audio playback. You can create one using third-party tools like YouTube or Camtasia, or alternatively, you can edit the template in this ExampleSRT.zip to add your own subtitles manually.
Properties, triggers, and actions
The Interface Asset contains two actions, one trigger and two properties.
Properties
- Current Subtitle: The currently displayed subtitle.
- Current timestamp: The current playback timestamp, measured in seconds.
Triggers
- Invalid or empty SRT contents: Triggered when the "SRT content" property is empty or contains invalid content.
Actions
- Clear subtitle: Clears the value of the “Current Subtitle” property. Useful when resetting or switching scenes.
- Update current timestamp: Assigns a new value to the “Current Timestamp” property and checks whether a new subtitle should be displayed. This action is ignored if the new timestamp is within 0.1 seconds of the current timestamp.
Use Cases for this Interface Asset:
- Display on-screen subtitles so everyone can follow along, even with the audio muted or unavailable.
- Show translated subtitles alongside audio tracks in different languages to make your experience more inclusive and multilingual-friendly.
- Easily layer subtitles onto videos or audio files that weren’t originally captioned — no need to re-edit the media.
Want to try it out? Download the below and get started!
Download Subtitle Viewer Experience
Comments
0 comments
Article is closed for comments.