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

Merge pull request #1616 from Camc314/migrate-to-ES6-27

Removal of Require
This commit is contained in:
dkanada 2020-07-22 23:37:06 +09:00 committed by GitHub
commit e3b1a4017a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 27 additions and 24 deletions

View file

@ -220,7 +220,7 @@ export class BookPlayer {
let apiClient = connectionManager.getApiClient(serverId);
return new Promise((resolve, reject) => {
require(['epubjs'], (epubjs) => {
import('epubjs').then(({default: epubjs}) => {
let downloadHref = apiClient.getItemDownloadUrl(item.Id);
let book = epubjs.default(downloadHref, {openAs: 'epub'});
let rendition = book.renderTo(elem, {width: '100%', height: '97%'});