Skip to content

Releases: livepeer/ui-kit

@livepeer/[email protected]

06 Mar 00:19
9d7185c
Compare
Choose a tag to compare

Patch Changes

  • #505 0875372 Thanks @0xcadams! - Feature: added backoff and backoffMax to the Player, which defines the time which the Player waits before attempting, as well as the cap for exponential backoff.

    /**
     * Controls the initial value for exponential backoff, in ms. Defaults to 500ms, which is subsequently multiplied by 2^n power on each error.
     */
    backoff: number;
    
    /**
     * Controls the maximum backoff when an error is encountered, in ms. Defaults to 30s.
     */
    backoffMax: number;
  • Updated dependencies [0875372]:

@livepeer/[email protected]

06 Mar 00:19
9d7185c
Compare
Choose a tag to compare

Patch Changes

  • #505 0875372 Thanks @0xcadams! - Feature: added backoff and backoffMax to the Player, which defines the time which the Player waits before attempting, as well as the cap for exponential backoff.

    /**
     * Controls the initial value for exponential backoff, in ms. Defaults to 500ms, which is subsequently multiplied by 2^n power on each error.
     */
    backoff: number;
    
    /**
     * Controls the maximum backoff when an error is encountered, in ms. Defaults to 30s.
     */
    backoffMax: number;

@livepeer/[email protected]

06 Mar 00:19
9d7185c
Compare
Choose a tag to compare

Patch Changes

  • #505 0875372 Thanks @0xcadams! - Feature: added backoff and backoffMax to the Player, which defines the time which the Player waits before attempting, as well as the cap for exponential backoff.

    /**
     * Controls the initial value for exponential backoff, in ms. Defaults to 500ms, which is subsequently multiplied by 2^n power on each error.
     */
    backoff: number;
    
    /**
     * Controls the maximum backoff when an error is encountered, in ms. Defaults to 30s.
     */
    backoffMax: number;
  • Updated dependencies [0875372]:

@livepeer/[email protected]

06 Mar 00:19
9d7185c
Compare
Choose a tag to compare

Patch Changes

  • #505 0875372 Thanks @0xcadams! - Feature: added backoff and backoffMax to the Player, which defines the time which the Player waits before attempting, as well as the cap for exponential backoff.

    /**
     * Controls the initial value for exponential backoff, in ms. Defaults to 500ms, which is subsequently multiplied by 2^n power on each error.
     */
    backoff: number;
    
    /**
     * Controls the maximum backoff when an error is encountered, in ms. Defaults to 30s.
     */
    backoffMax: number;
  • Updated dependencies [0875372]:

@livepeer/[email protected]

06 Mar 18:20
1241018
Compare
Choose a tag to compare
Pre-release

Patch Changes

@livepeer/[email protected]

06 Mar 18:20
1241018
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #507 5802873 Thanks @0xcadams! - Fix: broke version and player out into different fields, improved play/pause events to be triggered on HTML events, added clip event.

@livepeer/[email protected]

06 Mar 18:20
1241018
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #507 5802873 Thanks @0xcadams! - Fix: broke version and player out into different fields, improved play/pause events to be triggered on HTML events, added clip event.

  • Updated dependencies [5802873]:

@livepeer/[email protected]

06 Mar 18:20
1241018
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #507 5802873 Thanks @0xcadams! - Fix: broke version and player out into different fields, improved play/pause events to be triggered on HTML events, added clip event.

  • Updated dependencies [5802873]:

@livepeer/[email protected]

05 Mar 21:41
3ff56c1
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • #500 92d67e1 Thanks @0xcadams! - Feature:: added metrics event reporting with POST requests, using sendBeacon for end-of-session metrics.

    export type HeartbeatEvent = {
      // The properties below are sent on every heartbeat.
    
      /** The event type. */
      type: "heartbeat";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The number of errors that have occurred since last heartbeat. */
      errors: number;
    
      /** The number of times the current playback has stalled, since last heartbeat. */
      stalled_count: number;
      /** The *total* number of times the current playback has waited, since last heartbeat. */
      waiting_count: number;
    
      /** The time the playback has spent in an errored state, in ms, since last heartbeat. */
      time_errored_ms: number;
      /** The time the playback has spent stalled, in ms, since last heartbeat. */
      time_stalled_ms: number;
      /** The time the playback has spent playing, in ms, since last heartbeat. */
      time_playing_ms: number;
      /** The time the playback has spent waiting, in ms, since last heartbeat. */
      time_waiting_ms: number;
    
      // The properties below are only sent once.
    
      /** The state of autoplay of the video. */
      autoplay_status?: "autoplay" | "none";
    
      /** The time from when the metrics were added to play, in milliseconds. */
      mount_to_play_ms?: number;
      /** The time from when the metrics were added to the first frame, in milliseconds. */
      mount_to_first_frame_ms?: number;
      /** The time from the first play event to the first frame, in milliseconds. Also called TTFF. */
      play_to_first_frame_ms?: number;
    
      /** The duration of the video, in milliseconds. */
      duration_ms?: number;
      /** The offset of the live video head compared to the server time, in milliseconds. */
      offset_ms?: number;
    
      // The properties below are only sent when they change.
    
      /** The height of the player element, in px. */
      player_height_px?: number;
      /** The width of the player element, in px. */
      player_width_px?: number;
      /** The height of the source video, in px. */
      video_height_px?: number;
      /** The width of the source video, in px. */
      video_width_px?: number;
      /** The height of the window, in px. */
      window_height_px?: number;
      /** The width of the window, in px. */
      window_width_px?: number;
    };
    
    export type ErrorEvent = {
      /** The event type. */
      type: "error";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The raw event error message. */
      error_message: string;
      /** The category of the error. */
      category:
        | "offline"
        | "access-control"
        | "fallback"
        | "permissions"
        | "unknown";
    };
    
    export type HtmlEvent = {
      /** The event type. */
      type:
        | "play"
        | "pause"
        | "enter-fullscreen"
        | "exit-fullscreen"
        | "enter-pip"
        | "exit-pip"
        | "can-play"
        | "ended"
        | "first-frame";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
    };
    
    export type RateChangeEvent = {
      /** The event type. */
      type: "rate";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The playback rate. */
      payload: PlaybackRate;
    };
    
    export type SeekEvent = {
      /** The event type. */
      type: "seek";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The seek timestamp. */
      payload: number;
    };
    
    export type VideoQualityEvent = {
      /** The event type. */
      type: "video-quality";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The video playback quality enum. */
      payload: VideoQuality;
    };
    
    export type PlaybackEvent =
      | HeartbeatEvent
      | ErrorEvent
      | HtmlEvent
      | RateChangeEvent
      | SeekEvent
      | VideoQualityEvent;
    
    export type SessionData = {
      session_id: string;
      playback_id: string;
      protocol?: MimeType;
      page_url: string;
      source_url: string;
      player: `${"audio" | "hls" | "video" | "webrtc" | "unknown"}-${string}`;
      user_agent?: string;
      uid?: string;
      events: PlaybackEvent[];
      live: boolean;
    };

