Closed jessuni closed 4 years ago
The TLEN
tag is a string (like all tags that start with T
) so the library is really just reading whatever characters are in there, there is no special processing done after. I guess however (NASA it seems?) wrote that tag rounded it down to seconds.
Scenario: include a script with source:
https://cdnjs.cloudflare.com/ajax/libs/jsmediatags/3.9.3/jsmediatags.min.js
, and trying to read the duration of an audioProblem: the audio duration read from
TLEN.data
is not the same asHTMLMediaElement
API'saudio.duration
Version:
v3.9.3
Reproduction:
jsmediatags
from CDNjsmediatags.read
read with the source:https://github.com/jessuni/shikwasa/blob/next/dist/assets/STS-133_FD11_Mission_Status_Briefing.mp3
(due to CORS, you can download it to reproduce)TLEN.data
would be666000
HTMLMediaElement
:console.log(audio.duration) // 666.592878, which is closed to 666593ms // does not equals to
TLEN.data
!