You tube default width
PRAB
New
Great plug-in. Have a small question. How can i change the default width of embedded YouTube videos? (by editing the css file)
0
PRAB
New
Great plug-in. Have a small question. How can i change the default width of embedded YouTube videos? (by editing the css file)
Comments
@PRAB AFAIK, you can't change the embeded videos through CSS. However, in mediator.js, the lines 44-49 set the width up conditionally.
function Mediator () { var mlist = $('.MessageList .Message'); if (mlist.width() < 640) { width = mlist.width() - 40; height = width * 0.5625; } else { width = 640; height = 360; }You change this to:
function Mediator () { //var mlist = $('.MessageList .Message'); //if (mlist.width() < 640) { // width = mlist.width() - 40; // height = width * 0.5625; //} else { // width = 640; // height = 360; //} width = 1280; height = 720;changing the last numbers to whatever you want.
Thanks a lot @hgtonight!
@PRAB, the above solution should work indeed. Do let me know if it doesn't, and I'll figure out a fix.
@hgtonight
You can use css to control the embedded content , if the embedded content is an iframe you would just add iframe to the list below. I use this all the time to keep everything the size I want regardless of what they embed and how big. This would go in your custom.css file of your theme.
.Preview .Message, .MessageList .Message .Video object embed { width: 680px; height: 420px; }here is screens of it.I made the embed object here very wide so it reaches to the other side under the panel. in the first image the second I made the embed object the width of the content only with css and overriding any size the embed may contain.