@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 CHANGED
@@ -20,3 +20,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
22
 
23
+
package/README.md CHANGED
@@ -280,3 +280,4 @@ MIT
280
280
 
281
281
  Ümit UZ <umit@umituz.com>
282
282
 
283
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-sound",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Universal sound playback and caching library for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -76,3 +76,4 @@ export interface SoundCacheInfo {
76
76
  cacheSize?: number;
77
77
  }
78
78
 
79
+
@@ -17,3 +17,4 @@ export interface IStorageService {
17
17
  getDownloadUrl(storagePath: string): Promise<string>;
18
18
  }
19
19
 
20
+
package/src/index.ts CHANGED
@@ -71,3 +71,4 @@ export {
71
71
 
72
72
  export type { UseSoundCacheResult } from './presentation/hooks/useSoundCache';
73
73
 
74
+
@@ -103,3 +103,4 @@ export class AudioPlaybackService {
103
103
  // Export singleton instance
104
104
  export const audioPlaybackService = new AudioPlaybackService();
105
105
 
106
+
@@ -144,3 +144,4 @@ export class SoundCacheService {
144
144
  // Export singleton instance
145
145
  export const soundCacheService = new SoundCacheService();
146
146
 
147
+
@@ -95,3 +95,4 @@ export class SoundSourceResolver {
95
95
  }
96
96
  }
97
97
 
98
+
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: refreshCacheSize,
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