-
Notifications
You must be signed in to change notification settings - Fork 32
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
Populate recordingURL when source playback is ready #1847
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -447,9 +450,6 @@ export async function getRecordingFields( | |||
const isUnused = !session.lastSeen && session.createdAt < readyThreshold; | |||
|
|||
const recordingStatus = isReady ? "ready" : isUnused ? "none" : "waiting"; | |||
if (!isReady && !forceUrl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victorges do you know what the forceUrl
param was used for? It's not used anywhere other than these lines I removed. I removed them because I want to just check for the presence of a playbackURL rather than checking the recording status field (to allow us to get source playback through the recordingURL field).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the API to return a recordingURL even if it might not have been complete yet. I think this was more useful on the recording v1 to be honest, where recordings were playable even while the stream was live and we only had an artificial wait on the API side to make sure the stream was finished.
I think it would be a noop in this flow here, since the getRecordingUrls
would return undefined
anyway and we wouldn't be able to force URLs. Does that seem correct? If so, then it should be completely fine removing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a suggestion for an additional change for the recordingStatus
@@ -447,9 +450,6 @@ export async function getRecordingFields( | |||
const isUnused = !session.lastSeen && session.createdAt < readyThreshold; | |||
|
|||
const recordingStatus = isReady ? "ready" : isUnused ? "none" : "waiting"; | |||
if (!isReady && !forceUrl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the API to return a recordingURL even if it might not have been complete yet. I think this was more useful on the recording v1 to be honest, where recordings were playable even while the stream was live and we only had an artificial wait on the API side to make sure the stream was finished.
I think it would be a noop in this flow here, since the getRecordingUrls
would return undefined
anyway and we wouldn't be able to force URLs. Does that seem correct? If so, then it should be completely fine removing this.
For recording V2 we can just base the recording status on the asset status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This reverts commit 889c662.
* Populate recordingURL when source playback is ready * Simplify recording status logic For recording V2 we can just base the recording status on the asset status * Fix logic
What does this pull request do? Explain your changes. (required)
Populate recordingURL when source playback is ready
Specific updates (required)
How did you test each of these updates (required)
Tested in staging.
Does this pull request close any open issues?
Screenshots (optional)
Checklist