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

Shay Paustovsky
Shay Paustovsky
969 Points

Viewing HTML media offline

Just a general question which I was wondering about: Can you preview media (<video> <audio>) if your web page isn't on a server, i.e (viewing it from your computer.

Thanks, Shay

2 Answers

A.J. Kandy
PLUS
A.J. Kandy
Courses Plus Student 12,422 Points

Yes, if the folder structure of the site is replicated on your local machine, and the media is stored there, you should be able to preview them simply by opening the HTML file in your browser. (If you make any changes to that code, you will need to hit Refresh to see them.)

There are more sophisticated tools you can install for local development, if you get into developing sites with PHP, Node.js or Sass, but I think for basic HTML/CSS that ought to work fine.

Shay Paustovsky
Shay Paustovsky
969 Points

Thank you Kandy, I was really wondering about this topic because I've assigned the src for the video element to an online video and it didn't show up. Guessing it was because it works only if your site is on a server. But if the file is on my machine than it would work right?