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

Add stream config endpoint #2033

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Add stream config endpoint #2033

merged 2 commits into from
Feb 1, 2024

Conversation

mjh1
Copy link
Contributor

@mjh1 mjh1 commented Feb 1, 2024

No description provided.

@mjh1 mjh1 requested a review from a team as a code owner February 1, 2024 16:01
Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 1, 2024 5:25pm

packages/api/src/controllers/stream.ts Dismissed Show dismissed Hide dismissed
Copy link
Member

@victorges victorges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM either way simple asks

Comment on lines 1854 to 1856
if (!stream) {
stream = await db.stream.get(id);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps by streamKey instead? Catalyst never gets the stream ID AFAIK.

But also, maybe we want to be explicit here by using query-strings instead like /api/stream/config?playbackId=<pid> or /api/stream/config?streamKey=<sk>

Otherwise, I'm concerned we could for example eventually start allowing playback by stream key or stream id, which could leak to accidental leaks of those for example 🤔 (stream ID is also secret, it kinda gives ownership over the resource if the app uses a frontend API key)

ORRR, to keep it simple, we can allow only playback ID for now and think about this later when this evolves for example to replace the API that mapic calls.

if (!stream) {
stream = await db.stream.get(id);
}
if (!stream) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check stream.deleted and maybe stream.suspended as well

packages/api/src/controllers/stream.ts Outdated Show resolved Hide resolved
@mjh1 mjh1 merged commit 1688bd3 into master Feb 1, 2024
10 checks passed
@mjh1 mjh1 deleted the mh/stream-conf-api branch February 1, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants