Skip to content

Commit 6e2c3e0

Browse files
ignore fullscreen mode when no valid src was loaded
1 parent 51b7914 commit 6e2c3e0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

videojs.wavesurfer.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,21 @@
354354
newHeight = window.outerHeight;
355355
}
356356

357-
// destroy old drawing
358-
this.surfer.drawer.destroy();
357+
if (this.waveReady)
358+
{
359+
// destroy old drawing
360+
this.surfer.drawer.destroy();
359361

360-
// set new height
361-
this.surfer.params.height = newHeight - this.player().controlBar.height();
362-
this.surfer.createDrawer();
362+
// set new height
363+
this.surfer.params.height = newHeight - this.player().controlBar.height();
364+
this.surfer.createDrawer();
363365

364-
// redraw
365-
this.surfer.drawBuffer();
366+
// redraw
367+
this.surfer.drawBuffer();
366368

367-
// make sure playhead is restored at right position
368-
this.surfer.drawer.progress(this.surfer.backend.getPlayedPercents());
369+
// make sure playhead is restored at right position
370+
this.surfer.drawer.progress(this.surfer.backend.getPlayedPercents());
371+
}
369372
},
370373

371374
/**

0 commit comments

Comments
 (0)