Embeding Video in Safari

Discussion in 'Mac Apps and Mac App Store' started by alntke, May 17, 2011.

  1. alntke macrumors newbie

    Joined:
    May 9, 2011
    #1
    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.
     
  2. MacBoobsPro macrumors 603

    MacBoobsPro

    Joined:
    Jan 10, 2006
    #2
    I am in no way a code monkey but dont you need <video/> first?
     
  3. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #3
    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.
     
  4. alntke thread starter macrumors newbie

    Joined:
    May 9, 2011
    #4
    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.
     

Share This Page