diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-20 04:22:14 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-20 04:22:14 +0000 |
commit | b28c8ea49f75add9b2b97f9077ea8a6695f95a9a (patch) | |
tree | 40a2c1d07f592abe9a28dcd49e7a7349f8da7f16 | |
parent | b5e76905c209b753b007754074ad87d4b6180727 (diff) | |
download | ampache-b28c8ea49f75add9b2b97f9077ea8a6695f95a9a.tar.gz ampache-b28c8ea49f75add9b2b97f9077ea8a6695f95a9a.tar.bz2 ampache-b28c8ea49f75add9b2b97f9077ea8a6695f95a9a.zip |
tweak javascript so Flashplayer works on the Wii browser
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/class/stream.class.php | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index eeb69c71..769fd5c3 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.4-Alpha3 + - Added tweak for Wii so that Flash player opens in current window + (Thx Dgn) - Fixed bug where Ampache would incorrectly search for album art when config option was empty (Thx Karl Hungus) - Enabling a Localplay Method will now set Allow Localplay to true diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index def353d5..8fa18e81 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -417,9 +417,16 @@ class Stream { echo "<script language=\"javascript\" type=\"text/javascript\">\n"; echo "<!-- begin\n"; echo "function PlayerPopUp(URL) {\n"; - echo "window.open(URL, 'XSPF_player', 'width=400,height=170,scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0');\n"; - echo "window.location = '" . return_referer() . "';\n"; - echo "return false;\n"; + // We do a little check here to see if it's a Wii! + if (false !== stristr($_SERVER['HTTP_USER_AGENT'], 'Nintendo Wii')) { + echo "window.location=URL;\n"; + } + // Else go ahead and do the normal stuff + else { + echo "window.open(URL, 'XSPF_player', 'width=400,height=170,scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0');\n"; + echo "window.location = '" . return_referer() . "';\n"; + echo "return false;\n"; + } echo "}\n"; echo "// end -->\n"; echo "</script>\n"; |