Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getStreamURL(param1:SoundData, param2:String = null) : void
- {
- var _loc_13:* = null;
- if (gateway == null)
- {
- throw "[StreamBuilder.getStreamURL()] \'gateway\' not set. Cannot build URL !";
- }
- var _loc_3:* = 1;
- var _loc_4:* = param1.encodingFormat;
- var _loc_5:* = param1.mediaVersion;
- var _loc_6:* = 0;
- var _loc_7:* = 0;
- if (param1.episodeId != 0)
- {
- _loc_6 = param1.episodeId;
- _loc_7 = 1;
- }
- else
- {
- _loc_6 = param1.type == 0 ? (param1.songId) : (param1.uploadId);
- }
- var _loc_8:* = param1.puid;
- this.reset();
- this._streamParams = {};
- this._streamParams.puid = _loc_8;
- this._streamParams.mediaId = _loc_6;
- var _loc_9:* = new BitmapData(_loc_8.length, 1, false, 0);
- _loc_9.lock();
- var _loc_10:* = 0;
- while (_loc_10 < _loc_8.length)
- {
- _loc_9.setPixel(_loc_10, 0, _loc_8.charCodeAt(_loc_10));
- _loc_10++;
- }
- _loc_9.unlock();
- var _loc_11:* = new DisplacementMapFilter();
- _loc_11.mapBitmap = _loc_9;
- var _loc_12:* = new DisplacementMapFilter();
- _loc_11.componentX = _loc_6;
- _loc_12.componentY = _loc_5;
- _loc_12.color = _loc_4;
- _loc_12.scaleX = _loc_7;
- if (param2 != null)
- {
- _loc_13 = new BitmapData(param2.length, 1, false, 0);
- _loc_13.lock();
- _loc_10 = 0;
- while (_loc_10 < param2.length)
- {
- _loc_13.setPixel(_loc_10, 0, param2.charCodeAt(_loc_10));
- _loc_10++;
- }
- _loc_13.unlock();
- _loc_12.mapBitmap = _loc_13;
- }
- this._swf.content.filters = [_loc_11, _loc_12];
- this._swf.content.x = 1;
- this._swf.addEventListener(Event.ENTER_FRAME, this.onURLBuilt);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement