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 13, 2014 @ 12:00
    James
    0

    Responsive YouTube Embed

    Is there a way to create a field that a user can input a link to a youtube video, but then style all the videos as max width 100% etc? Im trying to create a responsive video embed.

     

    Kind regards.

  • Dan 1288 posts 3921 karma points c-trib
    Jul 13, 2014 @ 18:16
    Dan
    100

    Hi James,

    The way I'd tackle this would be just to add a standard textbox input into which the user would paste the YouTube video URL, then use a technique like http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php or http://embedresponsively.com/ in your template to pull that video URL into the page, responsively.

    Hope this helps...

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 13, 2014 @ 19:03
    Jeavon Leopold
    1

    Hi James,

    Warren Buckley is working on a new package called uTube which works really nicely, unfortunately it's not currently released so you have to build it with Grunt and Visual Studio (not sure if this is an option for you?). You can find the source here

    Jeavon

  • Damien Green 72 posts 134 karma points
    Jul 15, 2014 @ 22:26
    Damien Green
    0

    There's also the FitVids plugin from http://fitvidsjs.com which is a JavaScript module that you can just link to in your master page. It will make YouTube or indeed anything that works with an iFrame scale responsively.

Please Sign in or register to post replies

Write your reply to:

Draft