Change Audio and Video support detection method for Safari3.
Safari3 incorrectly reports that audio/video are supported when using !!element.play, but correctly reports that audio/video are not supported using
!!element.canPlayType. This was verified to work and pass tests on the following versions of Safari: Safari 3.2.1, Safari 4.0.5, and Safari 5.0.4.
Review at http://gwt-code-reviews.appspot.com/1423802
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10008 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/media/client/Audio.java b/user/src/com/google/gwt/media/client/Audio.java
index f5100f7..902293f 100644
--- a/user/src/com/google/gwt/media/client/Audio.java
+++ b/user/src/com/google/gwt/media/client/Audio.java
@@ -80,7 +80,7 @@
* @return true if supported, false otherwise.
*/
static native boolean isSupportedRunTime(AudioElement element) /*-{
- return !!element.play;
+ return !!element.canPlayType;
}-*/;
/**
diff --git a/user/src/com/google/gwt/media/client/Video.java b/user/src/com/google/gwt/media/client/Video.java
index f3dcd8a..571af74 100644
--- a/user/src/com/google/gwt/media/client/Video.java
+++ b/user/src/com/google/gwt/media/client/Video.java
@@ -78,7 +78,7 @@
* @return true if supported, false otherwise.
*/
static native boolean isSupportedRunTime(VideoElement element) /*-{
- return !!element.play;
+ return !!element.canPlayType;
}-*/;
/**
@@ -143,7 +143,7 @@
/**
* Creates a Video widget with a given source URL.
- *
+ *
* @param src a String URL.
* @deprecated use {@link #createIfSupported()}.
*/