Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve 472 posts 1216 karma points
    Mar 20, 2013 @ 16:10
    Steve
    0

    Creating a Razor script to embed video

    How would I go about embeding video with parameters using a Razor script?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 20, 2013 @ 23:38
    Jan Skovgaard
    0

    Hi Steve

    What kind of embedding to you have in mind? Embedding videos from Umbraco using macroes with parameters or embedding videos from services like youtube or vimeo?

    Looking forward to hearing from you?

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    Mar 21, 2013 @ 05:18
    Fuji Kusaka
    0

    Hi Steve,

    I usually make use of either youtube or vimeo and make use of jquery to open the videos. This can easily be integrated with razor.

  • Steve 472 posts 1216 karma points
    Mar 21, 2013 @ 13:15
    Steve
    0

    Just embedding a local .mp4 file with paramameters. I just don't have any ideas where to start with the razor script.

  • Steve 472 posts 1216 karma points
    Mar 22, 2013 @ 13:57
    Steve
    0

    Also, I don't want a flash player because It won't work with mobile browsers. Any help?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 22, 2013 @ 16:11
    Jan Skovgaard
    0

    Hi Steve

    Ok, now I get what you want to do.

    As Fuji mentions above an option could be to use youtube or vimeo since those services work on mobile browsers. If you choose this approach have a look at the Universial Media Picker, wich can connect to these services and let you pick your videos directly from Umbraco.

    However if you want to upload the videos directly in Umbraco and fetch them directly you should do the following.

    1: Make sure that the mime type for .mp4, ogg and the webm format is registered in the web.config - otherwise you may get an 404 error page because the media can't be found.

    2: Include the javascript and css ressources needed

    3: Write some magic Razor to get the path for the video.

    Currently I'm searching for the script to do this (Since I'm a Razor n00b I can't remember this from the top of my head). However I'm sure you can benefit from having a look in the Razor Cheat Sheet here http://our.umbraco.org/projects/developer-tools/razor-dynamicnode-cheat-sheet

    /Jan

     

  • Steve 472 posts 1216 karma points
    Sep 03, 2015 @ 13:22
    Steve
    0

    Any solution to this?

    I am still looking for a way to embed local .mp4's using Razor.

Please Sign in or register to post replies

Write your reply to:

Draft