Youtube embed help, please

by newxxx
2 replies
hi

i am using this code to make youtube videos resizable for cell phones
(i found this on the internet)

<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
</style>
<div class='embed-container'><iframe src='https://www.youtube.com/embed/IXXXXXXX' frameborder='0' allowfullscreen></iframe></div>

(where XXXXXXXX is the designated ID of the youtube video)


is there a way that you can see to adjust the code so that related videos do not show at the end of the played video ?

thank you

.
#embed #youtube
Avatar of Unregistered
  • Profile picture of the author Laksh
    This is what I found on Google ... plz test it though

    src='https://www.youtube.com/embed/IXXXXXXX?rel=0' frameborder='0' allowfullscreen></iframe></div>

    You would basically add the text "?rel=0" before frameborder. You can get that by choosing appropriate options while generating the Embed code.
    {{ DiscussionBoard.errors[11238243].message }}
  • Profile picture of the author newxxx
    thank you very much

    i also threw in autoplay=1 so the short video plays when the page is open

    agian, thank you !!!!!!

    .
    {{ DiscussionBoard.errors[11238933].message }}
Avatar of Unregistered

Trending Topics