-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CSS based change to allow Youtube HD video if screen size permits #73
Comments
also - I have to assume someone else has had the same idea and updated this css with 20 different screen types and appropriate popup sizes ? if so, I would love for a dwonload link |
Can you provide me with a link to the implementation for testing? |
sure.. sorry for the delay. I created a jsfiddle. uses the video link as //www.youtube.com/embed/GjMuvAHgx5E?vq=1080p&rel=0&showinfo=0&autoplay=1 the vq=1080p allows for HD play but wont play HD unless iframe size is minimum 1280x720. the css code is below .lightbox {
|
any updates - wondering if you would use this to add a few more items - so the video resizing is automatic for different media screens - thanks |
I have a somehow similar problem: linking to a youtube video doesn't allow fullscreen. This can be easily changed by adding the allowfullscreen attribute to the generated iframe. .attr("allowfullscreen", "true") Obviously this would add the attribute also to not youtube links, but that wouldn't do any harm. Any chance this change will be included in the plugin itself. So updating would be an option. iframe: { |
@ahutatatong Please open a different issue... |
I would like to suggest the following request to be added.to your framework.
I found this to be the simplest way to get a youtube video to popup - but since It take regular links I want to be able to provide a option from youtube that forces HD video. however - since the hardcoded youtube sizes less than 1280x720 does not allow for HD and goes down to 480P, I would request to add media screen options to allow for different video sizes based on screen size.
the cool thing is - once you start in HD - the fl popup is responsive and scales down - but is still HD.
I used the following in featherlight.css - and added the class "flvids" to the youtube link next to "lightbox"
@media (min-width: 1280px) {
.flvids {
width: 1280px;
height: 720px;
}
}
@media (max-width: 1280px) {
.flvids {
width: 720px;
height: 480px;
}
}
html code...
<iframe class="lightbox flvids" src="//www.youtube.com/embed/youtubeID?vq=1080p&rel=0&showinfo=0&autoplay=1" id="video1" style="border:none;" webkitallowfullscreen mozallowfullscreen allowfullscreen> </iframe>this allows me to use HD option when the browser is full screen mode - and if not - that's cool too.
I am sure there are better ways to force HD for various screen when using youtube. I searched a bit - and couldn't find one. I am sure you'll improve or point me to something way better.
Does that make sense ?
very cool plugin.
The text was updated successfully, but these errors were encountered: