Bug 249301

Summary: Pageload: <video> initially displayed at wrong position
Product: WebKit Reporter: Frederik Riedel <frederik.riedel>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ap, nielsmouthaan
Priority: P2    
Version: Safari 16   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
Attachments:
Description Flags
video of the bug where the video is initially displayed at the wrong position
none
new screen recording on page load video zoom none

Description Frederik Riedel 2022-12-14 04:02:50 PST
Created attachment 464038 [details]
video of the bug where the video is initially displayed at the wrong position

Hello lovely WebKit Team!

I am experiencing a strange behavior on page-load with an html5 video element.

For the first 230ms, the video element is displayed at a slightly wrong position. Please see the attached screen recording.

This is the code that I’m using to display the video element:

```html
<video width="300" height="500" preload playsinline muted loop autoplay>
    <source src="https://one-sec.app/assets/videos/one sec website animation-1.mov" type="video/mp4;codecs=hvc1">
    <source src="https://one-sec.app/assets/videos/one sec website animation-1.webm" type="video/webm">
</video>
```

Website url: https://one-sec.app

Related bug report on StackOverflow with code to reproduce: 
https://stackoverflow.com/questions/74782899/video-briefly-jumps-around-when-page-is-loaded-using-safari


Fixing this would definitely make page-loading a lot smoother, without elements jumping around.

Let me know if you need any more information!

– Frederik
Comment 1 Sam Sneddon [:gsnedders] 2022-12-14 04:45:55 PST
What version of Safari & macOS are you trying this on?
Comment 2 Frederik Riedel 2022-12-14 05:16:35 PST
Ventura 13.0 (22A380); Safari Version 16.1 (18614.2.9.1.12)
Comment 3 Sam Sneddon [:gsnedders] 2022-12-14 07:20:33 PST
(In reply to Frederik Riedel from comment #2)
> Ventura 13.0 (22A380); Safari Version 16.1 (18614.2.9.1.12)

FWIW, I can't reproduce this on 13.1 (22C65), Safari Version 16.2 (18614.3.7.1.5), on a MacBook Air (M1 2020).
Comment 4 Niels Mouthaan 2022-12-15 05:05:31 PST
I'm the author of the SO post mentioned by Frederik and based on Sam's comment, I started testing on macOS 16.1 and iOS 16.2. It indeed seems to be fixed in the latest version of (Mobile) Safari.
Comment 5 Niels Mouthaan 2022-12-15 05:05:42 PST
I'm the author of the SO post mentioned by Frederik and based on Sam's comment, I started testing on macOS 16.1 and iOS 16.2. It indeed seems to be fixed in the latest version of (Mobile) Safari.
Comment 6 Alexey Proskuryakov 2022-12-16 14:08:48 PST
Thank you for confirming!
Comment 7 Frederik Riedel 2022-12-17 01:25:10 PST
I have updated to macOS 13.1 (22C65) and Safari Version 16.2 (18614.3.7.1.5).
The bug now reproduces in a different way. See my second video.

Instead of being at the wrong position, it is not displayed zoomed in for the first fraction of the page load.
Comment 8 Frederik Riedel 2022-12-17 01:25:43 PST
Created attachment 464084 [details]
new screen recording on page load video zoom