Bug 266686 - Setting video src to MediaStream and resizing the video via style results in flickering
Summary: Setting video src to MediaStream and resizing the video via style results in ...
Status: RESOLVED DUPLICATE of bug 259364
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://www.bilibili.com/video/BV17Q4...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-12-20 01:21 PST by Fate
Modified: 2024-01-01 19:07 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fate 2023-12-20 01:21:54 PST
Below is the minimal reproducible code snippet that demonstrates the issue:

```
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>test safari 17 bug</title>
  </head>
  <body>
    <button id="btn1">camera</button>
    <video
      id="video"
      style="
        width: 600px;
        height: 600px;
        transform-origin: top left;
        transition: all 0.3s ease;
      "
      controls
      autoplay
      playsinline
      webkit-playsinline
    ></video>
    <button id="btn2">zoom</button>
    <script>
      btn1.onclick = function () {
        navigator.mediaDevices
          .getUserMedia({
            video: true,
          })
          .then((stream) => {
            video.srcObject = stream;
          });
      };
      btn2.onclick = function () {
        video.style.width = video.style.width === '300px' ? '600px' : '300px';
        video.style.height = video.style.height === '300px' ? '600px' : '300px';
      };
    </script>
  </body>
</html>
```
Comment 1 Simon Fraser (smfr) 2023-12-20 11:09:09 PST
Original title: I am experiencing an issue on Safari 17 where using Video srcObject = MediaStream(WebRTC) to play a particular captured video stream, and resizing it via style settings for width and height, results in the rendered video flickering. (edit)
Comment 2 Radar WebKit Bug Importer 2023-12-20 11:09:26 PST
<rdar://problem/119944578>
Comment 3 youenn fablet 2023-12-20 12:26:57 PST

*** This bug has been marked as a duplicate of bug 259364 ***
Comment 4 youenn fablet 2023-12-20 12:27:15 PST
This should work now in latest Safari Tech Preview.
Comment 5 Fate 2023-12-20 18:59:41 PST
Could you please inform me when the bug fix is expected to be merged into the release version, and on which version it will be released?
Comment 6 Fate 2024-01-01 19:07:27 PST
This issue still persists in iOS 17.2.1/MacOS 14.1.1 systems.