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
Zach Allan
19,452 PointsWeb Server for Remote Files?
Why do I need to run a web server (e.g. MAMP) to play video and audio files locally that come from a remote source?
The video and audio files are working just fine running them locally. I don't see why I have to run a web server. Nick Pettit mentioned something about same-origin policy. What does this mean?
Zach Allan
19,452 PointsIt's from the video: 'The Video Element' (https://teamtreehouse.com/library/html-video-and-audio/media-basics/the-video-element) in the HTML Video and Audio course. It explains in the teacher notes...
Jason Anello
Courses Plus Student 94,610 PointsI'm not sure. I tried it myself and it works.
I saw that you had asked this question earlier and tagged Nick. We can see if there's any response in that one.
1 Answer
Margeaux Spring
34,865 Pointsthis might help clarify-from MDN "The same-origin policy restricts how a document or script loaded from one origin can interact with a resource from another origin. Same-origin Policy is used as a means to prevent some of the Cross-site Request Forgery attacks."
https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
Zach Allan
19,452 PointsThanks!
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Zack,
Which video is this from and could you post your video markup that you're using?