[Webkit-unassigned] [Bug 215161] New: When the page enters the background, the mediastream video cannot be played in the pip window

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 5 02:42:57 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=215161

            Bug ID: 215161
           Summary: When the page enters the background, the mediastream
                    video cannot be played in the pip window
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Macintosh
                OS: macOS 10.15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: 709922234 at qq.com

Reproduce:
1. open https://mantou132.github.io/javascript-learn/stream.html
2. click pip button
3. Focus on other apps and let Safari enter the background

expect: The video plays smoothly in the pip window

actual: video paused

```
  const ctx = canvas.getContext('2d');
  const tick = () => {
    ctx.canvas.width = ctx.canvas.width;
    ctx.fillStyle = 'white';
    ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
    ctx.fillStyle = 'black';
    ctx.font = '50px serif';
    ctx.fillText(Math.floor(performance.now()), 0, 50);
    requestAnimationFrame(tick);
  }
  tick();
  const stream = canvas.captureStream();
  video.srcObject = stream;
  video.play();
  btn.onclick = () => video.requestPictureInPicture();
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200805/80ce8641/attachment.htm>


More information about the webkit-unassigned mailing list