videomail-client 5.1.2 → 5.2.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.
|
@@ -814,8 +814,7 @@ const Recorder = function (visuals, replay, defaultOptions = {}) {
|
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
function getAvgFps() {
|
|
817
|
-
|
|
818
|
-
return (loop.getFrameCount() / loop.getElapsedTime()) * 1000
|
|
817
|
+
return (framesCount / getIntervalSum()) * 1000
|
|
819
818
|
}
|
|
820
819
|
|
|
821
820
|
this.getRecordingStats = function () {
|
|
@@ -945,7 +944,7 @@ const Recorder = function (visuals, replay, defaultOptions = {}) {
|
|
|
945
944
|
params.eventType = e.type
|
|
946
945
|
}
|
|
947
946
|
|
|
948
|
-
debug(
|
|
947
|
+
debug(`pause() at frame ${framesCount}`, params)
|
|
949
948
|
|
|
950
949
|
userMedia.pause()
|
|
951
950
|
loop.stop()
|
|
@@ -960,7 +959,7 @@ const Recorder = function (visuals, replay, defaultOptions = {}) {
|
|
|
960
959
|
}
|
|
961
960
|
|
|
962
961
|
this.resume = function () {
|
|
963
|
-
debug(
|
|
962
|
+
debug(`Recorder: resume() with frame ${framesCount}`)
|
|
964
963
|
|
|
965
964
|
stopPings()
|
|
966
965
|
|
|
@@ -1094,6 +1093,13 @@ const Recorder = function (visuals, replay, defaultOptions = {}) {
|
|
|
1094
1093
|
|
|
1095
1094
|
self.emit(Events.RECORDING, framesCount)
|
|
1096
1095
|
|
|
1096
|
+
// see https://github.com/hapticdata/animitter/issues/3
|
|
1097
|
+
loop.on('update', function (deltaTime, elapsedTime) {
|
|
1098
|
+
// x1000 because of milliseconds
|
|
1099
|
+
const avgFPS = (framesCount / elapsedTime) * 1000
|
|
1100
|
+
debug('Recorder: avgFps =', Math.round(avgFPS))
|
|
1101
|
+
})
|
|
1102
|
+
|
|
1097
1103
|
loop.start()
|
|
1098
1104
|
}
|
|
1099
1105
|
|