Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm using nancy as embedded http server, I need to play and jump on local mp4 videos from this server. I can do this from web server applciation using mp4 handler but I need to find a way to do this from embedded server.
Posted
Comments
Kornfeld Eliyahu Peter 13-Apr-15 3:52am    
Check this: http://simoncropp.com/returningunsafefilesinnancyfx
kubibay 13-Apr-15 5:29am    
Hi Kornfeld,
Thanks for your answer. I'm testing the sample for my requirements. It is ok for txt files but for mp4 files I got "c# The specified network name is no longer available" error and stream is empty. Do you have any idea about that?
Kornfeld Eliyahu Peter 13-Apr-15 5:55am    
Did you adjusted the MIME type?
kubibay 13-Apr-15 6:58am    
Yes, like this: return Response.AsStream(() => File.OpenRead(@"E:\test_videos\test.mp4"), "video/mp4");
Kornfeld Eliyahu Peter 13-Apr-15 7:14am    
And you are sure the file is MP4 and the file is there at the specified path?

1 solution

I have implemented mp4handler for nancyfx and it worked.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900