Fix RangeError on web client. (#93)

This commit is contained in:
Marcin Kitowicz 2020-05-15 16:17:01 +02:00 committed by GitHub
parent 3dfcef6ef1
commit 1106d66d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class AudioPlayer {
bufferedPosition: Duration(milliseconds: data[4]), bufferedPosition: Duration(milliseconds: data[4]),
speed: _speed, speed: _speed,
duration: _duration, duration: _duration,
icyMetadata: data[5] == null icyMetadata: data.length < 6 || data[5] == null
? null ? null
: IcyMetadata( : IcyMetadata(
info: IcyInfo(title: data[5][0][0], url: data[5][0][1]), info: IcyInfo(title: data[5][0][0], url: data[5][0][1]),