Skip to content

Commit

Permalink
fix(preview): remove auto-preview experience
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingze Xiao committed Sep 10, 2019
1 parent 7c6a491 commit b35b80d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/lib/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,6 @@ class Preview extends EventEmitter {
this.ui.finishProgressBar();
break;
case VIEWER_EVENT.mediaEndAutoplay:
this.navigateRight();
break;
case VIEWER_EVENT.error:
// Do nothing since 'error' event was already caught, and will be emitted
Expand Down
4 changes: 2 additions & 2 deletions src/lib/__tests__/Preview-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1789,12 +1789,12 @@ describe('lib/Preview', () => {
expect(preview.ui.finishProgressBar).to.be.called;
});

it('should navigate right on mediaendautoplay event', () => {
it('should not navigate right on mediaendautoplay event', () => {
sandbox.stub(preview, 'navigateRight');
const data = { event: VIEWER_EVENT.mediaEndAutoplay };

preview.handleViewerEvents(data);
expect(preview.navigateRight).to.be.called;
expect(preview.navigateRight).to.not.be.called;
});

it('should emit viewerevent when event does not match', () => {
Expand Down

0 comments on commit b35b80d

Please sign in to comment.