/plugins/bwcheck/src/actionscript/org/flowplayer/bwcheck/detect/BandwidthDetectorRed5.as
ActionScript | 47 lines | 26 code | 10 blank | 11 comment | 1 complexity | 7e72a905932493c892dfbb9c66284745 MD5 | raw file
Possible License(s): MIT, BSD-3-Clause
- /*
- * This file is part of Flowplayer, http://flowplayer.org
- *
- * By: Daniel Rossi, <electroteque@gmail.com>, Anssi Piirainen Flowplayer Oy
- * Copyright (c) 2008-2011 Flowplayer Oy *
- * Released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- */
- package org.flowplayer.bwcheck.detect {
- import flash.net.Responder;
- import org.flowplayer.bwcheck.detect.AbstractDetectionStrategy;
- /**
- * @author danielr
- */
- public class BandwidthDetectorRed5 extends AbstractDetectionStrategy {
- private var info:Object = new Object();
- public function BandwidthDetectorRed5() {
- _service = "bwCheckService.onServerClientBWCheck";
- }
- public function onBWCheck(obj:Object):void {
- dispatchStatus(obj);
- }
- public function onBWDone(obj:Object):void {
- dispatchComplete(obj);
- }
- override public function connect(host:String = null):void {
- connection.connect(host);
- }
- protected function onStatus(obj:Object):void {
- switch (obj.code) {
- case "NetConnection.Call.Failed":
- dispatchFailed(obj);
- break;
- }
- }
- }
- }