Art B
Art B

Reputation: 147

How to get rid of black bars in embed youtube video

How I can get rid of black bars in youtube video? These black bars in top and in the bottom. Video is not mine, I can't edit video tags. I tried to use this string:

<iframe frameborder="0" allowfullscreen src="https://www.youtube.com/embed/9bZkp7q19f0?rel=0&showinfo=0&autohide=1&modestbranding=1&autoplay=1&volume=0&wmode=opaque&yt:crop=16:9"></iframe>

Everything works, but yt:crop=16:9 - not working.

Can you advise something?

Upvotes: 2

Views: 9037

Answers (1)

TheYaXxE
TheYaXxE

Reputation: 4294

Have you considered just to add a width and height?

<iframe width="300" height="169" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/9bZkp7q19f0?rel=0&showinfo=0&autohide=1&modestbranding=1&autoplay=1&volume=0&wmode=opaque"></iframe>

Then the black bars on the sides disappears.

By the way I don't see any black bars at the top and the bottom, when running your code. Only on the sides.

Upvotes: 1

Related Questions