Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: removed playback URL from stream #390

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/three-wolves-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@livepeer/core': minor
'@livepeer/core-react': minor
'livepeer': minor
'@livepeer/react': minor
'@livepeer/react-native': minor
---

**Breaking:** removed `playbackUrl` from stream responses. Developers should migrate to using `playbackId` to query stream playback URLs.
6 changes: 4 additions & 2 deletions packages/core-react/src/hooks/stream/useStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ describe('useStream', () => {

await waitFor(() => expect(result.current.isSuccess).toBeTruthy());

expect(result?.current?.data?.playbackUrl).toMatchInlineSnapshot(
'"https://livepeercdn.com/hls/d7aer9qx8act4lfd/index.m3u8"',
expect((result?.current?.data as any)?.['playbackUrl']).toBeUndefined();

expect(result?.current?.data?.playbackId).toMatchInlineSnapshot(
'"d7aer9qx8act4lfd"',
);
});

Expand Down
3 changes: 0 additions & 3 deletions packages/core-web/src/media/browser/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { beforeAll, describe, expect, it } from 'vitest';
import { addMediaMetrics } from './metrics';
import { MockedVideoElement, resetDateNow, setupClient } from '../../../test';

// const playbackUrl =
// 'https://livepeercdn.com/recordings/9b8a9c59-e5c6-4ba8-9f88-e400b0f9153f/index.m3u8';

describe('addMediaMetrics', () => {
beforeAll(() => {
setupClient();
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/providers/studio/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,6 @@ export class StudioLivepeerProvider extends BaseLivepeerProvider {
return {
...studioStream,
multistream: await this._mapToMultistream(studioStream.multistream),
rtmpIngestUrl: this._getRtmpIngestUrl(studioStream.streamKey),
playbackUrl: this._getPlaybackUrl(studioStream.playbackId),
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/providers/studio/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type StudioFfmpegProfile = TranscodingProfile & {
};

export interface StudioStream
extends Omit<Stream, 'rtmpIngestUrl' | 'playbackUrl' | 'multistream'> {
extends Omit<Stream, 'playbackUrl' | 'multistream'> {
profiles: StudioFfmpegProfile[];
/**
* Name of the token used to create this object.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/types/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ export type Stream = {
rtmpIngestUrl: string;
/** ID used to create the playback URLs */
playbackId: string;
/** URL for HLS playback */
playbackUrl: string;
/** ID of the parent stream object. Only present for sessions. */
parentId?: string;
/** Unix timestamp (in milliseconds) at which the stream object was created */
Expand Down
Loading