Audio Element Duration Nan
If no audio video is set nan not a number is returned.
Audio element duration nan. If no media data is available the value nan is returned. The problem is that if nan is passed to player duration as an argument we set the duration to 0. The numbers in the table specify the first browser version that fully supports the property. If the element s media doesn t have a known duration such as for live media streams.
In the example above opera 18 and chrome returns 1 515102. This property is read only. If approved this will require a sister pr in the 5 x branch as well. Syntax myduration htmlmediaelement duration value.
If player cache duration was set to nan by other means player duration would still return 0. Html5 audio player duration showing nan 1 i just started to learn html5 and was going through html5 audio player using jquery. I coded a player with playlist everything works fine except the duration with help of which my input range slider doesn t works. The duration property returns the length of the current audio video in seconds.
When i debugged i found that my duration is showing me nan. Description player duration currently returns 0 if the duration is not known when it should return nan. A double precision floating point value indicating the duration of the media in seconds. Internet explorer returns 1 5491875.
1 duration property of audio object i m using evaluates always to nan though console dir lists among the properties the correct value for duration. Different browsers return different values. 2 when i play an audio file with loop option enabled there s a silence delay inserted between the end of the previous execution and the beginning of the next execution.