Skip to content

Commit

Permalink
fix(preview): remove auto-preview experience (#1069)
Browse files Browse the repository at this point in the history
* fix(preview): remove auto-preview experience

* fix(preview): remove mediaEndAutoplay condition and test
  • Loading branch information
Mingze authored and mergify[bot] committed Sep 10, 2019
1 parent 7c6a491 commit ffb5854
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions src/lib/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,9 +1238,6 @@ class Preview extends EventEmitter {
case VIEWER_EVENT.progressEnd:
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
// as a 'preview_error' event
Expand Down
8 changes: 0 additions & 8 deletions src/lib/__tests__/Preview-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1789,14 +1789,6 @@ describe('lib/Preview', () => {
expect(preview.ui.finishProgressBar).to.be.called;
});

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

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

it('should emit viewerevent when event does not match', () => {
sandbox.stub(preview, 'emit');
const data = {
Expand Down

0 comments on commit ffb5854

Please sign in to comment.