0
<!DOCTYPE html>
<html>
    <head>
        <title>Adding a Flash Video</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
        <script type="text/javascript">
            var flashvars = {};
            var params = {
            movie:"../video/puppy.flv" };
            swfobject.embedSWF("flash/osplayer.swf", "snow", "400", "345", "8.0.0", flashvars, params);
            </script>
    </head>
    <body>
        <div id="snow">
            <p>A video of a puppy playing in the snow</p>
        </div>
    </body>
</html>

This code is taken from the book HTML & CSS by Jon Duckett . I copied the code as it is from the book and checked that all files are in their correct position in the directory . This does show the video player on my website when i open it directly by double clicking on the html file but it does not PLAY the video when i click on the play button in the video player . I then discovered that when i run this website on a localhost server using XAMPP , it works perfectly fine . Can anyone tell me why is this happening ?

ResonateAlpha
  • 33
  • 1
  • 6
  • Are there any errors in the console ? – Avijit Gupta Sep 29 '16 at 10:41
  • "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." That's all the console says . http://www.htmlandcssbook.com/code-samples/ You can download the code + assets from this site . The code is in chapter 9 folder ,inside "Adding a flash video" – ResonateAlpha Sep 29 '16 at 12:10
  • that can be easily resolved by adding `` inside `...`. No error pops up in the console when you try and play it ? – Avijit Gupta Sep 30 '16 at 05:32
  • @AvijitGupta Now the console error doesn't appear but the video is still not playing . It plays on the book's website but it doesn't play locally . No console error pop up when i click on play button . – ResonateAlpha Oct 04 '16 at 13:12

0 Answers0