video: restore thumb anim
parent
d1aad8e787
commit
d5309942ac
|
@ -214,6 +214,12 @@ class VideoContentSetup {
|
|||
content.videojs.play();
|
||||
}, 500);
|
||||
|
||||
let canPlay = false;
|
||||
content.videojs.on("canplay", () => {
|
||||
canPlay = true;
|
||||
this.updateRotation(content);
|
||||
});
|
||||
|
||||
// Get correct orientation
|
||||
axios
|
||||
.get<any>(
|
||||
|
@ -223,7 +229,10 @@ class VideoContentSetup {
|
|||
)
|
||||
.then((response) => {
|
||||
content.data.exif = response.data?.exif;
|
||||
this.updateRotation(content);
|
||||
|
||||
// Update only after video is ready
|
||||
// Otherwise the poster image is rotated
|
||||
if (canPlay) this.updateRotation(content);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -469,8 +469,7 @@ export default class Viewer extends Mixins(GlobalMixin) {
|
|||
// Get the thumbnail image
|
||||
this.photoswipe.addFilter("thumbEl", (thumbEl, data, index) => {
|
||||
const photo = this.list[index - this.globalAnchor];
|
||||
if (!photo || !photo.w || !photo.h || photo.flag & this.c.FLAG_IS_VIDEO)
|
||||
return thumbEl;
|
||||
if (!photo || !photo.w || !photo.h) return thumbEl;
|
||||
return this.thumbElem(photo) || thumbEl;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue