Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
David Goldberg407 Points
Video fallback for full width hero video when using CMS component?
Wondering what the best solution is for providing fallback for video if not supported.
<div class="container"> <video autoplay="" loop="" preload="" poster="https://cms.com/file.jpg"> <source src="https://example.com/file.mp4" type="video/mp4"> <source src="https://example.com/file.webm" type="video/webm"> <source src="https://example.com/file.ogv" type="video/ogg"> </video> </div>
You could degrade gracefully by putting a background on the container but the background would be supplied via the CMS, so it would be different per new instance/post.
I guess you could:
- Inline the background css on the container
Anyone have any preferred solutions or suggestions?