diff options
| author | mehekj <mehek.jethani@gmail.com> | 2022-09-21 23:23:37 -0400 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2022-09-21 23:23:37 -0400 |
| commit | d40a8e4506672f9d0ad505409f4b181d73762c28 (patch) | |
| tree | cf476624ca305a9d7f6d23906eeaa42298c898a5 /src | |
| parent | dc5d5d318ad4ebc99e7c1302057e1b6e132f5017 (diff) | |
fixed video duration in presbox media controls
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 1 | ||||
| -rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 4bcd79641..f7f558bb4 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -405,6 +405,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp } if (Number.isFinite(this.player!.duration)) { this.rawDuration = this.player!.duration; + this.dataDoc[this.fieldKey + '-duration'] = this.rawDuration; } else this.rawDuration = NumCast(this.dataDoc[this.fieldKey + '-duration']); }); diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 40cda4f7e..042c55a46 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -1427,7 +1427,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { const activeItem: Doc = this.activeItem; const targetDoc: Doc = this.targetDoc; const clipStart: number = NumCast(activeItem.clipStart); - const clipEnd: number = NumCast(activeItem.clipEnd); + const clipEnd: number = NumCast(activeItem.clipEnd, NumCast(activeItem.duration)); const mediaStopDocInd: number = NumCast(activeItem.mediaStopDoc); if (activeItem && targetDoc) { return ( |
