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

adds stream create parameters: maxDurationSeconds and expiry #1400

Closed

Conversation

bbbshah
Copy link
Contributor

@bbbshah bbbshah commented Sep 13, 2023

Description

stream.StreamInitiateTUSVideoUpload currently allows you create a video stream
for upload using TUS protocol. Due to lack of maxDurationSeconds, the streams
created (for direct_user=true) results in maxDurationSeconds= 14400 which
takes the video billing quota until the video is uploaded. This PR adds supports to
pass additional params MaxDurationSeconds and Expiry in TUSUploadMetadata
to add appropriate functionality to the newly created stream/video.

Closes #1399

Has your change been tested?

Added unit test to verify expiry and maxDurationSeconds metadata values are
properly encoded. Manually tested these by making API calls to cloudflare api using
a test account and verifying these values are correctly set in newly created stream video.

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

@github-actions
Copy link
Contributor

changelog detected ✅

@bbbshah bbbshah marked this pull request as ready for review September 13, 2023 05:42
@bbbshah
Copy link
Contributor Author

bbbshah commented Sep 20, 2023

@jacobbednarz pinging to see if you have a chance to take a loot at this PR. I've also opened this under my personal account (instead of org) and was able to allow maintainer to make edits. Hopefully, this will be easier to review/merge. Thank you in advance!

@itsdax
Copy link

itsdax commented Jan 2, 2024

@jacobbednarz Sorry for the ping. I'm not the author of this PR), but having this feature into the SDK would be a great start to 2024! 🙏

@jacobbednarz
Copy link
Member

closing to due to missing API schemas and timing out. when the service team updates these schemas, they can reopen or send over this PR.

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.

Add maxDurationSeconds and Expiry for TUS Uploads
3 participants