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): Audio tracks menu for Dash viewer #1391

Merged
merged 4 commits into from
May 27, 2021

Conversation

ConradJChan
Copy link
Contributor

@ConradJChan ConradJChan commented May 26, 2021

TODO:

  • unit tests

Screen Shot 2021-05-26 at 1 56 37 PM
Screen Shot 2021-05-26 at 1 56 48 PM

@ConradJChan ConradJChan requested a review from a team as a code owner May 26, 2021 20:58
src/lib/viewers/controls/media/MediaSettings.tsx Outdated Show resolved Hide resolved
src/lib/viewers/media/DashControls.tsx Outdated Show resolved Hide resolved
src/lib/viewers/media/DashViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/media/DashViewer.js Outdated Show resolved Hide resolved
jstoffan
jstoffan previously approved these changes May 26, 2021
src/lib/viewers/media/__tests__/DashControls-test.tsx Outdated Show resolved Hide resolved
onAutoplayChange,
onRateChange,
rate,
}: Props): JSX.Element {
const autoValue = autoplay ? __('media_autoplay_enabled') : __('media_autoplay_disabled');
const rateValue = rate === '1.0' || !rate ? __('media_speed_normal') : rate;
const labelledAudioTracks = React.useMemo(() => addLabels(audioTracks), [audioTracks]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like this could probably be simplified, but we can go with it for now. We may need to revisit as we add more menus for Dash, since this component will probably get large quickly.

@ConradJChan ConradJChan merged commit 688aa03 into box:master May 27, 2021
@ConradJChan ConradJChan deleted the dash-controls-audio branch May 27, 2021 17:41
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.

2 participants