package imeem.api.player
{
import _11.*;
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import imeem.api.*;
import imeem.api.crypto.*;
import imeem.api.events.*;
import imeem.api.player.core.*;
import imeem.api.results.*;
import imeem.api.utils.*;
import mx.events.*;
public class MediaPlayer extends Sprite implements IMediaPlayer
{
private var _isPrimary:Boolean = false;
private var _playlistID:String = "";
private var _status:String = "stopped";
private var _imeem:Imeem = null;
private var _mediaHitInfo:MediaHitInfo = null;
private var _loadingMediaID:String = null;
private var _allowHDVideo:Boolean = false;
private var _currentMediaID:String = null;
private var _videoContainer:DisplayObjectContainer = null;
private var _mediaHitTimer:Timer = null;
private var _referrer:String = null;
private var _video:Video = null;
private var _featured:Boolean = false;
private var _usePlayerLock:Boolean = true;
private var _stream:MediaStream = null;
private var _quantCast:Quantcast;
private var _checkPlayerLockTimer:Timer = null;
private var _apiParams:Object = null;
private var _enableMediaHits:Boolean = true;
private var _preserveAspectRatio:Boolean = false;
private var _skipNextAdCheck:Boolean = false;
private var _checkForSinglePlayerAudioAd:Boolean = false;
private static const WARNING_VIDEO_OBJECT_STOLEN:String = "Warning: You are in violation of terms of service. You cannot add the video object to another container. Use MediaPlayer.setVideoDisplay() instead!";
private static const REFERRER_ENCRYPTION_KEY:String = "faad2ae444233f97367cc35da6de80b51767f182";
private static const REFERRER_TIMESTAMP_THRESHOLD:int = 30000;
public static const STOPPED:String = "stopped";
public static const PLAYING:String = "playing";
private static var QUANTCAST_DATA_SENT:Boolean = false;
public static const PAUSED:String = "paused";
private static const CHECK_PLAYER_LOCK_TIMER_FREQUENCY:int = 100;
private static const MEDIA_HIT_TIMER_FREQUENCY:int = 1000;
private static const DEFAULT_BUFFER_TIME:int = 3;
public function MediaPlayer(param1:String, param2:String, param3:String, param4:Object = null) : void
{
;
var _loc_6:* = param2;
var _loc_7:* = true / (false <= this) - 1 > ~new activation;
if (_loc_7)
{
do
{
}
authenticateRequest(param4, param3);
setAuthTokens(param1, param2);
if (!(_loc_6 && param1))
{
}while (true)
}
var _loc_5:* = new NetConnection();
if (_loc_7 || param1)
{
do
{
return;
setReferrer(param3);
if (!(_loc_6 && param3))
{
}while (true)
PlayerLock.instance.addEventListener(MediaEvent.MEDIA_FORCE_PAUSE, onForcePauseEvent);
}
if (_loc_7)
{
do
{
_checkPlayerLockTimer.start();
do
{
_checkPlayerLockTimer.addEventListener(TimerEvent.TIMER, onCheckPlayerLockTimerEvent);
}
}while (true)
_checkPlayerLockTimer = new Timer(CHECK_PLAYER_LOCK_TIMER_FREQUENCY);
}while (true)
_mediaHitTimer.start();
if (_loc_7)
{
;
param3 = _loc_6;
default xml namespace = this;
do
{
_mediaHitTimer.addEventListener(TimerEvent.TIMER, onMediaHitTimerEvent);
}
if (_loc_7 || this)
{
do
{
_mediaHitTimer = new Timer(MEDIA_HIT_TIMER_FREQUENCY);
}while (true)
_videoContainer = GenericFactory.wrapInContainer(_video, onVideoDisplayResizeEvent);
}while (true)
_video.attachNetStream(_stream);
}
}
do
{
_video = new Video();
if (_loc_7)
{
do
{
if (!(_loc_6 && param2))
{
_stream.addEventListener(MediaEvent.MEDIA_ERROR, onMediaErrorEvent);
}while (true)
}
if (!(_loc_6 && param1))
{
_stream.addEventListener(MediaEvent.MEDIA_DONE_BUFFERING, onMediaDoneBufferingEvent);
}while (true)
}
_stream.addEventListener(MediaEvent.MEDIA_BUFFERING, onMediaBufferingEvent);
if (_loc_7)
{
do
{
_stream.addEventListener(MediaEvent.MEDIA_END, onMediaEndEvent);
}
do
{
_stream.addEventListener(MediaEvent.MEDIA_START, onMediaStartEvent);
}while (true)
_stream.bufferTime = DEFAULT_BUFFER_TIME;
}while (true)
;
param2 = param2;
(null * >> true < (param2 - 1))._stream = new MediaStream(_loc_5);
;
_loc_5.connect(null);
}
;
return;
}// end function
public function get enableMediaHits() : Boolean
{
return _enableMediaHits;
return;
}// end function
public function set enableMediaHits(param1:Boolean) : void
{
;
var _loc_2:* = -(null + (-(null + (null instanceof (true << false in null)))));
;
var _loc_3:* = null ^ null - ((null ^ null + null[(null == null) < null]) - 1);
;
this = _loc_2 === param1;
if (null * (_loc_2 < null) - 1)
{
}
if (!param1)
{
_enableMediaHits = param1;
}
return;
return;
}// end function
private function onMediaHitTimerEvent(event:TimerEvent) : void
{
;
var _loc_5:Boolean = false;
var _loc_6:Number = undefined;
var _loc_2:Number = NaN;
if (_loc_6)
{
do
{
dispatchEvent(new MediaEvent(MediaEvent.MEDIA_THIRTYSECONDS));
if (!(_loc_5 && event))
{
if (_loc_6 || this)
{
_mediaHitInfo.status = MediaHit.THIRTY_SECS_AUDIO;
}while (true)
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.THIRTY_SECS_AUDIO);
do
{
if (!(_mediaHitInfo.status == MediaHit.TWENTY_SECS_AUDIO)) goto 207;
do
{
}
if (_loc_6 || _loc_3)
{
_mediaHitInfo.status = MediaHit.TWENTY_SECS_AUDIO;
}while (true)
if (!_loc_5)
{
if (!(_loc_2 >= 21)) goto 415;
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.TWENTY_SECS_AUDIO);
}while (true)
}
if (!(_mediaHitInfo.status == MediaHit.TEN_SECS_AUDIO)) goto 737;
if (_loc_6)
{
do
{
_mediaHitInfo.status = MediaHit.TEN_SECS_AUDIO;
do
{
if (!(_loc_2 >= 11)) goto 903;
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.TEN_SECS_AUDIO);
}while (true)
do
{
}
if (!(_mediaHitInfo.status == MediaHit.START)) goto 1083;
}while (true)
}
_mediaHitInfo.status = MediaHit.THIRTY_SECS_VIDEO;
do
{
if (!(_loc_2 >= 31)) goto 1213;
if (!(_loc_5 && event))
{
;
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.THIRTY_SECS_VIDEO);
do
{
if (!(_mediaHitInfo.status == MediaHit.TWENTY_SECS_VIDEO)) goto 1380;
}while (true)
_mediaHitInfo.status = MediaHit.TWENTY_SECS_VIDEO;
}
if (!_loc_5)
{
}while (true)
if (!(_loc_2 >= 21)) goto 1569;
}
if (!_loc_5)
{
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.TWENTY_SECS_VIDEO);
if (!_loc_5)
{
do
{
}while (_mediaHitInfo.video != true)
if (!(_mediaHitInfo.status == MediaHit.START)) goto 1793;
do
{
_mediaHitInfo.status = MediaHit.START;
}
}while (true)
}while (true)
}
if (_loc_6)
{
if (!_loc_5)
{
_imeem.playerServices.logFullLengthMusicMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.START);
do
{
do
{
if (!(_mediaHitInfo.sample == true)) goto 2071;
}
_imeem.playerServices.logSampleMusicMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.START);
do
{
if (!(_loc_2 >= 1)) goto 1875;
}while (_mediaHitInfo.video != true)
if (_mediaHitInfo.sample == true)
{
}while (true)
}
}
_imeem.playerServices.logFullVideoMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.START);
}
do
{
if (!_loc_5)
{
if (!(_mediaHitInfo.status == MediaHit.NONE)) goto 2235;
if (!_loc_5)
{
}while (true)
if (_loc_6)
{
_loc_2 = this.trackPosition;
}while (true)
if (_loc_6)
{
}
if (!(_mediaHitInfo != null)) goto 2416;
do
{
}
continue;
}
}while (true)
if (_loc_6)
{
var _loc_3:* = _mediaHitInfo;
if (!(_loc_5 && this))
{
}
var _loc_4:* = _mediaHitInfo.accumulatedPlay + 1;
if (!_loc_5)
{
_loc_3.accumulatedPlay = _loc_4;
}
do
{
if (!(_loc_5 && _loc_3))
{
_mediaHitInfo.accumulatedPlayHitSent = true;
}
}
if (!_loc_5)
{
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.ACCUMULATED);
}
}while (true)
}
if (_loc_6 || _loc_2)
{
}
if (!(_mediaHitInfo.accumulatedPlayHitSent == false)) goto 2704;
}
;
if (_loc_6)
{
var _loc_3:* = _mediaHitInfo;
if (_loc_6)
{
}
var _loc_4:* = _mediaHitInfo.linearPlay + 1;
if (_loc_6)
{
_loc_3.linearPlay = _loc_4;
}
do
{
return;
if (_loc_6)
{
_mediaHitInfo.linearPlayHitSent = true;
}while (true)
}
}
if (_loc_6)
{
if (_loc_6)
{
if (!(_mediaHitInfo.linearPlay >= 30)) goto 2959;
if (_loc_6)
{
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.LINEAR);
}
;
}
;
if (this == this || _loc_3)
{
}
}
;
return;
}// end function
private function set _892481550status(param1:String) : void
{
var _loc_2:Boolean = true;
;
var _loc_3:String = null;
if (_loc_2 || param1)
{
do
{
return;
;
default xml namespace = param1;
this = (-undefined << param1) - 1;
}while (this.status != MediaPlayer.PLAYING)
if (_loc_2 || param1)
{
;
_loc_3 = (null * (this as ) as _loc_2) >= false;
(null * false[this]).onCheckPlayerLockTimerEvent(null);
}
}
;
_status = param1;
;
return;
}// end function
private function authenticateRequest(param1:Object, param2:String) : void
{
var _loc_8:Boolean = true;
;
var _loc_9:Number = undefined;
var _loc_4:String = null;
var _loc_5:Number = NaN;
var _loc_6:Number = NaN;
var _loc_7:String = null;
if (_loc_8 || _loc_3)
{
if (_loc_8 || this)
{
}
if (!_loc_9)
{
if (param1.md5 != null)
{
}
}
}
if (!_loc_9)
{
if (!(_loc_9 && _loc_3))
{
}
}
var _loc_3:* = param1.currentTime != null;
if (!_loc_9)
{
do
{
return;
}while (true)
_referrer = "";
if (_loc_8)
{
if (!_loc_9)
{
;
do
{
if (_loc_8)
{
}
}
continue;
_referrer = "";
}
if (!(_loc_9 && _loc_3))
{
do
{
if (!_loc_9)
{
if (!(_loc_7 == _loc_4)) goto 314;
}
}
}while (true)
_loc_7 = MD5.hash(param2 + _loc_5 + REFERRER_ENCRYPTION_KEY);
}
}while (true)
_loc_6 = param1.currentTime;
if (_loc_8 || this)
{
do
{
_loc_5 = param1.md5Time;
;
with (null | null + (-null - 1)[null])
{
continue;
if (!(_loc_3 == true)) goto 206;
}
_loc_4 = param1.md5;
}while (true)
return;
}// end function
public function get trackLength() : Number
{
;
_loc_1 = null - (null in null);
return (null < NaN).duration;
return;
}// end function
public function get volume() : Number
{
;
_loc_3 = (null * (null - _stream) - 1 | null) <= null;
return (~null).volume;
return;
}// end function
public function stop() : void
{
;
with (true >> (false as !false))
{
var _loc_1:String = null;
var _loc_2:String = null;
if (!_loc_1)
{
;
do
{
return;
reset();
;
_loc_3 = _loc_1 / true;
}
}while (true)
if (!(_currentMediaID == null)) goto 49;
if (_loc_2)
{
return;
}
return;
}// end function
public function set usePlayerLock(param1:Boolean) : void
{
;
default xml namespace = null % (-(true >> false));
var _loc_2:* = true[new activation];
var _loc_3:String = null;
if (_loc_3)
{
_usePlayerLock = param1;
}
return;
return;
}// end function
private function onVideoDisplayResizeEvent(event:Event = null) : void
{
;
var _loc_5:* = null >>> (null >>> null * (true[false] === true[false]) + (true - 1));
var _loc_6:String = null;
var _loc_2:Number = NaN;
var _loc_3:Boolean = false;
var _loc_4:Number = NaN;
if (_loc_6)
{
do
{
return;
_video.height = _videoContainer.height;
if (_loc_6)
{
}while (true)
_video.width = _videoContainer.width;
}
if (_loc_6 || event)
{
do
{
do
{
_video.clear();
}
do
{
_video.y = (_videoContainer.height - _video.height) / 2;
if (!(_loc_5 && _loc_2))
{
}while (true)
_video.x = (_videoContainer.width - _video.width) / 2;
}
}while (true)
_video.width = _videoContainer.width;
do
{
_video.height = _videoContainer.width * _loc_4;
}
do
{
do
{
if (!_loc_5)
{
;
this = 1 / _loc_2[-(_loc_5 - (_loc_5 + 1))] == null;
if (null % null[_loc_2])
{
}
}
if (!(_loc_5 && _loc_3))
{
_loc_4 = null;
if (!_loc_5)
{
}while (true)
_video.width = _videoContainer.height * _loc_2;
}
}while (true)
if (_loc_6 || event)
{
}while (!_loc_3)
_video.height = _videoContainer.height;
do
{
}
_loc_3 = _videoContainer.height * _loc_2 < _videoContainer.width;
do
{
}
if (_loc_6 || _loc_2)
{
}while (_stream.nativeHeight <= 0)
if (!_loc_5)
{
}
_loc_2 = _stream.nativeWidth / _stream.nativeHeight;
}while (true)
}
if (_loc_6)
{
;
_loc_3 = _stream.nativeWidth <= 0;
if (!new activation) goto 610;
}while (true)
}
;
return;
}// end function
public function get featured() : Boolean
{
return _featured;
return;
}// end function
private function set _810883302volume(param1:Number) : void
{
var _loc_2:Boolean = true;
;
with (-null)
{
var _loc_3:* = null - 1;
if (_loc_2)
{
_stream.volume = param1;
}
return;
return;
}// end function
private function onCheckPlayerLockTimerEvent(event:TimerEvent = null) : void
{
var _loc_2:Boolean = true;
;
var _loc_3:* = null[false];
_loc_3 = null;
default xml namespace = null * (new activation <= null);
_loc_3 = null;
if (_loc_2)
{
do
{
return;
stop();
if (_loc_2)
{
}while (true)
if (!(_loc_3 && this))
{
}
if (!(_video.parent != _videoContainer)) goto 28;
if (!_loc_3)
{
trace(WARNING_VIDEO_OBJECT_STOLEN);
}
}
if (_loc_2)
{
do
{
if (_loc_2 || event)
{
if (!_videoContainer) goto 100;
}
do
{
}while (true)
;
if (false)
{
}
if (!null.hasLock()) goto 147;
}
if (_loc_2 || _loc_2)
{
PlayerLock.instance.releaseLock();
if (_loc_2)
{
do
{
if (_loc_2)
{
if (!PlayerLock.instance.isLockRequired()) goto 224;
}
}while (PlayerLock.instance.hasLock())
}
if (_loc_2 || _loc_2)
{
if (PlayerLock.instance.getLock()) goto 219;
}
}
PlayerLock.instance.sendStopRequest();
continue;
if (!(this.usePlayerLock == true)) goto 147;
}
;
null[null + (null % (null * PlayerLock < null < null) >= null)].instance.requiresLock(this, this.status == MediaPlayer.PLAYING);
}while (true)
return;
}// end function
public function get bufferTime() : Number
{
;
with (~null in null)
{
return undefined.bufferTime;
return;
}// end function
public function play(param1:String, param2:Boolean = false, param3:Boolean = false) : void
{
var _loc_4:Boolean = true;
;
if (!_loc_5)
{
do
{
return;
;
this = _allowHDVideo === _referrer;
param1 = param2 - new activation + (param2 - new activation);
null.getStreamInfo(null, null, null, null instanceof _imeem.playerServices * param1, false, _featured, onGetStreamInfo, param1);
;
}
}while (true)
_loadingMediaID = param1;
;
stop();
;
return;
}// end function
public function setVideoDisplay(param1:Sprite, param2:Boolean = true, param3:Boolean = true) : void
{
;
var _loc_4:* = !(~null[~(true - false)] is null) >> null;
var _loc_5:String = null;
if (_loc_5 || this)
{
do
{
return;
onVideoDisplayResizeEvent(null);
if (!(_loc_4 && param3))
{
continue;
}while (true)
_preserveAspectRatio = param2;
}
do
{
param1.addChild(_videoContainer);
}
continue;
if (!(_loc_4 && param1))
{
if (!_loc_4)
{
}
}
;
default xml namespace = param3;
if ( >= FlashCapabilities.supportsHDVideo[_loc_4 instanceof (_loc_4 + 1)] * NaN)
{
}
if (!param1)
{
}
null._allowHDVideo = null / (null << (null >> null + null) < null) == true;
}while (true)
return;
}// end function
public function set volume(param1:Number) : void
{
var _loc_3:Boolean = true;
;
var _loc_4:* = param1 / new activation;
var _loc_2:* = this.volume;
if (_loc_3)
{
do
{
return;
;
((this & true) < undefined).dispatchEvent(((param1 - 1) | (null + 1)).createUpdateEvent(this, "volume", _loc_2, param1));
;
default xml namespace = _loc_2;
_loc_2 = null ^ ~false >= _loc_3;
if (null || null >> null - ~(false + 1) <= null)
{
}while (true)
if (_loc_2 === param1) goto 36;
}
}
this._810883302volume = param1;
;
return;
}// end function
public function get currentMediaID() : String
{
return _currentMediaID;
return;
}// end function
public function get bytesLoaded() : Number
{
;
_loc_3 = null - (_stream >= null < null) + 1[_loc_1];
return null.bytesLoaded;
return;
}// end function
private function reset() : void
{
;
var _loc_2:* = false + 1;
var _loc_1:String = null;
_loc_2 = null as null << ~(~true);
if (!_loc_1)
{
do
{
return;
this.status = MediaPlayer.STOPPED;
;
if (true)
{
}while (true)
_currentMediaID = null;
}
}
do
{
;
default xml namespace = new activation;
null._loadingMediaID = null instanceof _loc_1;
do
{
_mediaHitInfo = null;
}while (true)
_stream.close();
}while (true)
return;
}// end function
private function onOverlayVisibleEvent(event:MediaEvent) : void
{
var _loc_2:Boolean = true;
;
default xml namespace = null;
var _loc_3:* = null as (false - NaN <= this) - 1;
if (!_loc_3)
{
dispatchEvent(event);
}
return;
return;
}// end function
public function resume() : void
{
;
var _loc_2:Boolean = true;
_loc_3 = this;
var _loc_1:* = true + ((false + 1) - 1);
_loc_2 = null;
if (_loc_2 || this)
{
do
{
return;
;
this = _loc_2 * _loc_1;
this.status = MediaPlayer.PLAYING;
if (_loc_2)
{
}while (true)
_stream.resume();
}
;
if (!(_currentMediaID == null)) goto 81;
;
if (_loc_2 || this)
{
return;
}
}
;
return;
}// end function
public function set featured(param1:Boolean) : void
{
var _loc_2:Boolean = true;
;
param1 = null >>> null + (false & undefined);
var _loc_3:* = (null + null == null) + 1;
if (_loc_2)
{
_featured = param1;
}
return;
return;
}// end function
private function onMediaDoneBufferingEvent(event:MediaEvent) : void
{
;
var _loc_2:* = null * (null - (null === true >= false[_loc_2] instanceof true));
;
var _loc_3:* = (null << null & (null << null) + 1) >= null;
_loc_3 = null;
_loc_3 = null;
;
if (_loc_2 * (typeof(_loc_2[true]) - 1) > null)
{
}
if (!_loc_3)
{
dispatchEvent(event);
}
return;
return;
}// end function
public function set bufferTime(param1:Number) : void
{
var _loc_3:Boolean = true;
;
var _loc_4:String = null;
var _loc_2:* = this.bufferTime;
if (_loc_3)
{
do
{
return;
;
this.dispatchEvent(false.createUpdateEvent(this, "bufferTime", _loc_2, param1));
}while (true)
if (_loc_2 === param1) goto 36;
;
default xml namespace = true * (_loc_4 < _loc_4);
default xml namespace = false;
_loc_3 = _loc_2;
if (typeof(-(PropertyChangeEvent >= this)[param1 - false]))
{
}
}
this._1906260781bufferTime = param1;
;
return;
}// end function
public function setOverlayDisplay(param1:Sprite) : void
{
return;
return;
}// end function
private function setAffiliateLinks(param1:String, param2:String, param3:String) : void
{
return;
return;
}// end function
public function setAuthTokens(param1:String, param2:String) : void
{
var _loc_3:Boolean = true;
;
param1 = null >> false as null;
var _loc_4:* = null / (null - null);
if (_loc_3)
{
do
{
return;
;
(null + (typeof(null + ( >= null) >> this) + 1) ^ new activation)._imeem = new Imeem(param1, param2);
}
}while (true)
;
(~((null in null) <= null))._apiParams = {key:param1, secret:param2, version:"1.0"};
;
return;
}// end function
public function get playlistID() : String
{
return _playlistID;
return;
}// end function
public function get isPrimary() : Boolean
{
return _isPrimary;
return;
}// end function
private function set _1906260781bufferTime(param1:Number) : void
{
var _loc_2:Boolean = true;
;
this = null * null[null instanceof false];
var _loc_3:* = null + 1;
_loc_3 = typeof(typeof(null));
if (!_loc_3)
{
_stream.bufferTime = param1;
}
return;
return;
}// end function
private function onMediaStartEvent(event:MediaEvent) : void
{
var _loc_2:Boolean = true;
;
var _loc_3:Boolean = false;
if (_loc_2 || event)
{
do
{
return;
;
with (null instanceof null / (null - (null + (typeof(null + null * (-(null % false is null % false)))) - 1) >= null))
{
dispatchEvent(event);
if (!_loc_3)
{
}while (true)
this.status = MediaPlayer.PLAYING;
}
}
;
;
_stream.resume();
if (!_loc_3)
{
;
onVideoDisplayResizeEvent(null);
}
return;
}// end function
public function seek(param1:Number) : void
{
;
var _loc_2:Boolean = true;
var _loc_3:* = typeof(this);
if (_loc_3)
{
do
{
return;
if (_loc_3)
{
}while (_mediaHitInfo == null)
;
default xml namespace = false;
}
_mediaHitInfo.linearPlay = 0;
}
do
{
;
this = (0 === Math >> (param1 is this.trackLength)) + 1;
null.seek(null.max(null, null.min(null, null as null % (_stream | Math))));
continue;
}while (_currentMediaID != null)
return;
;
return;
}// end function
public function get video() : Video
{
return _video;
return;
}// end function
public function get usePlayerLock() : Boolean
{
return _usePlayerLock;
return;
}// end function
private function onMediaErrorEvent(event:MediaEvent) : void
{
;
default xml namespace = false;
var _loc_2:String = null;
_loc_2 = null - 1;
;
event = true;
var _loc_3:* = (null ^ null[null ^ null + null]) > null;
;
_loc_3 = _loc_3;
if (_loc_2 > event | _loc_2 in _loc_2)
{
}
if (!this)
{
dispatchEvent(event);
}
return;
return;
}// end function
public function get bytesTotal() : Number
{
;
return (typeof(null is _stream) ^ typeof(_loc_3)[NaN] + 1).bytesTotal;
return;
}// end function
public function get trackPosition() : Number
{
;
return undefined.time;
return;
}// end function
private function setReferrer(param1:String) : void
{
;
with ((true is false) * (new activation + 1))
{
default xml namespace = null === null + null;
var _loc_4:String = null;
var _loc_5:String = null;
do
{
if (_loc_5 || this)
{
}
if (!_loc_4)
{
}
_referrer = == null ? ("") : (if (_loc_4) goto 95, );
if (!_loc_4)
{
if (!(_loc_4 && this))
{
var referrer:* = param1;
}while (true)
var trackingOptions:Object;
}
;
try
{
MediaPlayer.QUANTCAST_DATA_SENT = true;
do
{
_quantCast = new Quantcast(, this);
}
if (false)
{
}while (true)
if (_loc_5)
{
embedUrl = ;
;
param1 = new activation;
do
{
do
{
if (_loc_5)
{
if (!( == "")) goto 275;
}
}
embedUrl = "";
do
{
if (_loc_5 || _loc_2)
{
}while ( != "ni-web")
embedUrl = "imeem.com";
}while (true)
}
if (!_loc_4)
{
if ( == "web") goto 482;
if (!(_loc_4 && this))
{
}while (true)
}
}
if (ReferrerUtils.isImeemReferrer() == false)
{
trackingOptions;
;
}
}
}
catch (e:Error)
{
;
var _loc_3:* = null - (null - (null * (-(!null[null - null] - new catch0) == null) >= null)) - 1;
referrer;
}
return;
return;
}// end function
private function onGetStreamInfo(param1:ResultData) : void
{
;
with (null + null >> false)
{
var _loc_5:* = null is null;
var _loc_6:String = null;
var _loc_2:Boolean = false;
var _loc_3:Object = null;
var _loc_4:Object = null;
if (!(_loc_5 && _loc_3))
{
if (!_loc_5)
{
if (!_loc_5)
{
_loc_2 = false;
}
if (param1.success)
{
_loc_3 = param1.data;
if (_loc_6 || this)
{
do
{
_stream.pause();
if (_loc_6)
{
_stream.play(_loc_3.streamUrl);
}while (true)
_currentMediaID = _loadingMediaID;
do
{
_mediaHitInfo = new MediaHitInfo(_loc_3.isSample, _loc_3.isVideo);
}
do
{
}
}while (_loc_3.playMode != 1)
;
null.isSample = null - (null + null * (null + (_loc_3 - true > null)) >= null);
if (_loc_6 || this)
{
do
{
do
{
if (_loc_6 || this)
{
if (_loc_6)
{
if (!(_loc_3.playMode != null)) goto 304;
}
}while (true)
}
_loc_2 = true;
}
}while (true)
}while (_loc_3.outOfRegion != true)
dispatchEvent(new MediaEvent(MediaEvent.MEDIA_REGION_ERROR));
;
_loc_4 = {playMode:_loc_3.playMode, playLength:_loc_3.playLength, shareState:_loc_3.shareState, releaseDate:_loc_3.releaseDate, isOwner:_loc_3.isOwner};
if (!(_loc_5 && this))
{
dispatchEvent(MediaEvent.createPlayModeSetEvent(_loc_4));
}
;
_mediaHitInfo = new MediaHitInfo(_loc_3.isSample, _loc_3.isVideo);
do
{
if (!_loc_5)
{
_stream.pause();
}
_stream.play(_loc_3.streamUrl);
}while (true)
_currentMediaID = _loadingMediaID;
;
}
else
{
_loc_2 = true;
}
}
}
if (_loc_2 == true)
{
if (_loc_6)
{
reset();
;
_loc_2 = null as null >> _loc_5;
if (!(null && null / null))
{
dispatchEvent(new MediaEvent(MediaEvent.MEDIA_ERROR));
}
}
}
return;
return;
}// end function
private function onForcePauseEvent(event:MediaEvent) : void
{
var _loc_2:Boolean = true;
;
var _loc_3:* = null << undefined < new activation;
if (_loc_2)
{
;
do
{
return;
dispatchEvent(event);
;
if ((new activation[this] in (null - 1)) >> -null + (_loc_3 < !_loc_3) == null === this)
{
}
if (!_loc_3)
{
}while (true)
pause();
}
}
return;
}// end function
private function onMediaBufferingEvent(event:MediaEvent) : void
{
var _loc_2:Boolean = true;
;
default xml namespace = null * false;
_loc_2 = new activation;
event = typeof(~(null >> (null === null)));
var _loc_3:String = null;
;
_loc_3 = (null instanceof null == null) < null;
with (null ^ event)
{
this = _loc_3;
if (_loc_2 || _loc_2)
{
dispatchEvent(event);
}
return;
return;
}// end function
public function forceSetAffiliateLinks(param1:String, param2:String, param3:String) : void
{
return;
return;
}// end function
public function set playlistID(param1:String) : void
{
;
default xml namespace = undefined;
var _loc_2:* = true;
var _loc_3:String = null;
if (!_loc_2)
{
_playlistID = param1;
}
return;
return;
}// end function
private function onOverlayHiddenEvent(event:MediaEvent) : void
{
;
with (false)
{
var _loc_2:* = (null << true <= (typeof(event)) | NaN) < null;
;
event = null[null + (null >> null + (null in null))];
var _loc_3:String = null;
_loc_3 = null << null;
;
_loc_2 = _loc_3 - (false is false);
if (!NaN)
{
}
if (event)
{
dispatchEvent(event);
}
return;
return;
}// end function
private function onMediaEndEvent(event:MediaEvent) : void
{
;
var _loc_3:* = null === ((null is (null as (false + 1) >= true)) <= null) + 1;
var _loc_4:String = null;
var _loc_2:Number = NaN;
if (!_loc_3)
{
do
{
return;
dispatchEvent(event);
if (!_loc_3)
{
}while (true)
_mediaHitInfo.status = MediaHit.END;
}
if (!(_loc_3 && _loc_3))
{
do
{
_imeem.playerServices.logMediaHit(this.currentMediaID, this.playlistID, _referrer, MediaHit.END);
}
do
{
if (!(_loc_3 && event))
{
if (!(this.status == MediaPlayer.PLAYING)) goto 39;
}
if (!_loc_4)
{
;
_loc_2 = new activation;
event = _mediaHitInfo.sample >> false - _loc_4;
}
if (!(null == null)) goto 39;
}
if (_loc_4 || _loc_3)
{
}
_loc_2 = this.trackPosition;
}while (true)
if (_loc_4)
{
if (!_loc_3)
{
}
if (!(_mediaHitInfo.status != MediaHit.END)) goto 273;
}while (true)
}
if (_loc_4)
{
if (_loc_4)
{
if (!(_mediaHitInfo.video == false)) goto 453;
do
{
}
if (_loc_4)
{
if (!(_mediaHitInfo != null)) goto 525;
continue;
}
if (!(this.currentMediaID != null)) goto 562;
}
}while (true)
;
if (!(NaN && this))
{
}
return;
}// end function
public function set status(param1:String) : void
{
var _loc_3:Boolean = true;
;
var _loc_4:* = param1 >>> (this + 1);
var _loc_2:* = this.status;
if (_loc_3 || _loc_2)
{
;
do
{
return;
this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "status", _loc_2, param1));
}while (true)
if (_loc_2 === param1) goto 56;
;
with (-(null + (null[null * (null - false in null)] ^ false) < _loc_4 >>> _loc_4))
{
if (null instanceof (null is (true - 1)))
{
}
}
this._892481550status = param1;
return;
}// end function
public function set isPrimary(param1:Boolean) : void
{
;
param1 = false;
var _loc_2:Boolean = true;
default xml namespace = null;
_loc_2 = _loc_3 < undefined;
;
default xml namespace = null as NaN;
_loc_2 = null;
var _loc_3:* = (null === null) <= null;
;
if (null - null / ((_loc_2 === _loc_2 == (_loc_2 === _loc_2)) + null))
{
}
if (!this)
{
_isPrimary = param1;
}
return;
return;
}// end function
public function get status() : String
{
return _status;
return;
}// end function
public function isPlayerLockAvailable() : Boolean
{
;
_loc_2 = PlayerLock;
return ((this + 1)).instance.isLockAvailable();
return;
}// end function
public function pause() : void
{
;
default xml namespace = _loc_2;
var _loc_1:* = new activation == false;
var _loc_2:Boolean = true;
if (_loc_2)
{
do
{
return;
;
this = null | (null instanceof null >>> -null | null);
this.status = MediaPlayer.PAUSED;
if (!_loc_1)
{
}while (true)
_stream.pause();
}
;
if (!_loc_2)
{
;
if (!(_currentMediaID == null)) goto 68;
if (_loc_2)
{
return;
}
}
}
;
return;
}// end function
;
var _loc_1:* = null instanceof (null / (false * true) == null) - 1;
var _loc_2:* = null instanceof (null / (false * true) == null) - 1;
if (_loc_2)
{
do
{
if (!_loc_1)
{
}while (true)
}
if (!(_loc_1 && MediaPlayer))
{
;
_loc_3 = _loc_2;
if (!(null - (_loc_2 > null) * (null / MediaPlayer)))
{
}
do
{
if (!(_loc_1 && _loc_1))
{
do
{
}
}while (true)
}while (true)
do
{
}
do
{
}
else
{
}
}while (true)
}while (true)
}
}