home *** CD-ROM | disk | FTP | other *** search
- class mx.controls.streamingmedia.PlayerNetStream extends NetStream
- {
- var _player;
- var initId;
- function PlayerNetStream(nc, aPlayer)
- {
- super(nc);
- this.setPlayer(aPlayer);
- }
- function getPlayer()
- {
- return this._player;
- }
- function get player()
- {
- return this.getPlayer();
- }
- function setPlayer(aPlayer)
- {
- this._player = aPlayer;
- }
- function set player(aPlayer)
- {
- this.setPlayer(aPlayer);
- }
- function pause(shouldPause)
- {
- super.pause(shouldPause);
- }
- function setBufferTime(time)
- {
- super.setBufferTime(time);
- }
- function play(name, st, len, reset)
- {
- super.play(name,st,len,reset);
- }
- function seek(offset)
- {
- super.seek(offset);
- }
- function close()
- {
- super.close();
- }
- function attachAudio(theMicrophone)
- {
- super.attachAudio(theMicrophone);
- }
- function attachVideo(theCamera, snapshotMilliseconds)
- {
- super.attachVideo(theCamera,snapshotMilliseconds);
- }
- function onStatus(info)
- {
- var _loc2_ = this.getPlayer();
- switch(info.code)
- {
- case "NetStream.Buffer.Full":
- break;
- case "NetStream.Play.Start":
- this.initId = setInterval(this,"detect",10);
- break;
- case "NetStream.Pause.Notify":
- break;
- case "NetStream.Play.Stop":
- _loc2_.playStopped();
- break;
- case "NetStream.Play.Failed":
- case "NetStream.Play.StreamNotFound":
- var _loc3_ = undefined;
- _loc3_ = "Error playing URL: " + info.description;
- _loc2_.logError(_loc3_);
- }
- }
- function detect()
- {
- var _loc2_ = this.getPlayer();
- if(_loc2_.isSizeSet())
- {
- clearInterval(this.initId);
- _loc2_.bufferIsFull();
- }
- }
- }
-