Safari vs. FireFox

We have a page that works in FireFox but NOT in Safari.

http://aquascapegetyourfeetwet.com/play_vid_onlyjs.htm

In FireFox it plays; in Safari I just get a black box.

Why does it not work in Safari?
Richard KortsAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
replace :
	var myVideo = document.getElementById("video1");
	ac = "";

Open in new window

by :
	var myVideo
                var ac = "";
        window.onload = function() {
               myVideo  = document.getElementById("video1");
        }

Open in new window

0
 
nickinthoozCommented:
Safari needs quicktime to play html5 video's.  Install the latest version of quicktime and try it again.  zencdn uses html5.

If that doesn't help.  Check your .htaccess and MIME types.
0
 
Richard KortsAuthor Commented:
To leakim971

Did that. Still the same.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Richard KortsAuthor Commented:
To nickinthooz

We have no control over what the end user has configured. We just want this to PLAY, regardless of the browser.

I am testing on an iPad, I have NO IDEA how to equip iPad with Quick Time be it doesn't matter.
0
 
leakim971PluritechnicianCommented:
To leakim971

Did that. Still the same.

I don't see any change in the page
0
 
leakim971PluritechnicianCommented:
OK, I see you add the code now, work for me now, check attachment
Clipboard02.jpg
0
 
Richard KortsAuthor Commented:
To leakim971

OK, here'e the source for the upper part:

<!doctype html>
<html  lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" />

<title>Play Video</title>
<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/c/video.js"></script>
<script language="JavaScript" type="text/javascript">
      var myVideo
        var ac = "";
        window.onload = function() {
               myVideo  = document.getElementById("video1");
        }
      function do_init() {
            document.getElementById("scode").disabled=true;
            document.getElementById("subgo").disabled=true;
            window.setTimeout("see_if_done()", 1000);
      }      
      function see_if_done() {
            var myVideo = document.getElementById("video1");
                  if (myVideo.ended) {
                        code = "THE CODE";
                        document.getElementById("scode").disabled=false;
                        document.getElementById("subgo").disabled=false;
                        alert("Enter your code of " + code + " now and click Go.");
                        
                  } else {
                        window.setTimeout("see_if_done()", 1000);
                  }
            return true;
      }
      function chk_vals() {
            if (ac != "p") {
                  if (document.fr.scode.value == "") {
                        alert("Please enter your code.");
                        return false;
                  }
                  return true;            
            } else {
                  return false;
            }      
      }
function vid_play_pause() {
      var myVideo = document.getElementById("video1");
  if (myVideo.paused) {
    myVideo.play();
  } else {
    myVideo.pause();
  }
  return true;
}
0
 
Richard KortsAuthor Commented:
To To leakim971

Doesn't work on iPad.

I'll ask my partner to try on Safari on a computer.

Thanks
0
 
leakim971PluritechnicianCommented:
I'm on PC, I got the problem on Chrome but now it work once you add the window.onload = function() {} block
Don't forget to clear the browser cache
0
 
Obadiah ChristopherConnect With a Mentor Commented:
For me it doesn't even work in IE9 on Windows Vista, but works in Firefox.
0
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
We just want this to PLAY, regardless of the browser.

Since nothing ever plays without a player, that is just not your choice.  In theory, some browser will play HTML5 videos but as shown in one of your previous questions, you have to add adequate detail to make that happen.  You can't just put something up and think it will automagically play.
0
 
mcnuteConnect With a Mentor Commented:
your video work on my safari on mac osx Lion. Although it takes a little longer than in chrome to start.

video js may be your choice. It overcomes all html5 video differences through browsers. For older IE versions there is a flash player fallback integrated.

To make your video play in all browsers you'll need them converted in at least three formats:
flv, ogg and mp4 for safari.

Your mp4 files must have the mov atom meta data file in the beginning of the file, otherwise the browser will first download the whole video and then actually play the video.
More about that here:
http://www.adobe.com/devnet/video/articles/mp4_movie_atom.html
http://drupal.org/node/1565532
0
 
Richard KortsAuthor Commented:
The problem is NOT solved. Points awarded based on effort.

We used a custom developed solution in Jquery.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.