'display video frames in web page asp.net razor byte [] array
community
I´m trying to display the byte [] array that is taken from the RtspClientSharp.dll into an img tag (HTML), but this only works when the page in loading (ASP.NET). What I´m trying to do is to display every frame as faster as the user can watch the video from an ip camera.
The way I use to set the image url is
String.Format("data:image/png;base64,{0}", Convert.ToBase64String(viewer.imageBytes))
Here is the code:
@{
ViewData["Title"] = "Home Page";
}
@{
CameraViewer viewer = new CameraViewer("192.168.0.65");
viewer.Start();
}
<div class="veiwer">
@while(!viewer.isDisplayed){}
@{String imgUrl=String.Format("data:image/png;base64,{0}", Convert.ToBase64String(viewer.imageBytes));}
<img src="@imgUrl"/>
</div>
I have tried using javascript too but it doesn´t works.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
