1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix minor issues with book players

This commit is contained in:
dkanada 2020-10-21 16:00:33 +09:00
parent 6b302ed20b
commit 3f55a79d74
4 changed files with 3 additions and 5 deletions

View file

@ -62,7 +62,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"date-fns": "^2.16.1", "date-fns": "^2.16.1",
"epubjs": "^0.3.85", "epubjs": "^0.3.85",
"pdfjs-dist": "^2.4.456", "pdfjs-dist": "2.4.456",
"fast-text-encoding": "^1.0.3", "fast-text-encoding": "^1.0.3",
"flv.js": "^1.5.0", "flv.js": "^1.5.0",
"headroom.js": "^0.11.0", "headroom.js": "^0.11.0",

View file

@ -101,7 +101,7 @@ _define('epubjs', function () {
return epubjs; return epubjs;
}); });
var pdfjs = require('pdfjs-dist/build/pdf'); const pdfjs = require('pdfjs-dist/build/pdf');
_define('pdfjs', function () { _define('pdfjs', function () {
return pdfjs; return pdfjs;
}); });

View file

@ -22,7 +22,6 @@ export class BookPlayer {
this.prevChapter = this.prevChapter.bind(this); this.prevChapter = this.prevChapter.bind(this);
this.nextChapter = this.nextChapter.bind(this); this.nextChapter = this.nextChapter.bind(this);
this.onWindowKeyUp = this.onWindowKeyUp.bind(this); this.onWindowKeyUp = this.onWindowKeyUp.bind(this);
this.onTouchStart = this.onTouchStart.bind(this);
} }
play(options) { play(options) {

View file

@ -1,4 +1,3 @@
import connectionManager from 'connectionManager';
import loading from 'loading'; import loading from 'loading';
import keyboardnavigation from 'keyboardnavigation'; import keyboardnavigation from 'keyboardnavigation';
import dialogHelper from 'dialogHelper'; import dialogHelper from 'dialogHelper';
@ -187,7 +186,7 @@ export class PdfPlayer {
}; };
let serverId = item.ServerId; let serverId = item.ServerId;
let apiClient = connectionManager.getApiClient(serverId); let apiClient = window.connectionManager.getApiClient(serverId);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
import('pdfjs').then(({default: pdfjs}) => { import('pdfjs').then(({default: pdfjs}) => {