@cornerstonejs/core 6.0.0-beta.0 → 6.0.0-beta.1

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.
@@ -784,12 +784,34 @@ async function waitForVideoReady(element) {
784
784
  cleanup();
785
785
  resolve();
786
786
  };
787
+ const onSuspend = () => {
788
+ if (element.readyState < HTMLMediaElement.HAVE_CURRENT_DATA) {
789
+ element.removeEventListener('suspend', onSuspend);
790
+ playMutedForFrameData(element);
791
+ }
792
+ };
787
793
  const cleanup = () => {
788
794
  element.removeEventListener('loadeddata', onReady);
789
795
  element.removeEventListener('canplay', onReady);
796
+ element.removeEventListener('suspend', onSuspend);
790
797
  };
791
798
  element.addEventListener('loadeddata', onReady, { once: true });
792
799
  element.addEventListener('canplay', onReady, { once: true });
800
+ element.addEventListener('suspend', onSuspend);
801
+ if (element.networkState === HTMLMediaElement.NETWORK_IDLE) {
802
+ onSuspend();
803
+ }
804
+ });
805
+ }
806
+ function playMutedForFrameData(element) {
807
+ const { muted } = element;
808
+ element.muted = true;
809
+ element
810
+ .play()
811
+ .then(() => element.pause())
812
+ .catch(() => undefined)
813
+ .finally(() => {
814
+ element.muted = muted;
793
815
  });
794
816
  }
795
817
  async function seekVideoElement(element, timeSeconds) {
@@ -1 +1 @@
1
- export declare const version = "6.0.0-beta.0";
1
+ export declare const version = "6.0.0-beta.1";
@@ -1 +1 @@
1
- export const version = '6.0.0-beta.0';
1
+ export const version = '6.0.0-beta.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "6.0.0-beta.0",
3
+ "version": "6.0.0-beta.1",
4
4
  "description": "Cornerstone3D Core",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -85,18 +85,18 @@
85
85
  "prepublishOnly": "pnpm run build"
86
86
  },
87
87
  "dependencies": {
88
- "@cornerstonejs/utils": "6.0.0-beta.0",
88
+ "@cornerstonejs/utils": "6.0.0-beta.1",
89
89
  "@kitware/vtk.js": "36.4.1",
90
90
  "comlink": "4.4.2",
91
91
  "gl-matrix": "3.4.3",
92
92
  "loglevel": "1.9.2"
93
93
  },
94
94
  "devDependencies": {
95
- "@cornerstonejs/metadata": "6.0.0-beta.0"
95
+ "@cornerstonejs/metadata": "6.0.0-beta.1"
96
96
  },
97
97
  "peerDependencies": {
98
- "@cornerstonejs/metadata": "6.0.0-beta.0",
99
- "@cornerstonejs/utils": "6.0.0-beta.0"
98
+ "@cornerstonejs/metadata": "6.0.0-beta.1",
99
+ "@cornerstonejs/utils": "6.0.0-beta.1"
100
100
  },
101
101
  "contributors": [
102
102
  {