Fix jumping by playing round video
This commit is contained in:
parent
0518d57cc5
commit
bbcb81749d
@ -1574,7 +1574,8 @@ export default class ChatBubbles {
|
||||
// return rect.height;
|
||||
|
||||
let height = windowSize.windowH;
|
||||
height -= this.chat.topbar.container.getBoundingClientRect().height;
|
||||
// height -= this.chat.topbar.container.getBoundingClientRect().height;
|
||||
height -= this.bubblesContainer.offsetTop;
|
||||
height -= mediaSizes.isMobile || windowSize.windowH < 570 ? 58 : 78;
|
||||
return height;
|
||||
|
||||
|
@ -164,6 +164,8 @@ export function wrapVideo({doc, container, message, boxWidth, boxHeight, withTai
|
||||
video.remove();
|
||||
} */
|
||||
|
||||
let preloader: ProgressivePreloader; // it must be here, otherwise will get error before initialization in round onPlay
|
||||
|
||||
const video = document.createElement('video');
|
||||
video.classList.add('media-video');
|
||||
video.setAttribute('playsinline', 'true');
|
||||
@ -384,7 +386,6 @@ export function wrapVideo({doc, container, message, boxWidth, boxHeight, withTai
|
||||
const cacheContext = appDownloadManager.getCacheContext(doc);
|
||||
|
||||
const isUpload = !!(message?.media as any)?.preloader;
|
||||
let preloader: ProgressivePreloader;
|
||||
if(isUpload) { // means upload
|
||||
preloader = (message.media as any).preloader as ProgressivePreloader;
|
||||
preloader.attach(container, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user