I created WinUI 3.0 project that used Webview2 v1.0.818.41 and loaded my video streaming app into it, but the video will not play and reports multiple DRM errors.
I also checked if video streaming works for the app in the version of Chromium Edge I have installed on my computer, and it does. Here is my user agent string, which I verified matches the user agent string I get from Webview2:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Ege/90.0.818.62
After a bit of investigation, I figured out that navigator.requestMediaKeySystemAccess is defined on Chromium Edge but is not defined on the client in Webview2. Because this is a UWP app, I suspect one of four possibilities as to why DRM fails:
- Developer mode?
- I know previously that Legacy Edge running on an Xbox One in developer mode restricts playback of DRM content to SL-150 and below. Could this be true of Webview2, but even more restrictive than Legacy Edge?
- Missing app permission or some other setting?
- I have set the content URI's in the manifest appropriately, and nothing appears out of sorts with the app permissions.
- Webview2 does not have EME support yet?
- If true, this is surprising since EME is a W3C specification, and support is already built into Chromium Edge.
- Webview2 needs instantiation with some unspecified options/flags?
Of relevant importance, I should also note that I have seen other video streaming apps using Webview2. The only way I can tell is when an error occurs, but I have seen error messages on those apps that indicate the new component is in use, so I know DRM has somehow been figured out.