From 3ff56c1daa80f84d0ea47d7c1a7fd2628ce1c875 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:40:09 -0700 Subject: [PATCH] chore: version packages (next) (#504) Co-authored-by: github-actions[bot] --- .changeset/pre.json | 4 +- packages/core-react/CHANGELOG.md | 152 ++++++++++++++++++++++++++++++- packages/core-react/package.json | 2 +- packages/core-web/CHANGELOG.md | 150 ++++++++++++++++++++++++++++++ packages/core-web/package.json | 2 +- packages/core/CHANGELOG.md | 145 +++++++++++++++++++++++++++++ packages/core/package.json | 2 +- packages/react/CHANGELOG.md | 152 +++++++++++++++++++++++++++++++ packages/react/package.json | 2 +- 9 files changed, 605 insertions(+), 6 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index d9ae2484..4532ef69 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -11,5 +11,7 @@ "@livepeer/core-web": "4.1.8", "@livepeer/react": "4.1.8" }, - "changesets": [] + "changesets": [ + "good-mice-exist" + ] } diff --git a/packages/core-react/CHANGELOG.md b/packages/core-react/CHANGELOG.md index db4b96e1..696620bf 100644 --- a/packages/core-react/CHANGELOG.md +++ b/packages/core-react/CHANGELOG.md @@ -1,10 +1,160 @@ # @livepeer/core-react +## 3.2.0-next.0 + +### Minor Changes + +- [#500](https://github.com/livepeer/ui-kit/pull/500) [`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde) Thanks [@0xcadams](https://github.com/0xcadams)! - **Feature:**: added metrics event reporting with POST requests, using `sendBeacon` for end-of-session metrics. + + ```tsx + 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 + +- Updated dependencies [[`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde)]: + - @livepeer/core@3.2.0-next.0 + ## 3.1.8 ### Patch Changes -- [#498](https://github.com/livepeer/ui-kit/pull/498) [`511ae87`](https://github.com/livepeer/ui-kit/commit/511ae87168416448b1e7035a3898add0c0a9c544) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** fixed the mouse interactions to not hide when a Radix Popover is open, and not flash when a user hovers over the video element. +- [#498](https://github.com/livepeer/ui-kit/pull/498) [`511ae87`](https://github.com/livepeer/ui-kit/commit/511ae87168416448b1e7035a3898add0c0a9c544) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** fixed the mouse interactions to not hide when a Radix Popover is open, and not flash when a user hovers over the video element. - Updated dependencies [[`511ae87`](https://github.com/livepeer/ui-kit/commit/511ae87168416448b1e7035a3898add0c0a9c544)]: - @livepeer/core@3.1.8 diff --git a/packages/core-react/package.json b/packages/core-react/package.json index 1aba1142..cf45a412 100644 --- a/packages/core-react/package.json +++ b/packages/core-react/package.json @@ -2,7 +2,7 @@ "name": "@livepeer/core-react", "description": "Internal library used for livepeer react primitives.", "license": "MIT", - "version": "3.1.8", + "version": "3.2.0-next.0", "type": "module", "repository": { "type": "git", diff --git a/packages/core-web/CHANGELOG.md b/packages/core-web/CHANGELOG.md index 2011418d..421632b9 100644 --- a/packages/core-web/CHANGELOG.md +++ b/packages/core-web/CHANGELOG.md @@ -1,5 +1,155 @@ # livepeer +## 4.2.0-next.0 + +### Minor Changes + +- [#500](https://github.com/livepeer/ui-kit/pull/500) [`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde) Thanks [@0xcadams](https://github.com/0xcadams)! - **Feature:**: added metrics event reporting with POST requests, using `sendBeacon` for end-of-session metrics. + + ```tsx + 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 + +- Updated dependencies [[`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde)]: + - @livepeer/core@3.2.0-next.0 + ## 4.1.8 ### Patch Changes diff --git a/packages/core-web/package.json b/packages/core-web/package.json index c41dbef8..8be93701 100644 --- a/packages/core-web/package.json +++ b/packages/core-web/package.json @@ -2,7 +2,7 @@ "name": "@livepeer/core-web", "description": "Livepeer UI Kit's core web library, for adding reactive stores to video elements.", "license": "MIT", - "version": "4.1.8", + "version": "4.2.0-next.0", "type": "module", "repository": { "type": "git", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 1b7f245f..ba3896af 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,150 @@ # @livepeer/core +## 3.2.0-next.0 + +### Minor Changes + +- [#500](https://github.com/livepeer/ui-kit/pull/500) [`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde) Thanks [@0xcadams](https://github.com/0xcadams)! - **Feature:**: added metrics event reporting with POST requests, using `sendBeacon` for end-of-session metrics. + + ```tsx + 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; + }; + ``` + ## 3.1.8 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index e4719179..83bd4996 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,7 +3,7 @@ "description": "Livepeer UI Kit's core vanilla JS library.", "license": "MIT", "type": "module", - "version": "3.1.8", + "version": "3.2.0-next.0", "repository": { "type": "git", "url": "https://github.com/livepeer/ui-kit.git", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 6eb9d221..91d9486b 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,157 @@ # @livepeer/react +## 4.2.0-next.0 + +### Minor Changes + +- [#500](https://github.com/livepeer/ui-kit/pull/500) [`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde) Thanks [@0xcadams](https://github.com/0xcadams)! - **Feature:**: added metrics event reporting with POST requests, using `sendBeacon` for end-of-session metrics. + + ```tsx + 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 + +- Updated dependencies [[`92d67e1`](https://github.com/livepeer/ui-kit/commit/92d67e1d0e89c52ea8bde16b735f2400e8897bde)]: + - @livepeer/core-react@3.2.0-next.0 + - @livepeer/core-web@4.2.0-next.0 + - @livepeer/core@3.2.0-next.0 + ## 4.1.8 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index acf7c7eb..a52406d8 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -2,7 +2,7 @@ "name": "@livepeer/react", "description": "React primitives for video apps.", "license": "MIT", - "version": "4.1.8", + "version": "4.2.0-next.0", "type": "module", "repository": { "type": "git",