Ledger Nano X - The secure hardware wallet
SHARE
TWEET

twitch flash player reversing

dragonbane Feb 4th, 2020 (edited) 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. wasm twitch player tracks the following segmentmetadata keys:
  2. cmd: "ld_lat_data" (live data) or "commercial" (ad)
  3. stream_offset
  4. commercial
  5. commercial_id
  6. length (ad length?)
  7.  
  8.  
  9. Interesting keys/track:
  10. stream_offset (aka stream time elapsed at current segment)
  11. transc_r (transcoding receive time aka TDEN?)
  12. transc_s (transcoding send time encoded aka TDTG?)
  13.  
  14.  
  15. Translations:
  16. TDEN: 2020-01-27T14:46:21 (hls_latency_broadcaster)
  17. TDTG: 2020-01-27T14:46:21 (hls_latency_encoder)
  18. broadc_s: 1 (hls_latency_broadcaster_send_time)
  19. ingest_r: 2 (hls_latency_ingest_receive_time)
  20. ingest_s: 3 (hls_latency_ingest_send_time)
  21. stream_offset: stream_offset
  22. transc_r: 1580136381680 = 2020-01-27T14:46:21.680Z (hls_latency_transcode_receive_time)
  23. transc_s: 1580136381685 = 2020-01-27T14:46:21.685Z (hls_latency_transcode_send_time)
  24.  
  25. private static const MAX_DELAY_CORRECTION:Number = 100;
  26. private var _latencyToEncoderMS:Number = NaN;
  27.      
  28. private var _latencyToBroadcasterMS:Number = NaN;
  29.      
  30. private var _serverTimeOffsetMS:Number = NaN;
  31.  
  32. private var _delayCorrection:Number = 0;
  33. private var _scheduledDelay:Number = 0;
  34.  
  35. private var _timeOffset:Number = -1;
  36.  
  37. this._hls.setLatency(_loc4_); (default 8000)
  38.  
  39. private static const ID3_BROADCASTING_TIME:String = "TDEN";  
  40. private static const ID3_ENCODING_TIME:String = "TDTG";
  41.  
  42.  private function calculateServerTimeOffset() : void
  43.       {
  44.          var _loc3_:Number = NaN;
  45.          var _loc1_:Object = this._hls.getExtraInfo(false);
  46.          var _loc2_:Object = _loc1_["SERVER-TIME"];
  47.          this._serverTimeOffsetMS = NaN;
  48.          if(_loc2_)
  49.          {
  50.             _loc3_ = new Date().getTime();
  51.             if(String(Number(_loc2_)) === String(_loc2_))
  52.             {
  53.                this._serverTimeOffsetMS = 1000 * Number(_loc2_) - _loc3_;
  54.                this.log("Offset to server time is " + this._serverTimeOffsetMS + " ms");
  55.             }
  56.             else
  57.             {
  58.                this.log("server time in wrong format: " + _loc2_);
  59.             }
  60.          }
  61.       }
  62.  
  63. ExternalInterface.addCallback("hls_time",function():Array
  64.             {
  65.                return [time,bufferLength];
  66.             });
  67.  
  68. override public function get time() : Number
  69.       {
  70.          if(this._isSeekingTo >= 0)
  71.          {
  72.             return this._isSeekingTo;
  73.          }
  74.          if(this._timeOffset < 0)
  75.          {
  76.             return 0;
  77.          }
  78.          return super.time + this._timeOffset;
  79.       }
  80.  
  81. this._metaDataTimestamp
  82.  
  83. private function parseISOTime(param1:String) : Number
  84.       {
  85.          var _loc2_:* = param1.replace(/\-/g,"/").replace("T"," ") + " UTC+0000";
  86.          return Date.parse(_loc2_);
  87.       }
  88.  
  89.  private function getDelayFromMetaData(param1:String) : Number
  90.       {
  91.          var _loc2_:Number = NaN;
  92.          var _loc3_:Number = NaN;
  93.          if(!isNaN(this._serverTimeOffsetMS) && this._metaDataTimestamp)
  94.          {
  95.             _loc2_ = this._metaDataTimestamp.getTime() + this._serverTimeOffsetMS;
  96.             if(!isNaN(_loc2_) && param1 in this._metaData)
  97.             {
  98.                _loc3_ = this.parseISOTime(this._metaData[param1]);
  99.                if(!isNaN(_loc3_))
  100.                {
  101.                   return _loc2_ - _loc3_;
  102.                }
  103.             }
  104.          }
  105.          return NaN;
  106.       }
  107.  
  108. private function onID3Received(param1:Object) : void
  109.       {
  110.          var _loc2_:* = null;
  111.          this._metaData = {};
  112.          this._metaDataTimestamp = new Date();
  113.          for(_loc2_ in param1)
  114.          {
  115.             if(param1.hasOwnProperty(_loc2_))
  116.             {
  117.                this._metaData[_loc2_] = param1[_loc2_];
  118.             }
  119.          }
  120.          this._latencyToEncoderMS = this.getDelayFromMetaData(ID3_ENCODING_TIME);
  121.          this._latencyToBroadcasterMS = this.getDelayFromMetaData(ID3_BROADCASTING_TIME);
  122.          this.dispatchEvent(new Event(EVENT_METADATA_RECEIVED));
  123. }
  124.  
  125. super.client = {
  126.             "onPlayStatus":this.onPlayStatus,
  127.             "onID3Received":this.onID3Received,
  128.             "onMetaData":this.onMetaData
  129.          };
  130.  
  131. private function calibrateDelay() : void
  132.       {
  133.          var _loc1_:Number = NaN;
  134.          if(this._scheduledDelay > MAX_DELAY_CORRECTION / 2)
  135.          {
  136.             _loc1_ = this._scheduledTime - getTimer();
  137.             this._delayCorrection = 0.6 * this._delayCorrection + 0.4 * _loc1_;
  138.             this._delayCorrection = Math.max(this._delayCorrection,-MAX_DELAY_CORRECTION);
  139.             this._delayCorrection = Math.min(this._delayCorrection,MAX_DELAY_CORRECTION);
  140.          }
  141.       }
  142.  
  143. private function updateTimingData(param1:Number) : void
  144.       {
  145.          if(this._timeOffset < 0)
  146.          {
  147.             this._timeOffset = param1;
  148.          }
  149.       }
  150.  
  151.  this.updateTimingData(firstPTS / 1000);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top