diff --git a/package.json b/package.json index ee4874a..22f1b09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mira-ui", - "version": "2.5.1", + "version": "2.5.2", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/src/app/video-player/controls/scrub-bar/scrub-bar.component.ts b/src/app/video-player/controls/scrub-bar/scrub-bar.component.ts index e564540..5c16d08 100644 --- a/src/app/video-player/controls/scrub-bar/scrub-bar.component.ts +++ b/src/app/video-player/controls/scrub-bar/scrub-bar.component.ts @@ -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) );