Patch Changes

@livepeer/[email protected]

05 Mar 21:41
3ff56c1
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • #500 92d67e1 Thanks @0xcadams! - Feature:: added metrics event reporting with POST requests, using sendBeacon for end-of-session metrics.

    export type HeartbeatEvent = {
      // The properties below are sent on every heartbeat.
    
      /** The event type. */
      type: "heartbeat";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The number of errors that have occurred since last heartbeat. */
      errors: number;
    
      /** The number of times the current playback has stalled, since last heartbeat. */
      stalled_count: number;
      /** The *total* number of times the current playback has waited, since last heartbeat. */
      waiting_count: number;
    
      /** The time the playback has spent in an errored state, in ms, since last heartbeat. */
      time_errored_ms: number;
      /** The time the playback has spent stalled, in ms, since last heartbeat. */
      time_stalled_ms: number;
      /** The time the playback has spent playing, in ms, since last heartbeat. */
      time_playing_ms: number;
      /** The time the playback has spent waiting, in ms, since last heartbeat. */
      time_waiting_ms: number;
    
      // The properties below are only sent once.
    
      /** The state of autoplay of the video. */
      autoplay_status?: "autoplay" | "none";
    
      /** The time from when the metrics were added to play, in milliseconds. */
      mount_to_play_ms?: number;
      /** The time from when the metrics were added to the first frame, in milliseconds. */
      mount_to_first_frame_ms?: number;
      /** The time from the first play event to the first frame, in milliseconds. Also called TTFF. */
      play_to_first_frame_ms?: number;
    
      /** The duration of the video, in milliseconds. */
      duration_ms?: number;
      /** The offset of the live video head compared to the server time, in milliseconds. */
      offset_ms?: number;
    
      // The properties below are only sent when they change.
    
      /** The height of the player element, in px. */
      player_height_px?: number;
      /** The width of the player element, in px. */
      player_width_px?: number;
      /** The height of the source video, in px. */
      video_height_px?: number;
      /** The width of the source video, in px. */
      video_width_px?: number;
      /** The height of the window, in px. */
      window_height_px?: number;
      /** The width of the window, in px. */
      window_width_px?: number;
    };
    
    export type ErrorEvent = {
      /** The event type. */
      type: "error";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The raw event error message. */
      error_message: string;
      /** The category of the error. */
      category:
        | "offline"
        | "access-control"
        | "fallback"
        | "permissions"
        | "unknown";
    };
    
    export type HtmlEvent = {
      /** The event type. */
      type:
        | "play"
        | "pause"
        | "enter-fullscreen"
        | "exit-fullscreen"
        | "enter-pip"
        | "exit-pip"
        | "can-play"
        | "ended"
        | "first-frame";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
    };
    
    export type RateChangeEvent = {
      /** The event type. */
      type: "rate";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The playback rate. */
      payload: PlaybackRate;
    };
    
    export type SeekEvent = {
      /** The event type. */
      type: "seek";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The seek timestamp. */
      payload: number;
    };
    
    export type VideoQualityEvent = {
      /** The event type. */
      type: "video-quality";
      /** The timestamp of the event, in milliseconds. */
      timestamp: number;
      /** The video playback quality enum. */
      payload: VideoQuality;
    };
    
    export type PlaybackEvent =
      | HeartbeatEvent
      | ErrorEvent
      | HtmlEvent
      | RateChangeEvent
      | SeekEvent
      | VideoQualityEvent;
    
    export type SessionData = {
      session_id: string;
      playback_id: string;
      protocol?: MimeType;
      page_url: string;
      source_url: string;
      player: `${"audio" | "hls" | "video" | "webrtc" | "unknown"}-${string}`;
      user_agent?: string;
      uid?: string;
      events: PlaybackEvent[];
      live: boolean;
    };