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

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

Why is this video not showing?

I realise this sounds like a very basic question and if it is actually showing up properly for people (which right now seems like pot luck) with its controls then you may not be able to troubleshoot it.

I'm doing a blog post about the HTML5 Video element at the moment debugging issues such as these.

http://www.jonniegrieve.co.uk/lab/video/video.html

Here's my code.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>HTML Video and Audio</title>

        <link rel="stylesheet" href="css/normalize.css">
        <link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
    </head>

    <body>
    <h1>Basic HTML Video</h1>

    <video autoplay controls>
        <source src="olympic.mp4" type="video/mp4">
        <source src="olympic.ogg" type="video/ogg"> <!-- -->
        <source src="olympic.webm" type="video/webm">
        <track label="English" kind="subtitles" srclang="en" src="caption.vtt" default>

    </video>

    </body>

</html> 

The files are all uploaded. The video files are all relative in the same folder as the HTML file. The src and types are all correct I'm sure. It's all valid HTML.

From my perspective, the video works on my desktop, but not my laptop.

Any video guru's might know what's wrong because I'm out of ideas :/

video seems to be working for me. firefox 33.1

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,254 Points

Hi there,

Indeed, I've done the research into the latest browser support for the video element and the formats. With the code I have, I should be able to display the video for most if not all browsers.

I have Chrome 38 on my netbook and desktop. Both Windows 7 machines. The desktop shows the video just fine. But my netbook doesn't. I'm at a loss to explain why. :/

Any ideas Nick Pettit or Guil Hernandez ? :-)

1 Answer

Hi Jonathan,

Everything is okay for me using Safari V6.1.6 on my MacBook Pro

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,254 Points

I wish I knew what was up. Most people I've ask seemed to be ale to access it though which is encouraging! :)