@umituz/react-native-sound 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/domain/entities/Sound.entity.ts +1 -0
- package/src/domain/repositories/IStorageService.ts +1 -0
- package/src/index.ts +1 -0
- package/src/infrastructure/services/AudioPlaybackService.ts +1 -0
- package/src/infrastructure/services/SoundCacheService.ts +1 -0
- package/src/infrastructure/services/SoundSourceResolver.ts +1 -0
- package/src/infrastructure/storage/SoundPlaybackStore.ts +0 -0
- package/src/presentation/hooks/useSoundCache.ts +6 -1
- package/src/presentation/hooks/useSoundPlayback.ts +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
File without changes
|
|
@@ -58,6 +58,10 @@ export function useSoundCache(): UseSoundCacheResult {
|
|
|
58
58
|
}
|
|
59
59
|
}, []);
|
|
60
60
|
|
|
61
|
+
const getCacheSize = useCallback(async (): Promise<number> => {
|
|
62
|
+
return soundCacheService.getCacheSize();
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
61
65
|
const isCached = useCallback(
|
|
62
66
|
async (sound: Sound): Promise<boolean> => {
|
|
63
67
|
if (!sound.filename) {
|
|
@@ -99,7 +103,7 @@ export function useSoundCache(): UseSoundCacheResult {
|
|
|
99
103
|
isCached,
|
|
100
104
|
getCachedUri,
|
|
101
105
|
clearCache,
|
|
102
|
-
getCacheSize
|
|
106
|
+
getCacheSize,
|
|
103
107
|
deleteCachedSound,
|
|
104
108
|
cacheSize,
|
|
105
109
|
isLoadingCacheSize,
|
|
@@ -107,3 +111,4 @@ export function useSoundCache(): UseSoundCacheResult {
|
|
|
107
111
|
};
|
|
108
112
|
}
|
|
109
113
|
|
|
114
|
+
|
|
File without changes
|