mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make book player plugin exit gracefully
This commit is contained in:
parent
87b9eefc91
commit
2201d693e2
1 changed files with 12 additions and 4 deletions
|
@ -25,14 +25,22 @@ export class BookPlayer {
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
let elem = this._mediaElement;
|
let elem = this._mediaElement;
|
||||||
|
let tocElement = this._tocElement;
|
||||||
let rendition = this._rendition;
|
let rendition = this._rendition;
|
||||||
|
|
||||||
if (elem && rendition) {
|
if (elem) {
|
||||||
rendition.destroy();
|
dialogHelper.close(elem);
|
||||||
|
|
||||||
elem.remove();
|
|
||||||
this._mediaElement = null;
|
this._mediaElement = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tocElement) {
|
||||||
|
dialogHelper.close(tocElement);
|
||||||
|
this._tocElement = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rendition) {
|
||||||
|
rendition.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onWindowKeyUp(e) {
|
onWindowKeyUp(e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue