Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcadams committed Apr 15, 2024
2 parents 1005134 + 09495c1 commit fb6146a
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 116 deletions.
14 changes: 14 additions & 0 deletions apps/lvpr-tv/src/app/broadcast/[key]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { getIngest } from "@livepeer/react/external";

type BroadcastSearchParams = {
forceEnabled?: Booleanish;
idealWidth?: string | number;
idealHeight?: string | number;
};

export default async function BroadcastPage({
Expand All @@ -22,6 +24,18 @@ export default async function BroadcastPage({
<BroadcastWithControls
ingestUrl={ingestUrl}
forceEnabled={coerceToBoolean(searchParams?.forceEnabled, true)}
video={
searchParams.idealHeight || searchParams.idealWidth
? {
width: searchParams.idealWidth
? Number(searchParams.idealWidth)
: undefined,
height: searchParams.idealHeight
? Number(searchParams.idealHeight)
: undefined,
}
: undefined
}
/>
</main>
);
Expand Down
1 change: 1 addition & 0 deletions examples/with-pubnub/src/components/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const Chat = ({ playbackId }: { playbackId: string }) => {
) : (
chatMessages.map((message) => (
<div
key={message.id}
id={message.id}
className="flex flex-col rounded-lg px-3 py-2 border border-white/20"
>
Expand Down
11 changes: 10 additions & 1 deletion packages/core-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# @livepeer/core-react

## 3.1.15

### Patch Changes

- [#530](https://github.com/livepeer/ui-kit/pull/530) [`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** fix for metrics using `disableProgressListener` where the metrics does not register a `playing` event.

- Updated dependencies [[`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124)]:
- @livepeer/core@3.1.15

## 3.1.14

### Patch Changes

- [#526](https://github.com/livepeer/ui-kit/pull/526) [`3f0c10a`](https://github.com/livepeer/ui-kit/commit/3f0c10ab285af7818d196299868432a7e566f590) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** added `playing` event listener to `addMediaMetrics`, in addition to the existing `play` event listener.
- [#526](https://github.com/livepeer/ui-kit/pull/526) [`3f0c10a`](https://github.com/livepeer/ui-kit/commit/3f0c10ab285af7818d196299868432a7e566f590) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** added `playing` event listener to `addMediaMetrics`, in addition to the existing `play` event listener.

- Updated dependencies [[`3f0c10a`](https://github.com/livepeer/ui-kit/commit/3f0c10ab285af7818d196299868432a7e566f590)]:
- @livepeer/core@3.1.14
Expand Down
21 changes: 5 additions & 16 deletions 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.14",
"version": "3.1.15",
"type": "module",
"repository": {
"type": "git",
Expand All @@ -13,9 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -31,12 +29,8 @@
},
"typesVersions": {
"*": {
"crypto": [
"./dist/crypto/index.d.ts"
],
"*": [
"./dist/index.d.ts"
]
"crypto": ["./dist/crypto/index.d.ts"],
"*": ["./dist/index.d.ts"]
}
},
"scripts": {
Expand All @@ -61,10 +55,5 @@
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"keywords": [
"livepeer",
"video",
"streaming",
"livestream"
]
"keywords": ["livepeer", "video", "streaming", "livestream"]
}
9 changes: 9 additions & 0 deletions packages/core-web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# livepeer

## 4.1.15

### Patch Changes

- [#530](https://github.com/livepeer/ui-kit/pull/530) [`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** fix for metrics using `disableProgressListener` where the metrics does not register a `playing` event.

- Updated dependencies [[`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124)]:
- @livepeer/core@3.1.15

## 4.1.14

### Patch Changes
Expand Down
41 changes: 10 additions & 31 deletions 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.14",
"version": "4.1.15",
"type": "module",
"repository": {
"type": "git",
Expand All @@ -13,9 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"exports": {
"./package.json": "./package.json",
".": {
Expand Down Expand Up @@ -56,27 +54,13 @@
},
"typesVersions": {
"*": {
"broadcast": [
"./dist/broadcast/index.d.ts"
],
"browser": [
"./dist/browser/index.d.ts"
],
"external": [
"./dist/external/index.d.ts"
],
"hls": [
"./dist/hls/index.d.ts"
],
"media": [
"./dist/media/index.d.ts"
],
"webrtc": [
"./dist/webrtc/index.d.ts"
],
"*": [
"./dist/index.d.ts"
]
"broadcast": ["./dist/broadcast/index.d.ts"],
"browser": ["./dist/browser/index.d.ts"],
"external": ["./dist/external/index.d.ts"],
"hls": ["./dist/hls/index.d.ts"],
"media": ["./dist/media/index.d.ts"],
"webrtc": ["./dist/webrtc/index.d.ts"],
"*": ["./dist/index.d.ts"]
}
},
"scripts": {
Expand All @@ -90,10 +74,5 @@
"hls.js": "^1.5.2",
"zustand": "^4.5.0"
},
"keywords": [
"livepeer",
"video",
"streaming",
"livestream"
]
"keywords": ["livepeer", "video", "streaming", "livestream"]
}
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @livepeer/core

## 3.1.15

### Patch Changes

- [#530](https://github.com/livepeer/ui-kit/pull/530) [`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** fix for metrics using `disableProgressListener` where the metrics does not register a `playing` event.

## 3.1.14

### Patch Changes
Expand Down
41 changes: 10 additions & 31 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Livepeer UI Kit's core vanilla JS library.",
"license": "MIT",
"type": "module",
"version": "3.1.14",
"version": "3.1.15",
"repository": {
"type": "git",
"url": "https://github.com/livepeer/ui-kit.git",
Expand All @@ -13,9 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"exports": {
"./package.json": "./package.json",
".": {
Expand Down Expand Up @@ -56,27 +54,13 @@
},
"typesVersions": {
"*": {
"crypto": [
"./dist/crypto/index.d.ts"
],
"errors": [
"./dist/errors/index.d.ts"
],
"media": [
"./dist/media/index.d.ts"
],
"storage": [
"./dist/storage/index.d.ts"
],
"utils": [
"./dist/utils/index.d.ts"
],
"version": [
"./dist/version/index.d.ts"
],
"*": [
"./dist/index.d.ts"
]
"crypto": ["./dist/crypto/index.d.ts"],
"errors": ["./dist/errors/index.d.ts"],
"media": ["./dist/media/index.d.ts"],
"storage": ["./dist/storage/index.d.ts"],
"utils": ["./dist/utils/index.d.ts"],
"version": ["./dist/version/index.d.ts"],
"*": ["./dist/index.d.ts"]
}
},
"scripts": {
Expand All @@ -92,10 +76,5 @@
"devDependencies": {
"jose": "^5.2.3"
},
"keywords": [
"livepeer",
"video",
"streaming",
"livestream"
]
"keywords": ["livepeer", "video", "streaming", "livestream"]
}
28 changes: 22 additions & 6 deletions packages/core/src/media/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ export class MetricsStatus {
this.timeUnpaused.start();
} else {
this.timeUnpaused.stop();
this.timeStalled.stop();
this.timeWaiting.stop();
}
}

Expand All @@ -301,13 +303,27 @@ export class MetricsStatus {
this.timeUnpaused.start();
}

if (state.stalled !== prevState.stalled && state.stalled) {
this.timeStalled.start();
this.timeUnpaused.stop();
if (state.stalled !== prevState.stalled) {
if (state.stalled) {
this.timeStalled.start();
this.timeUnpaused.stop();
} else if (state.playing) {
this.timeStalled.stop();
this.timeWaiting.stop();

this.timeUnpaused.start();
}
}
if (state.waiting !== prevState.waiting && state.waiting) {
this.timeWaiting.start();
this.timeUnpaused.stop();
if (state.waiting !== prevState.waiting) {
if (state.waiting) {
this.timeWaiting.start();
this.timeUnpaused.stop();
} else if (state.playing) {
this.timeStalled.stop();
this.timeWaiting.stop();

this.timeUnpaused.start();
}
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const core = "@livepeer/core@3.1.13";
const react = "@livepeer/react@4.1.13";
const core = "@livepeer/core@3.1.15";
const react = "@livepeer/react@4.1.15";

export const version = {
core,
Expand Down
11 changes: 11 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @livepeer/react

## 4.1.15

### Patch Changes

- [#530](https://github.com/livepeer/ui-kit/pull/530) [`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124) Thanks [@0xcadams](https://github.com/0xcadams)! - **Fix:** fix for metrics using `disableProgressListener` where the metrics does not register a `playing` event.

- Updated dependencies [[`adbd11b`](https://github.com/livepeer/ui-kit/commit/adbd11b404888af813c7dcea04a76c9e9a450124)]:
- @livepeer/core@3.1.15
- @livepeer/core-react@3.1.15
- @livepeer/core-web@4.1.15

## 4.1.14

### Patch Changes
Expand Down
38 changes: 9 additions & 29 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@livepeer/react",
"description": "React primitives for video apps.",
"license": "MIT",
"version": "4.1.14",
"version": "4.1.15",
"type": "module",
"repository": {
"type": "git",
Expand All @@ -13,9 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"exports": {
"./package.json": "./package.json",
".": {
Expand Down Expand Up @@ -51,24 +49,12 @@
},
"typesVersions": {
"*": {
"assets": [
"./dist/assets/index.d.ts"
],
"broadcast": [
"./dist/broadcast/index.d.ts"
],
"crypto": [
"./dist/crypto/index.d.ts"
],
"external": [
"./dist/external/index.d.ts"
],
"player": [
"./dist/player/index.d.ts"
],
"*": [
"./dist/index.d.ts"
]
"assets": ["./dist/assets/index.d.ts"],
"broadcast": ["./dist/broadcast/index.d.ts"],
"crypto": ["./dist/crypto/index.d.ts"],
"external": ["./dist/external/index.d.ts"],
"player": ["./dist/player/index.d.ts"],
"*": ["./dist/index.d.ts"]
}
},
"scripts": {
Expand Down Expand Up @@ -114,11 +100,5 @@
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"keywords": [
"livepeer",
"react",
"video",
"streaming",
"livestream"
]
"keywords": ["livepeer", "react", "video", "streaming", "livestream"]
}

0 comments on commit fb6146a

Please sign in to comment.