Для Windows UWP для просмотра видео трансляций
Hi, I have a Raspberry Pi streaming video on
http://pi-address:8082/
The Raspberry Pi code comes from:https://github.com/waveform80/pistreaming
In Chrome and Edge I can watch the video with no problem. Now my problem is how can I do this in Windows UWP with a good performance and low CPU usage. In Visual Studio 2017 I tried with WebView
wvTest.Navigate(New Uri("http://pi-address:8082"))
It works but the framerate is very low, the picture is pixelating and the CPU usage very high, when I compare to Chrome or Edge. Thank you in advance Using Developer Tools in Edge gives:
<pre><!DOCTYPE html> <html><head> <meta name="viewport" content="width=640, initial-scale=1"> <title>jsmpeg streaming</title> <style type="text/css"> body { background: #333; text-align: center; margin-top: 10%; } #videoCanvas { /* Always stretch the canvas to 640x480, regardless of its internal size. */ width: 640px; height: 480px; } </style> <style type="text/css"></style></head> <body> <!-- The Canvas size specified here is the "initial" internal resolution. jsmpeg will change this internal resolution to whatever the source provides. The size the canvas is displayed on the website is dictated by the CSS style. --> <canvas width="640" height="480" id="videoCanvas"> <p> Please use a browser that supports the Canvas Element, like <a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.mozilla.com/firefox/">Firefox</a>, <a href="http://www.apple.com/safari/">Safari</a> or Internet Explorer 10 </p> </canvas> <script src="jsmpg.js" type="text/javascript"></script> <script type="text/javascript"> // Show loading notice var canvas = document.getElementById('videoCanvas'); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#444'; ctx.fillText('Loading...', canvas.width/2-30, canvas.height/3); // Setup the WebSocket connection and start the player var client = new WebSocket('ws://' + window.location.hostname + ':8084/'); var player = new jsmpeg(client, {canvas:canvas}); </script> </body></html>
Что я уже пробовал:
In Visual Studio 2017 I tried with WebView
wvTest.Navigate(New Uri("http://pi-address:8082"))