mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 06:29:43 +00:00
LibWeb: Use Duration::to_seconds_f64 to set HTMLMediaElement duration
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
5207de9a2d
commit
261cd5846f
Notes:
github-actions[bot]
2025-09-17 21:46:58 +00:00
Author: https://github.com/Zaggy1024
Commit: 261cd5846f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6178
1 changed files with 2 additions and 2 deletions
|
@ -1227,7 +1227,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::process_media_data(Function<void(Str
|
|||
// named resize at the media element.
|
||||
if (video_track && is<HTMLVideoElement>(*this)) {
|
||||
auto duration = video_track ? video_track->duration() : audio_track->duration();
|
||||
set_duration(static_cast<double>(duration.to_milliseconds()) / 1000.0);
|
||||
set_duration(duration.to_seconds_f64());
|
||||
|
||||
auto& video_element = as<HTMLVideoElement>(*this);
|
||||
video_element.set_video_width(video_track->pixel_width());
|
||||
|
@ -1238,7 +1238,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::process_media_data(Function<void(Str
|
|||
});
|
||||
} else {
|
||||
auto duration = audio_track ? audio_track->duration() : video_track->duration();
|
||||
set_duration(static_cast<double>(duration.to_milliseconds()) / 1000.0);
|
||||
set_duration(duration.to_seconds_f64());
|
||||
}
|
||||
|
||||
// 6. Set the readyState attribute to HAVE_METADATA.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue