File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/p2p-media-loader-demo/src/custom-segment-storage-example Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ const DB_VERSION = 1;
48
48
const BYTES_PER_MB = 1048576 ;
49
49
50
50
export class IndexedDbStorage implements SegmentStorage {
51
- private segmentsMemoryStorageLimit = 4000 ; // 4 GB
52
- private currentMemoryStorageSize = 0 ; // current memory storage size in MB
51
+ private segmentsMemoryStorageLimit = 4096 ; // memory storage limit in MiB
52
+ private currentMemoryStorageSize = 0 ; // current memory storage size in MiB
53
53
54
54
private storageConfig ?: CommonCoreConfig ;
55
55
private mainStreamConfig ?: StreamConfig ;
@@ -162,7 +162,6 @@ export class IndexedDbStorage implements SegmentStorage {
162
162
// eslint-disable-next-line no-console
163
163
console . error ( `Failed to store segment ${ segmentId } :` , error ) ;
164
164
throw error ;
165
- // Optionally, implement retry logic or other error recovery mechanisms
166
165
}
167
166
}
168
167
@@ -200,7 +199,7 @@ export class IndexedDbStorage implements SegmentStorage {
200
199
return this . cache . has ( storageId ) ;
201
200
}
202
201
203
- getStoredSegmentIds ( streamId : string ) {
202
+ getStoredSegmentIds ( _swarmId : string , streamId : string ) {
204
203
const storedSegments : number [ ] = [ ] ;
205
204
206
205
for ( const segment of this . cache . values ( ) ) {
You can’t perform that action at this time.
0 commit comments