streaming edits
This commit is contained in:
parent
0a7af1d813
commit
db33f0764b
3 changed files with 62 additions and 15 deletions
|
|
@ -549,9 +549,15 @@ final playbackProvider =
|
|||
if (local != null) return Uri.file(local);
|
||||
final client = ref.read(subsonicClientProvider);
|
||||
if (client == null) return null;
|
||||
final rate = ref.read(settingsProvider).streamMaxBitRate;
|
||||
// When transcoding, ask the server to advertise a Content-Length so the
|
||||
// native player can derive a duration and hold position (otherwise the
|
||||
// playhead freezes at 0:00 and the track restarts). Harmless to omit for
|
||||
// original streams, which already carry a real length.
|
||||
return client.streamUri(
|
||||
s.id,
|
||||
maxBitRate: ref.read(settingsProvider).streamMaxBitRate,
|
||||
maxBitRate: rate,
|
||||
estimateContentLength: rate > 0,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue