Options
All
  • Public
  • Public/Protected
  • All
Menu

Callback hooks for triggering actions such as auth and getting info

Hierarchy

  • IHooks

Index

Methods

  • getMediaDeepLinkUrl(params: { currentTime: number; mediaSrc: string; widgetIndex: number }): string
  • Url to the video page and specific playback time of currentTime. If provided will be used by annoto for email notifications, in the dashboard, etc.

    Parameters

    • params: { currentTime: number; mediaSrc: string; widgetIndex: number }
      • currentTime: number
      • mediaSrc: string
      • widgetIndex: number

    Returns string

  • getPageUrl(): string
  • Url to the video page. Useful if Annoto is embedded inside iframe for example. default: window.location.href is used.

    Returns string

  • logoutRequestHandle(): void | Promise<void>
  • For SSO enabled integrations only. If Provided, Will be called when user triggers Logout action and "Logout" option will appear in the drawer menu.

    Returns void | Promise<void>

    If possible the promise should reslove/reject when the logout flow is finished.

  • Callback that allows to enrich details about the played media. If provided the function is called by the widget to obtain additional details about the media.

    Parameters

    • params: { details?: IMediaDetails; mediaSrc: string; widgetIndex: number }
      • Optional details?: IMediaDetails
      • mediaSrc: string
      • widgetIndex: number

    Returns IMediaDetails | Promise<IMediaDetails>

    additional details about the played media, such as title

  • Callback that allows to modify the configuration This callback is called when media is ready and it's preferences is loaded from the backend

    remarks

    This is the prefered way of modifying the configuration. The best practice is to keep the widget bootstrap configuration to a minimum.

    Parameters

    Returns Promise<IConfig<IFeatures>>

    configuration to override the exiting config (will be deep merged by Annoto)

  • ssoAuthRequestHandle(): void | Promise<void>
  • For SSO enabled integrations only. If Provided, Will be called when user triggers Authentication. If not provided a message in the form is shown.

    Returns void | Promise<void>

    If possible the promise should reslove/reject when the auth flow is finished.