<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [MSE] postpone selecting media engine until type information is available"
   href="https://bugs.webkit.org/show_bug.cgi?id=157290">157290</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[MSE] postpone selecting media engine until type information is available
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Media Elements
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>eric.carlson&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>HTMLMediaElement::loadResource is called when a media element's src attribute is set/changed. It calls MediaPlayer::load with the url and content type (and media source when loading MSE), and MediaPlayer is supposed to choose the most appropriate media engine for the media type. The content type is always empty when loading from video.src, so we can't choose a media engine based on that and end up blindly selecting the first engine, MediaPlayerPrivateAVFoundationObjC. When loading a media source or media stream, the first media engine immediately rejects the call to load(), so we try the next engine, and the next if that fails, etc, etc, until one succeeds or they all fail.

While we can add methods to the MediaPlayerPrivate interface to avoid create an engine only to immediately destroy it (&quot;mseSupported, etc), we can't have more than one MSE engine (eg. a mock engine for testing) until we have the content type made available to MediaSource::addSourceBuffer.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>