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

Media Recording: Add Pause/Resume Support #12000

Merged
merged 1 commit into from
Jul 28, 2022
Merged

Conversation

swissspidy
Copy link
Collaborator

@swissspidy swissspidy commented Jul 25, 2022

Context

Summary

This PR adds a new Stop/Resume button to video recording.

Relevant Technical Choices

To-do

  • Telemetry for new button

User-facing changes

Demo (ignore the blank stream, I didn't connect my virtual camera)

Screen.Recording.2022-07-25.at.15.44.24.mov

Testing Instructions

  • This is a non-user-facing change and requires no QA

This PR can be tested by following these steps:

  1. Enter media recording mode
  2. Start video recording
  3. Verify that the recording can be paused and resumed using the buttons; with the duration/timer not increasing during pause
  4. When stopping the recording, verify that the final video matches expected output with all the pauses in it.

Reviews

Does this PR have a security-related impact?

No

Does this PR change what data or activity we track or use?

No

Does this PR have a legal-related impact?

No

Checklist

  • This PR addresses an existing issue and I have linked this PR to it in ZenHub
  • I have tested this code to the best of my abilities
  • I have verified accessibility to the best of my abilities (docs)
  • I have verified i18n and l10n (translation, right-to-left layout) to the best of my abilities
  • This code is covered by automated tests (unit, integration, and/or e2e) to verify it works as intended (docs)
  • I have added documentation where necessary
  • I have added a matching Type: XYZ label to the PR

Fixes #11923

@swissspidy swissspidy added Type: Enhancement New feature or improvement of an existing feature Group: Media labels Jul 25, 2022
@swissspidy swissspidy marked this pull request as ready for review July 27, 2022 14:37
@googleforcreators-bot
Copy link
Collaborator

Plugin builds for 43e2282 are ready 🛎️!

Copy link
Contributor

@timarney timarney left a comment

Choose a reason for hiding this comment

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

Works great :)

@@ -53,7 +53,7 @@ const Wrapper = styled(Text).attrs({
function DurationIndicator() {
const { duration, isRecording } = useMediaRecording(({ state }) => ({
duration: state.duration,
isRecording: state.status === 'recording',
isRecording: ['recording', 'paused'].includes(state.status),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Would be nice to have the statuses in a constant since these are used in multiple places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah true. Using TypeScript would be nice here

@swissspidy swissspidy merged commit 4805bc3 into main Jul 28, 2022
@swissspidy swissspidy deleted the add/11923-pause-recording branch July 28, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Media Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Media Recording: Allow functionality to pause recording
4 participants