Queue doesnot trigger 'ready' when small asset reaches 'end';
Opened this issue · 1 comments
em-yuanbo commented
There is a small mp3 file only 8K size, and i failed to play it using AV.Player
I find that the asset triggers 'end' at last, but the queue does not trigger 'ready' because asset is too small to match the readyMark 64, so the player doesnot startPlaying at all;
I think the queue should trigger a 'ready' when it gets a 'end' from asset;
Sorry for my bad english.
redexp commented
same for me, I have au file 122kB (15 seconds long) and end
event of asset tirggered after last Queue::write
method call and that's why ready
event never calls. I think adding @write()
call to end
listener should not break anything and should fix our issue.
class Queue extends EventEmitter
constructor: (@asset) ->
#...
@asset.on 'data', @write
@asset.on 'end', =>
@ended = true
@write()