timingsrc 1.2.12 → 1.2.14

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Christoph Guttandin
3
+ Copyright (c) 2023 Christoph Guttandin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,8 +9,8 @@ export const determineSupportedPlaybackRateValues = (window) => {
9
9
  audio.playbackRate = 17;
10
10
  }
11
11
  catch {
12
- // Bug #1: Chrome does not support values below 0.625.
13
- return [0.625, 16];
12
+ // Bug #1: Chrome does not support values below 0.0625.
13
+ return [0.0625, 16];
14
14
  }
15
15
  try {
16
16
  // Bug #3: Firefox does not support negative values.
@@ -1 +1 @@
1
- {"version":3,"file":"determine-supported-playback-rate-values.js","sourceRoot":"","sources":["../../../src/functions/determine-supported-playback-rate-values.ts"],"names":[],"mappings":"AAEA,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAU,CAAC;AAErE,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,MAAuC,EAA6B,EAAE;IACvH,IAAI,MAAM,KAAK,IAAI,EAAE;QACjB,OAAO,cAAc,CAAC;KACzB;IAED,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;IAEjC,IAAI;QACA,mDAAmD;QACnD,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC;KAC3B;IAAC,MAAM;QACJ,sDAAsD;QACtD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAU,CAAC;KAC/B;IAED,IAAI;QACA,oDAAoD;QACpD,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;KAC3B;IAAC,MAAM;QACJ,OAAO,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAU,CAAC;KAC1C;IAED,OAAO,cAAc,CAAC;AAC1B,CAAC,CAAC"}
1
+ {"version":3,"file":"determine-supported-playback-rate-values.js","sourceRoot":"","sources":["../../../src/functions/determine-supported-playback-rate-values.ts"],"names":[],"mappings":"AAEA,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAU,CAAC;AAErE,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,MAAuC,EAA6B,EAAE;IACvH,IAAI,MAAM,KAAK,IAAI,EAAE;QACjB,OAAO,cAAc,CAAC;KACzB;IAED,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;IAEjC,IAAI;QACA,mDAAmD;QACnD,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC;KAC3B;IAAC,MAAM;QACJ,uDAAuD;QACvD,OAAO,CAAC,MAAM,EAAE,EAAE,CAAU,CAAC;KAChC;IAED,IAAI;QACA,oDAAoD;QACpD,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;KAC3B;IAAC,MAAM;QACJ,OAAO,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAU,CAAC;KAC1C;IAED,OAAO,cAAc,CAAC;AAC1B,CAAC,CAAC"}
@@ -4,10 +4,6 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.timingsrc = {}, global.subscribableThings, global.timingObject, global._slicedToArray));
5
5
  })(this, (function (exports, subscribableThings, timingObject, _slicedToArray) { 'use strict';
6
6
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
10
-
11
7
  var createComputeVelocity = function createComputeVelocity(timeConstant) {
12
8
  return function (delta, minValue, maxValue, velocity) {
13
9
  return Math.max(minValue, Math.min(maxValue, (timeConstant - delta) / timeConstant * velocity));
@@ -106,7 +102,7 @@
106
102
  };
107
103
 
108
104
  var createUpdateGradually = function createUpdateGradually(computeVelocity, _ref, threshold, tolerance, updateVectorWithNewPosition) {
109
- var _ref2 = _slicedToArray__default["default"](_ref, 2),
105
+ var _ref2 = _slicedToArray(_ref, 2),
110
106
  minValue = _ref2[0],
111
107
  maxValue = _ref2[1];
112
108
  return function (_ref3, currentTime, previousUpdateVectorWithCustomState) {
@@ -335,8 +331,8 @@
335
331
  // Bug #2: Chrome does not support values above 16.
336
332
  audio.playbackRate = 17;
337
333
  } catch (_unused) {
338
- // Bug #1: Chrome does not support values below 0.625.
339
- return [0.625, 16];
334
+ // Bug #1: Chrome does not support values below 0.0625.
335
+ return [0.0625, 16];
340
336
  }
341
337
  try {
342
338
  // Bug #3: Firefox does not support negative values.
@@ -381,6 +377,4 @@
381
377
  exports.setTimingsrc = setTimingsrc;
382
378
  exports.setTimingsrcWithCustomUpdateFunction = setTimingsrcWithCustomUpdateFunction;
383
379
 
384
- Object.defineProperty(exports, '__esModule', { value: true });
385
-
386
380
  }));
package/package.json CHANGED
@@ -9,29 +9,29 @@
9
9
  }
10
10
  },
11
11
  "dependencies": {
12
- "@babel/runtime": "^7.20.6",
13
- "subscribable-things": "^2.1.11",
14
- "timing-object": "^3.1.52",
12
+ "@babel/runtime": "^7.20.13",
13
+ "subscribable-things": "^2.1.12",
14
+ "timing-object": "^3.1.53",
15
15
  "tslib": "^2.4.1"
16
16
  },
17
17
  "description": "A library to synchronize a MediaElement with a TimingObject.",
18
18
  "devDependencies": {
19
- "@babel/core": "^7.20.5",
19
+ "@babel/core": "^7.20.12",
20
20
  "@babel/plugin-external-helpers": "^7.18.6",
21
21
  "@babel/plugin-transform-runtime": "^7.19.6",
22
22
  "@babel/preset-env": "^7.20.2",
23
- "@commitlint/cli": "^17.3.0",
24
- "@commitlint/config-angular": "^17.3.0",
25
- "@rollup/plugin-babel": "^5.3.1",
23
+ "@commitlint/cli": "^17.4.2",
24
+ "@commitlint/config-angular": "^17.4.2",
25
+ "@rollup/plugin-babel": "^6.0.3",
26
26
  "chai": "^4.3.7",
27
- "commitizen": "^4.2.6",
27
+ "commitizen": "^4.3.0",
28
28
  "cz-conventional-changelog": "^3.3.0",
29
- "eslint": "^8.29.0",
30
- "eslint-config-holy-grail": "^52.0.33",
29
+ "eslint": "^8.32.0",
30
+ "eslint-config-holy-grail": "^55.0.4",
31
31
  "grunt": "^1.5.3",
32
32
  "grunt-cli": "^1.4.3",
33
33
  "grunt-sh": "^0.2.0",
34
- "husky": "^8.0.2",
34
+ "husky": "^8.0.3",
35
35
  "karma": "^6.4.1",
36
36
  "karma-browserstack-launcher": "^1.6.0",
37
37
  "karma-chrome-launcher": "^3.1.1",
@@ -41,17 +41,17 @@
41
41
  "karma-sinon-chai": "^2.0.2",
42
42
  "karma-webpack": "^5.0.0",
43
43
  "load-grunt-config": "^4.0.1",
44
- "mocha": "^10.1.0",
45
- "prettier": "^2.8.1",
44
+ "mocha": "^10.2.0",
45
+ "prettier": "^2.8.3",
46
46
  "pretty-quick": "^3.1.3",
47
- "rimraf": "^3.0.2",
48
- "rollup": "^2.79.1",
49
- "sinon": "^14.0.2",
47
+ "rimraf": "^4.1.2",
48
+ "rollup": "^3.10.1",
49
+ "sinon": "^15.0.1",
50
50
  "sinon-chai": "^3.7.0",
51
51
  "ts-loader": "^9.4.2",
52
- "tsconfig-holy-grail": "^11.1.36",
52
+ "tsconfig-holy-grail": "^12.0.0",
53
53
  "tslint": "^6.1.3",
54
- "tslint-config-holy-grail": "^53.2.34",
54
+ "tslint-config-holy-grail": "^54.0.0",
55
55
  "typescript": "^4.9.4",
56
56
  "webpack": "^5.75.0"
57
57
  },
@@ -75,5 +75,5 @@
75
75
  "test": "grunt lint && grunt test"
76
76
  },
77
77
  "types": "build/es2019/module.d.ts",
78
- "version": "1.2.12"
78
+ "version": "1.2.14"
79
79
  }
@@ -13,8 +13,8 @@ export const determineSupportedPlaybackRateValues = (window: ReturnType<typeof c
13
13
  // Bug #2: Chrome does not support values above 16.
14
14
  audio.playbackRate = 17;
15
15
  } catch {
16
- // Bug #1: Chrome does not support values below 0.625.
17
- return [0.625, 16] as const;
16
+ // Bug #1: Chrome does not support values below 0.0625.
17
+ return [0.0625, 16] as const;
18
18
  }
19
19
 
20
20
  try {