Skip to content

Commit

Permalink
Style fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Oct 31, 2023
1 parent f6cfcc6 commit 62ccfee
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/player/AtomVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,10 @@ export default class AtomVideoPlayer extends AtomControl {
this.updateVolume();
this.currentTimeSpan.textContent = durationText(0, this.duration);
this.updateProgress();
const { videoWidth, videoHeight } = this.video;
if (videoHeight > videoWidth || this.element.offsetHeight > this.element.offsetWidth) {
this.maxWidth = "100%";
} else {
this.maxWidth = (1 - (this.video.offsetWidth - this.video.videoWidth) / this.video.offsetWidth)*100 + "%";
}
// const { video } = this;
// const { videoWidth, videoHeight } = video;
// const eW = video.offsetWidth * videoHeight / videoWidth;

AtomBinder.refreshValue(this, "duration");
}}
event-pause={() => this.state = "paused"}
Expand Down

0 comments on commit 62ccfee

Please sign in to comment.