Browse Source

Rename getter

customisations
alemart 10 months ago
parent
commit
b278c5c396

+ 2
- 2
src/core/session.ts View File

172
         // setup the viewport
172
         // setup the viewport
173
         this._viewport = viewport;
173
         this._viewport = viewport;
174
         if(this._primarySource !== null)
174
         if(this._primarySource !== null)
175
-            this._viewport._init(() => this._primarySource!._data.size, mode);
175
+            this._viewport._init(() => this._primarySource!._internalMedia.size, mode);
176
         else
176
         else
177
             this._viewport._init(() => Utils.resolution('sm', window.innerWidth / window.innerHeight), mode);
177
             this._viewport._init(() => Utils.resolution('sm', window.innerWidth / window.innerHeight), mode);
178
 
178
 
529
      */
529
      */
530
     private _renderUserMedia(): void
530
     private _renderUserMedia(): void
531
     {
531
     {
532
-        const media = this._primarySource?._data;
532
+        const media = this._primarySource?._internalMedia;
533
         const canvas = this._viewport._backgroundCanvas;
533
         const canvas = this._viewport._backgroundCanvas;
534
         const ctx = canvas.getContext('2d', { alpha: false });
534
         const ctx = canvas.getContext('2d', { alpha: false });
535
 
535
 

+ 1
- 1
src/sources/canvas-source.ts View File

64
      * Get media
64
      * Get media
65
      * @internal
65
      * @internal
66
      */
66
      */
67
-    get _data(): SpeedyMedia
67
+    get _internalMedia(): SpeedyMedia
68
     {
68
     {
69
         if(this._media == null)
69
         if(this._media == null)
70
             throw new IllegalOperationError(`The media of the source of data isn't loaded`);
70
             throw new IllegalOperationError(`The media of the source of data isn't loaded`);

+ 1
- 1
src/sources/video-source.ts View File

71
      * Get media
71
      * Get media
72
      * @internal
72
      * @internal
73
      */
73
      */
74
-    get _data(): SpeedyMedia
74
+    get _internalMedia(): SpeedyMedia
75
     {
75
     {
76
         if(this._media == null)
76
         if(this._media == null)
77
             throw new IllegalOperationError(`The media of the source of data isn't loaded`);
77
             throw new IllegalOperationError(`The media of the source of data isn't loaded`);

+ 1
- 1
src/trackers/image-tracker/image-tracker.ts View File

310
 
310
 
311
         // compute the screen size for image processing purposes
311
         // compute the screen size for image processing purposes
312
         // note: this may change over time...!
312
         // note: this may change over time...!
313
-        const media = this._source!._data;
313
+        const media = this._source!._internalMedia;
314
         const aspectRatio = media.width / media.height;
314
         const aspectRatio = media.width / media.height;
315
         const screenSize = Utils.resolution(this._resolution, aspectRatio);
315
         const screenSize = Utils.resolution(this._resolution, aspectRatio);
316
 
316
 

Loading…
Cancel
Save