locked
@html5Video tag helper in webmatrix .i am using webpages.mp4 does not play . RRS feed

  • Question

  • User1493762548 posted

    i have stored video files in App_Data/Videos/filename.mp4

    want to play using html5video.create as given in http://vimeo.com/18616502.

    i included html5video.csthml file in App_Code folder.

    i want to display in Display.cshtml from App_Data/Videos /filename.mp4

    in the body of display.cshtml what address should be used in @Html5Video.Create(mp4Url:"   ??????????????",width:320,height:240)

    Friday, April 1, 2016 6:21 AM

Answers

  • User-821857111 posted

    You need to move the video folder out of the App_Data file because ASP.NET doesn't allow content to be served from there. Then you provide the URL of the video, so if you move it to /Videos/filename.mp4, the Url will be:

    @Html5Video.Create(mp4Url:"   "~/Videos/filename.mp4",width:320,height:240)


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 1, 2016 6:28 AM

All replies

  • User-821857111 posted

    You need to move the video folder out of the App_Data file because ASP.NET doesn't allow content to be served from there. Then you provide the URL of the video, so if you move it to /Videos/filename.mp4, the Url will be:

    @Html5Video.Create(mp4Url:"   "~/Videos/filename.mp4",width:320,height:240)


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 1, 2016 6:28 AM
  • User1493762548 posted

    i tried the @Html5Video.Create(mp4Url:" "~/Videos/filename.mp4",width:320,height:240)

    the error was no file found with supported formate and mimetype.

    the file name in Videos folder also contain .mp4 extension. i then tried this but the same error occured.

    @Html5Video.Create(mp4Url:@"~/Videos/FileName",width:320,height:240)
    

    Friday, April 1, 2016 12:09 PM
  • User-821857111 posted

    fiazahmed

    no file found with supported formate and mimetype.

    You need to make sure you  create a folder called Videos and that you provide a valid file name where I have put "filename.mp4".

    Friday, April 1, 2016 2:46 PM