Skip to content

Commit

Permalink
chore: version packages (next) (#504)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Mar 5, 2024
1 parent 92d67e1 commit 3ff56c1
Show file tree
Hide file tree
Showing 9 changed files with 605 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
"@livepeer/core-web": "4.1.8",
"@livepeer/react": "4.1.8"
},
"changesets": []
"changesets": [
"good-mice-exist"
]
}
152 changes: 151 additions & 1 deletion packages/core-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
150 changes: 150 additions & 0 deletions packages/core-web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 3ff56c1

Please sign in to comment.