Copied to clipboard

Flag this post as spam?

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


  • tentonipete 78 posts 223 karma points
    Sep 02, 2011 @ 12:18
    tentonipete
    1

    What is currently the best way to embed videos?

    I know there are lots of posts about this already but a lot of them are old and I know there have been changes to Umbraco since they were made.

    I have been attempting to insert videos with the "Insert embedded media" TinyMCE button with no success. I get either nothing showing up, content not found, tidy errors or just things disappearing on publishing the page.

    I really have 2 questions:

    1. What is the simplest way to insert youtube videos?

    2. Since the TInyMCE option doesn't seem fit for purpose, which is the package that adds the most flexibility for video embedding and should be included in every Umbraco install?

    (we're talking 4.7+ here)

    Thanks in advance for any suggestions!

  • Rich Green 2246 posts 4008 karma points
    Sep 02, 2011 @ 13:25
    Rich Green
    0

    Hey, 

    I use the Universal Media Picker to select the You Tube video and then just embed it in XSLT.

    The embed method here supports iPhone/iPad.

    Not sure if it's the best method but working for me perfectly and takes about 10 mins to set up.

    <xsl:variable name="field"><xsl:value-of select="homePageVideo"/></xsl:variable>

    <xsl:if test="$field !=''">
    <object width="455" height="280"><param name="movie" value="http://www.youtube.com/v/{$field}?version=3&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{$field}?version=3&amp;hl=en_GB" type="application/x-shockwave-flash" width="455" height="280" allowscriptaccess="always" allowfullscreen="true"></embed></object>

    </xsl:if>

    Not sure how to do this using the RTE, but I always try to have Video/Media out of the RTE as Document properties.

    Rich

     

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Sep 02, 2011 @ 13:54
    Lee Kelleher
    0

    Same here, I tend to not let content editors insert videos into TinyMCE - always seems to end in tears.

    There's a comment on one of my old blog posts that might be helpful?

    http://blog.leekelleher.com/2009/07/16/add-youtube-plugin-to-umbraco-tinymce/#comment-225

    In the Richtext editor data-type, tick the Flash/media icon. This allows you to embed any type of Flash movie (swf) in TinyMCE.

    The main downside is that you need to figure out the URL of the actual YouTube movie (swf); which is usually in the format of:

    http://www.youtube.com/v/{YouTube Video Id}

    Cheers, Lee.

  • tentonipete 78 posts 223 karma points
    Sep 02, 2011 @ 17:00
    tentonipete
    0

    Thanks for the replies, guys.

    That blog comment was really useful in identifying how to make the TinyMCE insert work, but the problem is that youtube have obviously changed their URL definitions since that TinyMCE button was created and finding it in that format on the youtube site is a real bugger! There are just too many options and pitfalls for a content editor which result in empty white squares!

    The oEmbed package http://our.umbraco.org/projects/website-utilities/oembed-macro-easy-embed-youtube,-flickr,-vimeo-etc seemed pretty cool because there are hardly any options (just URL and max height width) and it automatically wraps the URL and works for both youtube/vimeo. It is just a bit flakey. It has problems when I try to put more than one video on a page and more critically it often returns the error documented in here: http://our.umbraco.org/projects/website-utilities/oembed-macro-easy-embed-youtube,-flickr,-vimeo-etc/feature-requestbug-forum/23561-All-embedded-YouTube-videos-display-oohembed-error-message which means it's also not suitable. When the problems are ironed out that will be great but it's relying on a 3rd party service so there's always the risk that it could screw up.

    I'm a fan of not letting content editors insert videos into TinyMCE too but sometimes it just has to happen and this is one of those cases :)

  • tentonipete 78 posts 223 karma points
    Sep 16, 2011 @ 17:40
    tentonipete
    0

    does anybody else have any suggestions or is this as good as it gets?

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 16, 2011 @ 17:58
    bob baty-barr
    0

    i have used the embeded contnet datatType and the iframe method embed method to let youTube and or vimeo handle all the device compatibllity issues.

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Sep 19, 2011 @ 13:42
    Tim
    0

    I've got a Macro parameter that I've written for a project that allows you to specify a youTube channel that you own, and lets you pick a video from it, then embeds it in the page using a macro. Which you can then embed in the RTE using the add macro button.

    The UI is horrible at the moment, but I could put it up on the projects section if anyone was interested (might take a while as I'm mad busy at the moment)?

  • Keith Petersen 67 posts 111 karma points
    Sep 20, 2011 @ 19:00
    Keith Petersen
    0

    @Tim That would be helpful to me.

    I haven't tried it, but if you only need youtube this new project might work: http://our.umbraco.org/projects/website-utilities/youtube-embed-cross-browser-by-ava-ltd

  • Becky 5 posts 25 karma points
    Feb 27, 2012 @ 18:31
    Becky
    0

    So 6 months on does anyone have a solution that's not just tailored to relying on a thridparty service or assuming that it's a YouTube video?

    Turning on the RichText Editor media icon in the datatype was the first thing I tried, and then have had nothing but issue with it all day, though if it worked then it's exactly what I'm after.

    I'm getting close to just writing a macro to add the video based on the url, but I was hoping for a less custom solution. I wanted to allow my editors the ability to choose where within a large amount of content their video would appear as we're talking more advanced than the average user.

  • Rich Green 2246 posts 4008 karma points
    Feb 27, 2012 @ 18:33
    Rich Green
    0

    Hey Becky,

    What type of video are you trying to embed? A local file, is it in the media section?

    Personally I always try to avoid having the user added video (and images if I can) into the RTE as I'd rather have it separate so I can present it perfectly.

    Rich

  • Becky 5 posts 25 karma points
    Feb 27, 2012 @ 18:43
    Becky
    0

    Hi Rich, 

    Yes it's a local video at the moment whilst I test things, and it's in the media section, doesn't have to be though, there's the possibility that the videos could get uploaded to AWS, though this is under debate and could go either way. 

    The main problem I've been having today is that no matter what I try I can't get the TinyMCE to not give me a [tidy error] when using HTML5 video option.


    And yes I agree that for most instances I'd rather have the media not added in the RTE and infact I have used a textstring datatype on other sections of the site to control it better, but in this instance, on these particular pages, it really does make more sense to have it in the RTE, if i ever get the project out the door maybe I'll explain why a little better ;) 

  • Rich Green 2246 posts 4008 karma points
    Feb 28, 2012 @ 10:14
    Rich Green
    0

    Hi,

    Have you considered adding the video as a Macro into the RTE rather than using TinyMCE controls?

    Will give you the best of both worlds.

    Rich

  • Becky 5 posts 25 karma points
    Feb 28, 2012 @ 11:13
    Becky
    0

    Thanks, that's the solution I've gone for at this time, I suppose at least I can control it my way, just seems a shame to be creating new macros to replicate functionality that seems to be there, just not working correctly :(

    For anyone that comes across this thread and decides to do the same thing, it's worth checking http://our.umbraco.org/forum/developers/razor/21275-Rendering-RTE-with-embedded-macros-in-Razor if you haven't already tried embedding razor macros in RTE ;)

Please Sign in or register to post replies

Write your reply to:

Draft