videomail-client 5.2.0 → 5.2.2

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.
package/TODO.md CHANGED
@@ -1,17 +1,17 @@
1
1
  ### TODOs
2
2
  | Filename | line # | TODO
3
3
  |:------|:------:|:------
4
+ | src/js/wrappers/container.js | 334 | figure out how to fire dom's onload event again
5
+ | src/js/wrappers/container.js | 335 | or how to run all the scripts over again
6
+ | src/js/wrappers/optionsWrapper.js | 27 | fix this, it's not really an option
4
7
  | src/js/util/audioRecorder.js | 11 | code needs rewrite
5
8
  | src/js/util/eventEmitter.js | 6 | MAKE EVENT EMITTING IN DESPOT NOT GLOBAL BUT BY CONTAINER ID INSTEAD
6
9
  | src/js/util/eventEmitter.js | 43 | have this emitted through a configuration because it is pretty noisy
7
10
  | src/js/util/humanize.js | 4 | get rid of this class and use those imports directly
8
- | src/js/wrappers/container.js | 334 | figure out how to fire dom's onload event again
9
- | src/js/wrappers/container.js | 335 | or how to run all the scripts over again
10
- | src/js/wrappers/optionsWrapper.js | 27 | fix this, it's not really an option
11
- | src/js/wrappers/visuals/recorder.js | 584 | in https://github.com/binarykitchen/videomail-client/issues/142
12
- | src/js/wrappers/visuals/recorder.js | 621 | retry with navigator.getUserMedia_() maybe?
13
- | src/js/wrappers/visuals/recorder.js | 761 | commented out because for some reasons server does not accept such a long
14
- | src/js/wrappers/visuals/recorder.js | 766 | consider removing this later or have it for debug=1 only?
11
+ | src/js/wrappers/visuals/recorder.js | 582 | in https://github.com/binarykitchen/videomail-client/issues/142
12
+ | src/js/wrappers/visuals/recorder.js | 619 | retry with navigator.getUserMedia_() maybe?
13
+ | src/js/wrappers/visuals/recorder.js | 759 | commented out because for some reasons server does
14
+ | src/js/wrappers/visuals/recorder.js | 764 | consider removing this later or have it for debug=1 only?
15
15
  | src/js/wrappers/visuals/userMedia.js | 309 | consider removing that if it's not the case anymore (for better performance)
16
16
  | gulpfile.js | 1 | write this in ES6 once i have figured out how to
17
17
  | gulpfile.js | 58 | fix this, so that it also works when not minified, this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "author": "Michael Heuberger <michael.heuberger@binarykitchen.com>",
6
6
  "contributors": [
@@ -26004,7 +26004,7 @@ function wrappy (fn, cb) {
26004
26004
  },{}],345:[function(_dereq_,module,exports){
26005
26005
  module.exports={
26006
26006
  "name": "videomail-client",
26007
- "version": "5.2.0",
26007
+ "version": "5.2.2",
26008
26008
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
26009
26009
  "author": "Michael Heuberger <michael.heuberger@binarykitchen.com>",
26010
26010
  "contributors": [
@@ -26375,6 +26375,8 @@ var _default = (0, _keymirror.default)({
26375
26375
  // webcam is recording
26376
26376
  STOPPING: null,
26377
26377
  // recording is being stopped (= preview)
26378
+ STOPPED: null,
26379
+ // recording has stopped
26378
26380
  PROGRESS: null,
26379
26381
  // start sending
26380
26382
  BEGIN_AUDIO_ENCODING: null,
@@ -30571,7 +30573,6 @@ var Recorder = function Recorder(visuals, replay) {
30571
30573
  var frame;
30572
30574
  var recordingBufferLength;
30573
30575
  var recordingBuffer;
30574
- var timeControlEnabled = Boolean(options.video.timeControl);
30575
30576
  function writeStream(buffer, opts) {
30576
30577
  if (stream) {
30577
30578
  if (stream.destroyed) {
@@ -31042,8 +31043,8 @@ var Recorder = function Recorder(visuals, replay) {
31042
31043
  args: args
31043
31044
  };
31044
31045
 
31045
- // todo commented out because for some reasons server does not accept such a long
31046
- // array of many log lines. to examine later.
31046
+ // todo commented out because for some reasons server does
31047
+ // not accept such a long array of many log lines. to examine later.
31047
31048
  //
31048
31049
  // add some useful debug info to examine weird stuff like this one
31049
31050
  // UnprocessableError: Unable to encode a video with FPS near zero.
@@ -31125,7 +31126,11 @@ var Recorder = function Recorder(visuals, replay) {
31125
31126
  recordingStats.samplesCount = samplesCount;
31126
31127
  recordingStats.sampleRate = userMedia.getAudioSampleRate();
31127
31128
  }
31128
- writeCommand('stop', recordingStats);
31129
+ writeCommand('stop', recordingStats, function () {
31130
+ self.emit(_events.default.STOPPED, {
31131
+ recordingStats: recordingStats
31132
+ });
31133
+ });
31129
31134
 
31130
31135
  // beware, resetting will set framesCount to zero, so leave this here
31131
31136
  self.reset();
@@ -31221,7 +31226,6 @@ var Recorder = function Recorder(visuals, replay) {
31221
31226
  if (!self.isPaused() && stream && ctx) {
31222
31227
  if (framesCount === 0) {
31223
31228
  self.emit(_events.default.SENDING_FIRST_FRAME);
31224
- debug('Recorder: time control is', timeControlEnabled.toString());
31225
31229
  }
31226
31230
  framesCount++;
31227
31231
  ctx.drawImage(userMedia.getRawVisuals(), 0, 0, canvas.width, canvas.height);
@@ -31231,16 +31235,10 @@ var Recorder = function Recorder(visuals, replay) {
31231
31235
  throw _videomailError.default.create('Failed to extract webcam data.', options);
31232
31236
  }
31233
31237
  bytesSum += recordingBufferLength;
31234
- var frameBuffer;
31235
- if (timeControlEnabled) {
31236
- var timeControlBuffer = Buffer.from((0, _safeJsonStringify.default)({
31237
- frameNumber: framesCount,
31238
- milliseconds: Date.now()
31239
- }));
31240
- frameBuffer = Buffer.concat([recordingBuffer, timeControlBuffer]);
31241
- } else {
31242
- frameBuffer = recordingBuffer;
31243
- }
31238
+ var frameControlBuffer = Buffer.from((0, _safeJsonStringify.default)({
31239
+ frameNumber: framesCount
31240
+ }));
31241
+ var frameBuffer = Buffer.concat([recordingBuffer, frameControlBuffer]);
31244
31242
  writeStream(frameBuffer, {
31245
31243
  frameNumber: framesCount,
31246
31244
  onFlushedCallback: onFlushed