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

feat(controls): Add react version of mp3 controls behind option #1302

Merged
merged 2 commits into from
Feb 4, 2021

Conversation

jstoffan
Copy link
Collaborator

@jstoffan jstoffan commented Dec 3, 2020

Todo

  • Break up into smaller PRs
  • Cross-browser testing
  • Unit tests

Copy link
Contributor

@ConradJChan ConradJChan left a comment

Choose a reason for hiding this comment

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

Looks good!

src/lib/viewers/controls/media/DurationLabels.tsx Outdated Show resolved Hide resolved
src/lib/viewers/controls/hooks/useAttention.ts Outdated Show resolved Hide resolved
src/lib/viewers/controls/media/VolumeControls.tsx Outdated Show resolved Hide resolved
src/lib/viewers/controls/media/VolumeControls.tsx Outdated Show resolved Hide resolved
src/lib/viewers/controls/media/VolumeControls.tsx Outdated Show resolved Hide resolved
@jstoffan jstoffan force-pushed the react-ui-mp3 branch 2 times, most recently from 21e0161 to d583bde Compare December 9, 2020 01:34
@jstoffan jstoffan marked this pull request as ready for review January 12, 2021 19:38
@jstoffan jstoffan requested a review from a team as a code owner January 12, 2021 19:38
@jstoffan jstoffan changed the title feat(controls): Add react versions of mp3 controls feat(controls): Add react version of mp3 controls behind option Jan 12, 2021
this.cache.set(MEDIA_SPEED_CACHE_KEY, '1.0');
}

this.controls = new MediaControlsRoot({ containerEl: this.containerEl });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will likely end up renamed/moved to the MP3Viewer once the video controls are introduced, since the latter has auto-hide/show behavior similar to the document viewers.

@@ -403,6 +409,10 @@ class MediaBaseViewer extends BaseViewer {
this.debouncedEmit('volume', volume);
this.mediaEl.volume = volume;
}

if (this.controls) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this guard clause necessary? There's another one inside renderUI.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not strictly necessary since renderUI is a noop otherwise. I can remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

src/lib/viewers/media/MediaBaseViewer.js Show resolved Hide resolved
@jstoffan
Copy link
Collaborator Author

Closing this for now.

@jstoffan jstoffan closed this Jan 27, 2021
@mxiao6 mxiao6 reopened this Feb 4, 2021
@mergify mergify bot merged commit e437b13 into box:master Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants