@cornerstonejs/core 1.78.3 → 1.80.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.
- package/dist/cjs/RenderingEngine/VideoViewport.d.ts +2 -1
- package/dist/cjs/RenderingEngine/VideoViewport.js +13 -10
- package/dist/cjs/RenderingEngine/VideoViewport.js.map +1 -1
- package/dist/esm/RenderingEngine/VideoViewport.js +9 -4
- package/dist/esm/RenderingEngine/VideoViewport.js.map +1 -1
- package/dist/types/RenderingEngine/VideoViewport.d.ts +2 -1
- package/dist/types/RenderingEngine/VideoViewport.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/src/RenderingEngine/VideoViewport.ts +10 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.80.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"type": "individual",
|
|
48
48
|
"url": "https://ohif.org/donate"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8e008a3ae6c2018a0a113bffa7a6b6a06cd7b786"
|
|
51
51
|
}
|
|
@@ -335,9 +335,9 @@ class VideoViewport extends Viewport implements IVideoViewport {
|
|
|
335
335
|
public async play() {
|
|
336
336
|
try {
|
|
337
337
|
if (!this.isPlaying) {
|
|
338
|
+
this.isPlaying = true;
|
|
338
339
|
// Play returns a promise that is true when playing completes.
|
|
339
340
|
await this.videoElement.play();
|
|
340
|
-
this.isPlaying = true;
|
|
341
341
|
this.renderWhilstPlaying();
|
|
342
342
|
}
|
|
343
343
|
} catch (e) {
|
|
@@ -346,10 +346,10 @@ class VideoViewport extends Viewport implements IVideoViewport {
|
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
public
|
|
349
|
+
public pause() {
|
|
350
350
|
try {
|
|
351
|
-
await this.videoElement.pause();
|
|
352
351
|
this.isPlaying = false;
|
|
352
|
+
this.videoElement.pause();
|
|
353
353
|
} catch (e) {
|
|
354
354
|
// No-op - sometimes this happens on startup
|
|
355
355
|
}
|
|
@@ -808,7 +808,7 @@ class VideoViewport extends Viewport implements IVideoViewport {
|
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
public getSliceIndex() {
|
|
811
|
-
return this.getCurrentImageIdIndex();
|
|
811
|
+
return this.getCurrentImageIdIndex() / this.scrollSpeed;
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
public getCamera(): ICamera {
|
|
@@ -853,6 +853,10 @@ class VideoViewport extends Viewport implements IVideoViewport {
|
|
|
853
853
|
return isNaN(computedSlices) ? this.numberOfFrames : computedSlices;
|
|
854
854
|
};
|
|
855
855
|
|
|
856
|
+
public getFrameRate() {
|
|
857
|
+
return this.fps;
|
|
858
|
+
}
|
|
859
|
+
|
|
856
860
|
public getFrameOfReferenceUID = (): string => {
|
|
857
861
|
// The video itself is the frame of reference.
|
|
858
862
|
return this.videoElement.src;
|
|
@@ -1110,6 +1114,8 @@ class VideoViewport extends Viewport implements IVideoViewport {
|
|
|
1110
1114
|
element: this.element,
|
|
1111
1115
|
viewportId: this.id,
|
|
1112
1116
|
viewport: this,
|
|
1117
|
+
imageIndex: this.getCurrentImageIdIndex(),
|
|
1118
|
+
numberOfSlices: this.numberOfFrames,
|
|
1113
1119
|
renderingEngineId: this.renderingEngineId,
|
|
1114
1120
|
time: this.videoElement.currentTime,
|
|
1115
1121
|
duration: this.videoElement.duration,
|