diff --git a/package.json b/package.json index 97055cd78..9dcd6f3af 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "core-js": "^3.6.5", "date-fns": "^2.16.1", "epubjs": "^0.3.85", - "pdfjs-dist": "^2.4.456", + "pdfjs-dist": "2.4.456", "fast-text-encoding": "^1.0.3", "flv.js": "^1.5.0", "headroom.js": "^0.11.0", diff --git a/src/bundle.js b/src/bundle.js index 7ea1cee45..3dcb95442 100644 --- a/src/bundle.js +++ b/src/bundle.js @@ -101,7 +101,7 @@ _define('epubjs', function () { return epubjs; }); -var pdfjs = require('pdfjs-dist/build/pdf'); +const pdfjs = require('pdfjs-dist/build/pdf'); _define('pdfjs', function () { return pdfjs; }); diff --git a/src/plugins/bookPlayer/plugin.js b/src/plugins/bookPlayer/plugin.js index 1634018fa..c56777f37 100644 --- a/src/plugins/bookPlayer/plugin.js +++ b/src/plugins/bookPlayer/plugin.js @@ -22,7 +22,6 @@ export class BookPlayer { this.prevChapter = this.prevChapter.bind(this); this.nextChapter = this.nextChapter.bind(this); this.onWindowKeyUp = this.onWindowKeyUp.bind(this); - this.onTouchStart = this.onTouchStart.bind(this); } play(options) { diff --git a/src/plugins/pdfPlayer/plugin.js b/src/plugins/pdfPlayer/plugin.js index 7516fc4b9..1dcb5212f 100644 --- a/src/plugins/pdfPlayer/plugin.js +++ b/src/plugins/pdfPlayer/plugin.js @@ -1,4 +1,3 @@ -import connectionManager from 'connectionManager'; import loading from 'loading'; import keyboardnavigation from 'keyboardnavigation'; import dialogHelper from 'dialogHelper'; @@ -187,7 +186,7 @@ export class PdfPlayer { }; let serverId = item.ServerId; - let apiClient = connectionManager.getApiClient(serverId); + let apiClient = window.connectionManager.getApiClient(serverId); return new Promise((resolve, reject) => { import('pdfjs').then(({default: pdfjs}) => {