Skip to content

Commit 7c8da3d

Browse files
authored
fix(web): Exclude web from rechecking cache (#1993)
# Description Closes #1980 (comment)
1 parent 34538a8 commit 7c8da3d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/audioplayers/lib/src/audio_cache.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ class AudioCache {
132132
// by the system when the storage is almost full
133133
// Android: https://developer.android.com/training/data-storage/app-specific#internal-remove-cache
134134
// iOS: https://developer.apple.com/documentation/foundation/using-the-file-system-effectively#Store-short-lived-files
135-
if (!needsFetch && !fileSystem.file(loadedFiles[fileName]).existsSync()) {
135+
// Web: Uses a data uri, the content is not present on the file system.
136+
if (!kIsWeb &&
137+
!needsFetch &&
138+
!fileSystem.file(loadedFiles[fileName]).existsSync()) {
136139
needsFetch = true;
137140
}
138141

0 commit comments

Comments
 (0)