straw/strawApp
Kayos 7d2cf5d9bc IosSafeHttpDataSource: use buildUpon().setPosition/setLength (not subrange)
The previous code called dataSpec.subrange(dataSpec.position, length) which
*adds* the offset to the existing position rather than setting an absolute
bounded slice — that turned every first open() into Range request
`bytes=(2*N)-(2*N+chunk-1)`, doubling the offset and still 403'ing
for the wrong reason.

DataSpec.subrange(offset, length) docs: "position of the new DataSpec
will be position + offset". So subrange(0, L) gives a bounded slice at
the current position. We want absolute control, so use
buildUpon().setPosition(N).setLength(L).build() — explicit, unambiguous.

Caught on vc=17 emulator smoke: ExoPlayer logged InvalidResponseCodeException
403 at IosSafeHttpDataSource.kt:58 (the inner.open(bounded) call), meaning
the bounded shape was wrong. Player.Listener.onPlayerError DID fire and
surface the error in the UI — so that part of the patch works.
2026-05-24 14:10:39 -07:00
..
src/main IosSafeHttpDataSource: use buildUpon().setPosition/setLength (not subrange) 2026-05-24 14:10:39 -07:00
build.gradle.kts Path C-6: rip NewPipeExtractor 2026-05-24 13:29:19 -07:00