mixpanel-browser 2.57.1 → 2.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,6 +53,7 @@ var SessionRecording = function(options) {
53
53
 
54
54
  this.seqNo = 0;
55
55
  this.replayStartTime = null;
56
+ this.replayStartUrl = null;
56
57
  this.batchStartUrl = null;
57
58
 
58
59
  this.idleTimeoutId = null;
@@ -104,6 +105,7 @@ SessionRecording.prototype.startRecording = function (shouldStopBatcher) {
104
105
 
105
106
  this.replayStartTime = new Date().getTime();
106
107
  this.batchStartUrl = _.info.currentUrl();
108
+ this.replayStartUrl = _.info.currentUrl();
107
109
 
108
110
  if (shouldStopBatcher || this.recordMinMs > 0) {
109
111
  // the primary case for shouldStopBatcher is when we're starting recording after a reset
@@ -140,9 +142,17 @@ SessionRecording.prototype.startRecording = function (shouldStopBatcher) {
140
142
  'blockClass': this.getConfig('record_block_class'),
141
143
  'blockSelector': blockSelector,
142
144
  'collectFonts': this.getConfig('record_collect_fonts'),
145
+ 'dataURLOptions': { // canvas image options (https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
146
+ 'type': 'image/webp',
147
+ 'quality': 0.6
148
+ },
143
149
  'maskAllInputs': true,
144
150
  'maskTextClass': this.getConfig('record_mask_text_class'),
145
- 'maskTextSelector': this.getConfig('record_mask_text_selector')
151
+ 'maskTextSelector': this.getConfig('record_mask_text_selector'),
152
+ 'recordCanvas': this.getConfig('record_canvas'),
153
+ 'sampling': {
154
+ 'canvas': 15
155
+ }
146
156
  });
147
157
 
148
158
  if (typeof this._stopRecording !== 'function') {
@@ -260,6 +270,7 @@ SessionRecording.prototype._flushEvents = addOptOutCheckMixpanelLib(function (da
260
270
  'replay_id': replayId,
261
271
  'replay_length_ms': replayLengthMs,
262
272
  'replay_start_time': this.replayStartTime / 1000,
273
+ 'replay_start_url': this.replayStartUrl,
263
274
  'seq': this.seqNo
264
275
  };
265
276
  var eventsJson = _.JSONEncode(data);