You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the AVPPlayerClose method is invoked in the jslib plugin for WebGL, it sets the src attribute of the Video element to an empty string and invokes the load method on it to release the resources for the element.
This action results in the onerror handler being invoked with the error MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED, which invokes console.log with the error. This behavior has been observed in Chrome, at least.
The HTML standard recommends removing the src attribute and invoking load instead of setting it to an empty string. We've applied this change to our codebase and it appears to work well.
Your Setup (please complete the following information):
Unity version: 2018.4.25f1
AVPro Video version: [AVProVideo] Initialising AVPro Video (script v1.11.4 plugin v1.9.17) on ANGLE (Intel(R) UHD Graphics 620 Direct3D11 vs_5_0 ps_5_0)/OpenGL ES 3.0 (WebGL 2.0) (MT False) on WebGLPlayer Windows 10
Operating system version: ^
Device model: ^
Video specs (resolution, frame-rate, codec, file size): n/a
To Reproduce
Load WebGL player into Chrome browser.
Load a video into a MediaPlayer.
Destroy the MediaPlayer
Observe log.
Logs
Error: video not supported (errorcode=4) color:red;
Patch:
// Setting 'src' to an empty string results in the onerror handler being invoked and producing log noise on Chrome.// Removing the src attribute and invoking load is a recommended best practice in the HTML Standard.// See https://html.spec.whatwg.org/multipage/media.html#best-practices-for-authors-using-media-elementsvid.pause();vid.removeAttribute("src");// Previous: vid.src = "";vid.load();
The text was updated successfully, but these errors were encountered:
Describe the bug
When the
AVPPlayerClose
method is invoked in the jslib plugin for WebGL, it sets thesrc
attribute of the Video element to an empty string and invokes the load method on it to release the resources for the element.This action results in the
onerror
handler being invoked with the errorMediaError.MEDIA_ERR_SRC_NOT_SUPPORTED
, which invokesconsole.log
with the error. This behavior has been observed in Chrome, at least.The HTML standard recommends removing the src attribute and invoking load instead of setting it to an empty string. We've applied this change to our codebase and it appears to work well.
Your Setup (please complete the following information):
To Reproduce
Logs
Patch:
The text was updated successfully, but these errors were encountered: