Youtube embed help, please

by 2 replies
3
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

.
#programming #embed #youtube
  • 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.
    • [ 1 ] Thanks
  • thank you very much

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

    agian, thank you !!!!!!

    .

Next Topics on Trending Feed