mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Render audio controls
This commit is contained in:
parent
428d3b896c
commit
618f528344
2 changed files with 10 additions and 3 deletions
|
@ -15,6 +15,8 @@ button {
|
||||||
.root {
|
.root {
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
min-height: 40px;
|
||||||
|
min-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
|
|
|
@ -212,9 +212,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
render(from = this.state) {
|
render(from = this.state) {
|
||||||
// XXX This should use clientHeight/clientWidth
|
const isAudioOnly = this.media.localName == "audio";
|
||||||
this.root.style.height = this.media.videoHeight;
|
if (!isAudioOnly) {
|
||||||
this.root.style.width = this.media.videoWidth;
|
// XXX This should ideally use clientHeight/clientWidth,
|
||||||
|
// but for some reason I couldn't figure out yet,
|
||||||
|
// using it breaks layout.
|
||||||
|
this.root.style.height = this.media.videoHeight;
|
||||||
|
this.root.style.width = this.media.videoWidth;
|
||||||
|
}
|
||||||
|
|
||||||
// Error
|
// Error
|
||||||
if (this.state == ERRORED) {
|
if (this.state == ERRORED) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue