ashleydw / lightbox

A lightbox gallery plugin for Bootstrap
http://ashleydw.github.io/lightbox
MIT License
1.85k stars 1.3k forks source link

Why is the Vimeo modal width hard-coded? #247

Closed joemaller closed 7 years ago

joemaller commented 7 years ago

Is there some reason why the Vimeo modals have their size hard-coded to 500px (line 378)? Both _showYoutubeVideo (line 367) and _showInstagramVideo (line 385) use the data-width value before falling back.

Am I missing something or might this just be an oversight?

_showVimeoVideo(id, $containerForElement) {
    let width = 500
    let height = this._$element.data('height') ||  width / ( 560/315 )
    return this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement)
}
CydGoblin commented 7 years ago

I think it's for a minimum/default size, you can change it in options or with data-width

joemaller commented 7 years ago

@Turqueso Doesn't work. Vimeo's width is hard-coded to 500px. If we change line 378 to match the other two it works:

    let width = this._$element.data('width') || 612
joemaller commented 7 years ago

I'm testing this to see if there's something I'm not understanding. Minor as it is, I'll have a PR shortly.

joemaller commented 7 years ago

Actually it's already there. #239 is exactly what I was going to do. Can we get that merged?

joemaller commented 7 years ago

Fixed in 92693291cc9c1cc52d085b1. Thanks!

ashleydw commented 7 years ago

👍 Once I've figured out #244 I'll release this fix