Voice notes drafts
This commit is contained in:
parent
356fb301e1
commit
99015d7b96
48 changed files with 2113 additions and 909 deletions
|
@ -92,8 +92,12 @@ class GlobalMessageAudio {
|
|||
return this.#url;
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return this.#audio.duration;
|
||||
get duration(): number | undefined {
|
||||
// the underlying Audio element can return NaN if the audio hasn't loaded
|
||||
// we filter out 0 or NaN as they are not useful values downstream
|
||||
return Number.isNaN(this.#audio.duration) || this.#audio.duration === 0
|
||||
? undefined
|
||||
: this.#audio.duration;
|
||||
}
|
||||
|
||||
get currentTime() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue