Copied to clipboard

Flag this post as spam?

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


  • James 251 posts 1169 karma points
    Jul 04, 2014 @ 16:02
    James
    0

    Responsive Youtube Embed

    I have just installed the standard template and started to tinker with it.

     

    When uploading youtube urls, what is the best way to make the embed responsive?

     

    I understand how to do this when i am not using a CMS. Could do with knowing how to implement it in umbraco.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 04, 2014 @ 16:52
    Jan Skovgaard
    101

    Hi James and welcome to our :)

    How would you ensure your youtube video is responsive outside of an Umbraco context?

    I think it's probably the same way as when the content comes from inside Umbraco but of course it depends how you usually fetch the video.

    But when inserting a youtube video link in Umbraco it's being embedded using an iframe so it should be a matter of providing the iframe with with="100%" - or perhaps just controlling the with and height in CSS.

    Hope this makes sense? :)

    /Jan

  • Matthew Kirschner 323 posts 611 karma points
    Jan 23, 2015 @ 21:00
    Matthew Kirschner
    1

    Is there a way to wrap the embedded iframe with a container and class? I'm trying to look throught the source for tinyMCE and the umbembeddialog, but I can't determine where the iframe is being added to the tinyMCE editor.

    Being able to add a custom wrapper class to the iframe would solve the responsiveness issue. Simply adding 100% in the embed dialog is no good because the user may not want the video to be full width on a desktop website. This would also cause the video to stretch past it's source width.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies