ExoPlayer
ExoPlayer copied to clipboard
Duration Calculation (problem of truncating floating point value)
=====SAMPLE M3U8=====
EXTM3U
EXT-X-TARGETDURATION:12
EXT-X-VERSION:3
EXT-X-MEDIA-SEQUENCE:0
EXT-X-PLAYLIST-TYPE:VOD
EXTINF:11.999988889,
bodhi_apps_elp_level_1_unit_1_1_0.ts
EXTINF:12.000000000,
bodhi_apps_elp_level_1_unit_1_1_1.ts
EXTINF:12.000000000,
bodhi_apps_elp_level_1_unit_1_1_2.ts
EXTINF:12.000000000,
bodhi_apps_elp_level_1_unit_1_1_3.ts
EXTINF:12.000000000,
bodhi_apps_elp_level_1_unit_1_1_4.ts
EXTINF:12.000011111,
bodhi_apps_elp_level_1_unit_1_1_5.ts
EXTINF:3.970000000,
bodhi_apps_elp_level_1_unit_1_1_6.ts
EXT-X-ENDLIST
From the above sample, the actual duration should be 75/76 second, but the player shows 74 second only. Which if the video is play to the end, it will shows 1:15, but the total duration is 1:14 incorrectly.