Bug 197550 - calling getVideoPlaybackQuality() during seek will cause hang instantly until end of downloads media source
Summary: calling getVideoPlaybackQuality() during seek will cause hang instantly until...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-02 21:22 PDT by root
Modified: 2019-05-03 10:17 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description root 2019-05-02 21:22:23 PDT
calling getVideoPlaybackQuality() during seek will cause hang instantly until end of downloads media source.
This also happened when Web Inspector is opened.

* Reproducing step

1. play any mp4 video with url that is never cached yet
2. registering `seeking` event listener which contains getVideoPlaybackQuality()
3. move playhead to unbuffered timeline on video timeline shown
4. repeat 3 until hang it browser

(optionally) If you cannot reproduce with above steps, maybe using `timeupdate` handler will helpful to reproduce (see to code stubs in below)


* Reproducing environments

iOS Safari / WKWebView (iOS 12.1, iOS 12.2, iOS 12.3 public beta3)
macOS Safari 12.1.2, Safari Technical Preview 81 (macOS 10.14.4)
MiniBrowser.app (r244898, macOS 10.14.4)


* Test stubs

<!--
you need to change video source, and it should be MP4
Also, It is not matter of video container.
-->
<video src="http://example/v.mp4" controls id="x"></video>
<div id="logger"></div>

<script>
  var x = document.getElementById('x');
  var l = document.getElementById('logger');
  function log(
     l.innerHTML = object.totalVideoFrames;
  }

  x.addEventListener('seeking', function () {
    log(x.getVideoPlaybackQuality());
  });
  // It happened more frequently happened with following stubs
  // x.addEventListener('timeupdate', function () {
  //  log(x.getVideoPlaybackQuality());
  // });
 </script>
Comment 1 Radar WebKit Bug Importer 2019-05-03 10:17:48 PDT
<rdar://problem/50447868>