ProjectMetaData

This addon displays some information about the project currently being watched, as well as some controls.

Props

  • isPaused {boolean} - Is the player paused.
  • watchTime {number} - Project watch time in seconds.
  • showShareButton {boolean} - Should share button be visible.
  • showCredits {boolean} - Should thecredits button be visible.
  • showWatchTime {boolean} - Should the watch time be visible.
  • showTitle {boolean} - Should the title be visible.
  • showSubtitle {boolean} - Should the subtitle be visible. If not configured via options, default true.
  • showStartOver {boolean} - Should the startOver button be visible. If not configured via options, default true.
  • backgroundColor {sring} - A CSS string representing the background color.
  • projectTitle {string} - The text for the project title.
  • showBackButton {boolean} - Should the back button be visible.
  • backButtonTitle {string} - The text for the back button.

API

player.ekoshell.ProjectMetaData

  • hide() - Hides the projectMetaData and resumes the player
  • startOver(e {event}) - Starts over the interactive experience. e is the triggering event.
  • onClickBackButton(e {event}, opts {object}) - Navigates “back”. opts are of the form:
      {
          linkout: true, // should the navigation open in new page
          pageUrl: "https://eko.com" // the url to navigate to 
      }
    
  • onClickCredits(e {event}, creditsUrl {string}) - Open the project’s credits in a new page

Events

  • PROJECTMETADATA_BACK_CLICKED: 'ekoshell.metadata.back'
  • PROJECTMETADATA_REPLAY_CLICKED: 'ekoshell.metadata.startover',
  • PROJECTMETADATA_CREDITS_CLICKED: 'ekoshell.metadata.credits'

parentContainer

root

Sub-addons

Schema

"projectmetadata": {
    "type": "object",
    "properties": {
        // should the title text be visible
        "title": {"type": "boolean"},
        // should the subtitle text be visible
        "subtitle": {"type": "boolean"},
        // should the startOver button be visible
        "startOver": {"type": "boolean"},
        // should the watchTime text be visible
        "watchTime": {"type": "boolean"},
        // a CSS value for the addon background
        "background": {"type": "string"}
    }
}

Notes

  • Show watch time should be hidden from the user if not defined, even if showWatchTime is set to true
  • Make sure to disable addon buttons if it is overlayed by a different addon (for example, buttons should be disabled when the ShareScreen addon is visible on top of the ProjectMetaData overlay)
Rate this page: X
Tell us more!