@@ -22,7 +22,7 @@ export class TrimPlayer {
22
22
23
23
// Absolute UTC state (no offsets)
24
24
this . #state = { } ;
25
- this . #state. gap = opts . gap ?? 10_000 ;
25
+ this . #state. gap = opts . gap ?? 60_000 ;
26
26
this . #state. speedUp = 20 ;
27
27
this . #state. start = opts . start ?? Date . now ( ) ;
28
28
this . #state. end = Math . max ( opts . end ?? 0 , this . #state. start + this . #state. gap ) ;
@@ -55,8 +55,8 @@ export class TrimPlayer {
55
55
}
56
56
57
57
setTrim ( range ) {
58
- const s = Math . max ( this . #state. start , range [ 0 ] ) ;
59
- const e = Math . min ( this . #state. end , range [ 1 ] ) ;
58
+ const s = this . #clampUtc ( range [ 0 ] , this . #state. start , this . #state . end ) ;
59
+ const e = this . #clampUtc ( range [ 1 ] , this . #state. start , this . #state . end ) ;
60
60
this . #state. trimStart = Math . min ( s , e - this . #state. gap ) ;
61
61
this . #state. trimEnd = Math . max ( e , s + this . #state. gap ) ;
62
62
this . #state. current = this . #clampUtc( this . #state. current , this . #state. trimStart , this . #state. trimEnd ) ;
@@ -292,7 +292,7 @@ export class TrimPlayer {
292
292
293
293
#utcLabel( utcMs ) {
294
294
const d = new Date ( utcMs ) ;
295
- return d . toISOString ( ) . replace ( 'T' , ' ' ) . slice ( 0 , 19 ) ;
295
+ return d . toISOString ( ) . replace ( 'T' , ' ' ) . slice ( 0 , 23 ) ;
296
296
}
297
297
298
298
#positionFloatingLabel( anchorEl = null ) {
0 commit comments