What im trying to do is play a .mp4 file in JW Player that is given by a database in bytes.
So here is my Script for JW Player:
<script type="text/javascript">
jwplayer("contvideo").setup({
flashplayer:"jwplayer/player.swf",
file: "downloadvideo.aspx",
provider: "video",
height: 140,
width: 188,
skin: "jwplayer/slim.zip",
modes: [{type:'flash',src:'jwplayer/player.swf'},{type:'html5'},{type:'download'}] });
</script>
The script recives its movie file from the web page service downloadvideo.aspx.
The code for downloadvideo.aspx is:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim bytes() As Byte = System.IO.File.ReadAllBytes("C:\websites\videospecialty\wdo.mp4")
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=wdo.mp4")
Response.ContentType = "video/mp4"
Response.Flush()
Response.OutputStream.Write(bytes, 0, bytes.Length)
Response.OutputStream.Flush()
Response.End()
End Sub
But when i try this JW Player errors and says that they video was not found.
Any help with this would be greatly appriciated.