<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 - Video tags can not be used for input to Canvas/WebGL on iOS"
   href="https://bugs.webkit.org/show_bug.cgi?id=160685">160685</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Video tags can not be used for input to Canvas/WebGL on iOS
          </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>iOS
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>iOS 9.3
          </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>gman&#64;chromium.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>At some point it seems like Safari on iOS made it so video playback always happens fullscreen.

This is a problem for apps that are trying to use the video a source to a canvas or a webgl texture.

I don't know what problem was trying to be solved here. Maybe it was trying to make sure videos have a nice UX. Unfortunately it seems to have broken apps that use video as an input source like p5.js does often.

Is there any chance this can be fixed? Maybe check if the video is `display: none` and then let it play in the background? Or some new attribute that tells iOS Safari the video will be used for processing and not for direct on screen playback?

Note: people have found one hacky workaround which is as follows

make both a video and audio tag. Set both to the same source. Play the audio tag. Every rAF do `video.currentTime = audio.currentTime`. This magically works but seems very fragile and hacky.

Example <a href="http://webglsamples.org/video/video.html">http://webglsamples.org/video/video.html</a></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>