Skip to content

Commit

Permalink
Merge pull request #21 from irohalab/fix-kf-preview-2
Browse files Browse the repository at this point in the history
fix keyframe preview for video without preview image
  • Loading branch information
EverettSummer authored Oct 27, 2023
2 parents c812772 + b720bba commit f961d8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mira-ui",
"version": "2.5.1",
"version": "2.5.2",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ export class VideoPlayerScrubBar implements AfterViewInit, OnInit, OnDestroy {

ngOnInit(): void {
const videoFile= this._videoPlayer.videoFile;
this.previewKeyframeWidth = videoFile.kf_frame_width;
this.previewKeyframeHeight = videoFile.kf_frame_height;
this.previewBgImageUrl = videoFile.kf_image_path_list[0];
if (Array.isArray(videoFile.kf_image_path_list) && videoFile.kf_image_path_list.length > 0) {
this.previewKeyframeWidth = videoFile.kf_frame_width;
this.previewKeyframeHeight = videoFile.kf_frame_height;
this.previewBgImageUrl = videoFile.kf_image_path_list[0];
}
this._subscription.add(
this._videoPlayer.currentTime.subscribe(time => this.currentTime = time)
);
Expand Down

0 comments on commit f961d8e

Please sign in to comment.