1
0
Fork 0
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:
Daniyar Itegulov 2020-05-28 18:38:13 +10:00
parent 87b9eefc91
commit 2201d693e2
No known key found for this signature in database
GPG key ID: 4DB862B7839037FD

View file

@ -25,14 +25,22 @@ export class BookPlayer {
stop() {
let elem = this._mediaElement;
let tocElement = this._tocElement;
let rendition = this._rendition;
if (elem && rendition) {
rendition.destroy();
elem.remove();
if (elem) {
dialogHelper.close(elem);
this._mediaElement = null;
}
if (tocElement) {
dialogHelper.close(tocElement);
this._tocElement = null;
}
if (rendition) {
rendition.destroy();
}
}
onWindowKeyUp(e) {