sodes-audio-example icon indicating copy to clipboard operation
sodes-audio-example copied to clipboard

byterangesupported.

Open mvaerum opened this issue 7 years ago • 4 comments

Hi @jaredsinclair Thank you very much for this example as well as your blogpost. It has been very helpful for me to implement a delegate similar to the one from your sodes example. However, i do have a problem: The data request ALWAYS ask for the entire length of the file. Even if the file is several gigabytes long (e.g. 2gb) , and I return that length in then content info request (as well as setting isByteRangeSupported=true). The subsequent call to a data request will be from 0 to 2gb, and if I seek with avplayer then data request will be e.g. 1mb to 2gb that is always to the end of the file. The requestsAllDataToEndOfResource property of dataRequest is always true. Do you have any idea what I could be doing wrong? I doesn't seem right that I should implement buffering in the delegate... Cheers, Morten

mvaerum avatar Sep 06 '17 10:09 mvaerum

@mvaerum I'm having the same issue and found your post here. Did you happen to find out the reason for this issue?

keepsimple1 avatar Feb 14 '20 19:02 keepsimple1

@mvaerum Make sure you're also implementing the cancelling of requests. In my experience with MP3s, it always asks for the full file first, then almost immediately cancels that request and instead asks for chunks of the file. Your mileage may vary. One thing I haven't tried but which might be interesting is to supply only a portion of the requested data and then prematurely call the "done" method (the exact method escapes me) to report that you're done supplying data. I'm curious how AVFoundation would react to that.

jaredsinclair avatar Feb 14 '20 23:02 jaredsinclair

Could you guys please send some working blogpost for this.

rahulgoelsharechat avatar Dec 02 '22 13:12 rahulgoelsharechat

Did you guys finally solved this? I'm facing the same issue

arkonxu avatar Feb 14 '24 11:02 arkonxu