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

Destruction of Require

This commit is contained in:
Cameron 2020-07-21 13:25:50 +01:00
parent 276f4ccb3a
commit 3a23b6e36c
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%'});