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