javascript - Loading <audio> source - Firefox gets into readyState 2 and Chrome into 4 -
i trying connect htmlaudioelement
web audio api (mediaelementaudiosourcenode
). set src
followed calling load()
.
now while in chromium gets me readystate
0
(have_nothing
) 4
(have_enough_data
), follow-up play()
succeeds. in firefox state 2
(have_current_data
) , nothing else happens.
am missing crucial step?
edit: here debug information:
| | ff init | ff load | ch init | ch load | |readystate | 0 | 2 | 0 | 4 | |preload | | | auto | auto | |duration | nan | 186.45 | nan | 186.44 | |error | null | null | null | null | |networkstate | 0 | 1 | 0 | 1 |
at least list, difference in initial data preload
value in chrome.
so adding preload = "auto"
after creating media element (to match default has in chromium) makes work in firefox, too.
Comments
Post a Comment