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! While you're at it, check out some resources Treehouse students have shared here.

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

HTML HTML Video and Audio (Retired) Media Basics The Source Element

Tracy Excell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

Embedded HTML video not working in Edge or Explorer?

Hello,

I am working on a video project and have embedded videos into my HTML:

<video controls> <source src="video/video2.ogg" type="video/ogg">

            <source src="video/video1.mp4" type="video/mp">

</video>

It opens in chrome, but not Edge or explorer. I was hoping that the mp / ogg options would allow for it to run in a variety of browsers. What do I need to do to ensure that my videos will play in all / most browsers?

Thank you

Annet de Boer
Annet de Boer
900 Points

I don't have Edge or Explorer myself, but does this one work in those browsers for you? http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_video_controls

Tracy Excell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

I found this and think I need to add another video type:

HTML Video - Media Types File Format Media Type MP4 video/mp4 WebM video/webm Ogg video/ogg

1 Answer

Hi Tracy, i think you forgot the "4" from mp4 in your <source> tag. it should be

<source src="video/video1.mp4" type="video/mp4">