Youtube video is not responsive

Post

Posted
Rating:
#2088 (In Topic #442)
Hey guys :)

First, i realy like the new compo.sr 
i am testing in a sub dir, and the first thing i see, is that youtube video is not responsive.
on a mobile device i see half of the video.

is it possible to fix this, or is there already a solution?

Post

Posted
Rating:
#2102
Hi :) ,

You're right, it's clumsy right now.

I have just incorporated a change for the next patch release. When on desktop mode videos will play as they do now (specific size), but on mobile mode they'll use a 'responsive' technique to take full width.

See:
https://github.com/ocproducts/composr/commit/7e759cbd6a69a84d95aa13d27d3f9eb9ec552a2f

You'll need to copy the changes I made into your theme's global.css.

You'll also need to pass the content through an edit so that the Comcode refreshes.

Post

Posted
Rating:
#2104
Will this change also work on the MediaElement addon? cos I have applied some hacks I discovered to make that responsive already.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#2108
I only considered YouTube. I think for a normal HTML5 player (not one in an iframe like YouTube's) it would be pretty straight forward to make it responsive using simple CSS or just a 100% width.

Post

Posted
Rating:
#2110
Yes, many thanks for your answer, and keep up this wonderful job!

edit: I tried your fix, but i dont see any changes.
i changed my css like you said, en de youtube file.
Upload all, edit the posts with youtube video, but on mobile its the same. Even after clear cache and all.

is there something that i do wrong?

Last edit: by Joey

Post

Posted
Rating:
#2111
Did you definitely edit the global.css file of the active theme? Are you able to use the browser's developer tools to inspect the YouTube player, you should see a 'div' with 'youtube_player' around it.

Post

Posted
Rating:
#2123
Hi Chris,

Please call me stupid! I put the global.css in the css folder, but not in de custom_css
Now its working perfectly.
Thanks for your time. Have a nice day.
0 guests and 0 members have recently viewed this.