-
Notifications
You must be signed in to change notification settings - Fork 116
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
Conversation
4e9fd42
to
a10ca1e
Compare
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.
Looks good!
21e0161
to
d583bde
Compare
d583bde
to
68e782c
Compare
68e782c
to
7fbc221
Compare
this.cache.set(MEDIA_SPEED_CACHE_KEY, '1.0'); | ||
} | ||
|
||
this.controls = new MediaControlsRoot({ containerEl: this.containerEl }); |
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 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) { |
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.
Is this guard clause necessary? There's another one inside renderUI
.
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.
It's not strictly necessary since renderUI
is a noop otherwise. I can remove it.
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.
It's ok. I just find it's not consistent with line 553: https://github.com/box/box-content-preview/pull/1302/files#diff-242d253d5790db64a7f3a5f5a65fe30ee9045543c45bd03b46c77271058002d0R553. It doesn't have the guard clause.
Closing this for now. |
Todo