<?php 

if( strstr($_SERVER['HTTP_USER_AGENT'],'Android') ||
    strstr($_SERVER['HTTP_USER_AGENT'],'webOS') ||
    strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||
    strstr($_SERVER['HTTP_USER_AGENT'],'iPod') ){
    echo "<audio controls autoplay><source src=\"http://live.piratefm.ro:12000/\" type=\"audio/mp3\">Your browser does not support the audio element.</audio>";
}
else{
    echo "<embed width=\"90%\" height=\"35\" src=\"http://player.wavestreamer.com/cgi-bin/player2.swf\" flashvars=\"skin=http://player.wavestreamer.com/cgi-bin/bluemetal/bluemetal.swf&amp;title=Live Stream&amp;type=sound&amp;file=http://89.33.242.101:12000/;s.mp3&amp;13142580629&amp;duration=99999&amp;id=scplayer&amp;=true&amp;volume=100&amp;autostart=true&amp;\"></embed>";
}

?>  

Simple stuff, I have a radio website and I want to handle players differently, since all phones now, as they say, support html5, why not use it? I want flash on desktops because older browsers won't work with html.

The stream won't play on android 4.2.2, neither in chrome or it's native browser. The stream plays fine on iphone in chrome and native browser.

What the hell is wrong with it and what alternative do I have?

edit::: the player appears, but it won't let the play button be pushed. Sort of like it's always buffering. Connection is stable 3g and can easily handle the data. Also ram's free.

edit2::: now chrome is working. native android browser still not.

没有正确的解决方案

其他提示

I'm not an expert but I think everything's fine but the autoplay, it is a boolean attribute so you should only type autoplay. Maybe it is causing an error. Have you tried that?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top