Ultrashock Forums > Flash > ActionScript
Problems with streaming in Safari

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Problems with streaming in Safari
Old 2008-04-01

Hello

I have a big problem with my custom media player. Everything works fine on PC (ff, ie, even on Safari for PC), but on Safari (Mac) I hear a sound with 30-60 seconds delay. For streaming I'm using qbrick (www.qbrick.com), and this is the code for media player:

_root.soundControl.setVolume(30);
myReceiver = new LocalConnection();
myReceiver.connect("myConnections");
myReceiver.myAction = function(id) {
_root.LoadMe(id);
};
myReceiver.stopplay = function(id) {
_root.ns_mp3.pause();
_root.ispause=true;
_root.pause.offOn.gotoAndPlay("to off");
};

_root.setStartVolume=true;

_root.LoadMe("default");
function LoadMe(id){
_root.externalXML = new XML ();
_root.externalXML.onLoad = onComplete;
var action:String = "get.php?id="+id+"&action=songxml";
//_root.externalXML.load ("designer.xml");
_root.externalXML.load (action);
XML.prototype.ignoreWhite = true;
_root.id=id;

function onComplete(){
var itemName:String = _root.externalXML.firstChild.attributes.name;
var itemLength:Number = _root.externalXML.firstChild.childNodes.length;
_root.songList=new Array();
for (var i:Number = 0; i < itemLength; i++) {
_root.songList[i] = new Array();
_root.songList[i][0]=_root.externalXML.firstChild.childNodes[i].attributes['path'];
_root.songList[i][1]=itemName;
_root.songList[i][2]=_root.externalXML.firstChild.childNodes[i].attributes['artist'];
_root.songList[i][3]=_root.externalXML.firstChild.childNodes[i].attributes['name'];
}
playSongs();
if(_root.setStartVolume){
_root.soundControl.setVolume(30);
_root.setStartVolume=false;
}
}

function playSongs(){
_root.mycount=0;
_root.nc = new NetConnection();
_root.nc.onStatus = function(info) {trace(info.code);}
_root.nc.connect("rtmp://qstream-fl0.qbrick.com/05966");
_root.ns_mp3 = new NetStream(_root.nc);
_root.ns_mp3.onStatus = function(info) {trace(info.code);}

_root.ns_mp3.onPlayStatus = function(info) {
_root.mycount++;
count=_root.mycount;
_root.ns_mp3.play("mp3:"+songList[count][0]);
_root.track.dataDisplay.displayMC.song.text=songList[count][3];
_root.track.dataDisplay.displayMC.artist.text=songList[count][2];
_root.track.dataDisplay.displayMC.kanal.text=_root.songList[count][1];
}
_root.ns_mp3.play("mp3:"+songList[0][0]);
_root.track.dataDisplay.displayMC.song.text=songList[0][3];
_root.track.dataDisplay.displayMC.artist.text=songList[0][2];
_root.track.dataDisplay.displayMC.kanal.text=_root.songList[0][1];

_root.mc.attachAudio(_root.ns_mp3);
_root.soundControl = new Sound(_root.mc);

}
}
stop();
If anyone can help, that would be great .

Thanks

// Faruk Hadzic
postbit arrow 1 comment | 607 views postbit arrow Reply: with Quote   
Registered User
DeepSun is offline
seperator
Posts: 16
2006-06-10
DeepSun lives in Croatia
seperator

Ultrashock Member Comments:
DeepSun DeepSun is offline DeepSun lives in Croatia 2008-04-02 #2 Old  
It looks like this is the bug in version 9.0.145 of flash player for Mac.
LINK

Maybe it could help someone with the same problem ...

Ciao

// Faruk
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: