Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alntke

macrumors newbie
Original poster
May 9, 2011
3
0
Hi All,

Below is the sample code which I am using for embeding video in Safari.
But instead of playing the file it is opening the html code as such in the Safari browser.

<!DOCTYPE html>
<html>
<body>
<video width="640" height="360" poster="poster.jpg" controls autoplay>
<source src="Screen_4.mov";type="video/mp4">
</source>
</video>
</body>
</html>

Am I am missing some settings on the server. Any help will be appreciated.
 
Hi All,

Below is the sample code which I am using for embeding video in Safari.
But instead of playing the file it is opening the html code as such in the Safari browser.

<!DOCTYPE html>
<html>
<body>
<video width="640" height="360" poster="poster.jpg" controls autoplay>
<source src="Screen_4.mov";type="video/mp4">
</source>
</video>
</body>
</html>

Am I am missing some settings on the server. Any help will be appreciated.

I am in no way a code monkey but dont you need <video/> first?
 
<!DOCTYPE html>
<html>
<body>
<video width="640" height="360" poster="poster.jpg" controls autoplay>
<source src="Screen_4.mov";type="video/mp4">
</source>
</video>
</body>
</html>

Get rid of that semicolon for one thing. It should just be a space. Also, if you want valid code it should be
Code:
controls="controls"
and
Code:
autoplay="autoplay"
Other than that, make sure the path to your video file is correct.
 
Hi Titan,

I have made the changes suggested by you but still Safari displays the source code instead of the html page.
Is there some setting on the server which I am missing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.