Playing a video file from a sql server blob via ashx handler using HTML5 Video Tag

alireza_anba

New Member
I am using code from this codeproject article to upload a MP4 video file to SQL server(varbinary(MAX)) and play it back from there.My requirement is to use SQL server specifically instead of storing and fetching videos from the file system.This is the code I am using to play the video:\[code\]<video id='my_video_1' controls width="640" height="264" data-setup="{"controls":true, "preload":none}" > <source src='http://stackoverflow.com/questions/12783106/<%#"VideoHandler.ashx?id=" + Eval("ID") %>' type='video/mp4'> </video>\[/code\]If I use a physical video file as the video source, it works. However the above code does not work.In "Internet Explorer" the tag renders a black box with a red crossIn "Chrome" the player buttons are visible but when I click play button, no video is played. When we right click it shows "Save Video as..." option and the downloaded file runs fine with a desktop media player.Please help me with correct code.
 
Back
Top