mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3350 from MinecraftPlaye/bookplayer-update
Update the resume button after stopping
This commit is contained in:
commit
c2411ab4b5
1 changed files with 16 additions and 5 deletions
|
@ -44,6 +44,12 @@ export class BookPlayer {
|
|||
stop() {
|
||||
this.unbindEvents();
|
||||
|
||||
const stopInfo = {
|
||||
src: this.item
|
||||
};
|
||||
|
||||
Events.trigger(this, 'stopped', [stopInfo]);
|
||||
|
||||
const elem = this.mediaElement;
|
||||
const tocElement = this.tocElement;
|
||||
const rendition = this.rendition;
|
||||
|
@ -67,6 +73,10 @@ export class BookPlayer {
|
|||
this.cancellationToken = true;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
// Nothing to do here
|
||||
}
|
||||
|
||||
currentItem() {
|
||||
return this.item;
|
||||
}
|
||||
|
@ -250,6 +260,7 @@ export class BookPlayer {
|
|||
this.streamInfo = {
|
||||
started: true,
|
||||
ended: false,
|
||||
item: this.item,
|
||||
mediaSource: {
|
||||
Id: item.Id
|
||||
}
|
||||
|
@ -301,7 +312,7 @@ export class BookPlayer {
|
|||
epubElem.style.display = 'block';
|
||||
rendition.on('relocated', (locations) => {
|
||||
this.progress = book.locations.percentageFromCfi(locations.start.cfi);
|
||||
Events.trigger(this, 'timeupdate');
|
||||
Events.trigger(this, 'pause');
|
||||
});
|
||||
|
||||
loading.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue