@micromag/screen-video-360 0.3.607 → 0.3.608

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.
Files changed (2) hide show
  1. package/es/index.js +26 -26
  2. package/package.json +11 -11
package/es/index.js CHANGED
@@ -141,21 +141,21 @@ var Video360Screen = function Video360Screen(_ref) {
141
141
  var mediaShouldLoad = current || preload;
142
142
  var _ref2 = video || {},
143
143
  _ref2$media = _ref2.media,
144
- videoMedia = _ref2$media === void 0 ? null : _ref2$media,
144
+ videoMedia = _ref2$media === undefined ? null : _ref2$media,
145
145
  _ref2$closedCaptions = _ref2.closedCaptions,
146
- closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
146
+ closedCaptions = _ref2$closedCaptions === undefined ? null : _ref2$closedCaptions,
147
147
  _ref2$captions = _ref2.captions,
148
- captions = _ref2$captions === void 0 ? null : _ref2$captions,
148
+ captions = _ref2$captions === undefined ? null : _ref2$captions,
149
149
  _ref2$withSeekBar = _ref2.withSeekBar,
150
- withSeekBar = _ref2$withSeekBar === void 0 ? false : _ref2$withSeekBar,
150
+ withSeekBar = _ref2$withSeekBar === undefined ? false : _ref2$withSeekBar,
151
151
  _ref2$withControls = _ref2.withControls,
152
- withControls = _ref2$withControls === void 0 ? false : _ref2$withControls,
152
+ withControls = _ref2$withControls === undefined ? false : _ref2$withControls,
153
153
  _ref2$autoPlay = _ref2.autoPlay,
154
- autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
154
+ autoPlay = _ref2$autoPlay === undefined ? true : _ref2$autoPlay,
155
155
  _ref2$color = _ref2.color,
156
- color = _ref2$color === void 0 ? null : _ref2$color,
156
+ color = _ref2$color === undefined ? null : _ref2$color,
157
157
  _ref2$progressColor = _ref2.progressColor,
158
- progressColor = _ref2$progressColor === void 0 ? null : _ref2$progressColor;
158
+ progressColor = _ref2$progressColor === undefined ? null : _ref2$progressColor;
159
159
  var videoContainerRef = useRef();
160
160
  var _usePlaybackContext = usePlaybackContext(),
161
161
  playing = _usePlaybackContext.playing,
@@ -286,17 +286,17 @@ var Video360Screen = function Video360Screen(_ref) {
286
286
  }) : null;
287
287
  var _ref5 = videoMedia || {},
288
288
  _ref5$metadata = _ref5.metadata,
289
- videoMetadata = _ref5$metadata === void 0 ? null : _ref5$metadata,
289
+ videoMetadata = _ref5$metadata === undefined ? null : _ref5$metadata,
290
290
  _ref5$url = _ref5.url,
291
- videoUrl = _ref5$url === void 0 ? null : _ref5$url,
291
+ videoUrl = _ref5$url === undefined ? null : _ref5$url,
292
292
  _ref5$thumbnail_url = _ref5.thumbnail_url,
293
- thumbnailUrl = _ref5$thumbnail_url === void 0 ? null : _ref5$thumbnail_url;
293
+ thumbnailUrl = _ref5$thumbnail_url === undefined ? null : _ref5$thumbnail_url;
294
294
  var hasVideoUrl = videoUrl !== null;
295
295
  var _ref6 = videoMetadata || {},
296
296
  _ref6$width = _ref6.width,
297
- videoWidth = _ref6$width === void 0 ? 0 : _ref6$width,
297
+ videoWidth = _ref6$width === undefined ? 0 : _ref6$width,
298
298
  _ref6$height = _ref6.height,
299
- videoHeight = _ref6$height === void 0 ? 0 : _ref6$height;
299
+ videoHeight = _ref6$height === undefined ? 0 : _ref6$height;
300
300
  var hasThumbnail = thumbnailUrl !== null;
301
301
  var _useState7 = useState(!hasThumbnail),
302
302
  _useState8 = _slicedToArray(_useState7, 2),
@@ -363,19 +363,19 @@ var Video360Screen = function Video360Screen(_ref) {
363
363
  if (THREE !== null && hasVideoUrl && withVideoSphere) {
364
364
  var _ref7 = THREE || {},
365
365
  _ref7$Scene = _ref7.Scene,
366
- Scene = _ref7$Scene === void 0 ? null : _ref7$Scene,
366
+ Scene = _ref7$Scene === undefined ? null : _ref7$Scene,
367
367
  _ref7$PerspectiveCame = _ref7.PerspectiveCamera,
368
- PerspectiveCamera = _ref7$PerspectiveCame === void 0 ? null : _ref7$PerspectiveCame,
368
+ PerspectiveCamera = _ref7$PerspectiveCame === undefined ? null : _ref7$PerspectiveCame,
369
369
  _ref7$SphereBufferGeo = _ref7.SphereBufferGeometry,
370
- SphereBufferGeometry = _ref7$SphereBufferGeo === void 0 ? null : _ref7$SphereBufferGeo,
370
+ SphereBufferGeometry = _ref7$SphereBufferGeo === undefined ? null : _ref7$SphereBufferGeo,
371
371
  _ref7$VideoTexture = _ref7.VideoTexture,
372
- VideoTexture = _ref7$VideoTexture === void 0 ? null : _ref7$VideoTexture,
372
+ VideoTexture = _ref7$VideoTexture === undefined ? null : _ref7$VideoTexture,
373
373
  _ref7$MeshBasicMateri = _ref7.MeshBasicMaterial,
374
- MeshBasicMaterial = _ref7$MeshBasicMateri === void 0 ? null : _ref7$MeshBasicMateri,
374
+ MeshBasicMaterial = _ref7$MeshBasicMateri === undefined ? null : _ref7$MeshBasicMateri,
375
375
  _ref7$Mesh = _ref7.Mesh,
376
- Mesh = _ref7$Mesh === void 0 ? null : _ref7$Mesh,
376
+ Mesh = _ref7$Mesh === undefined ? null : _ref7$Mesh,
377
377
  _ref7$WebGLRenderer = _ref7.WebGLRenderer,
378
- WebGLRenderer = _ref7$WebGLRenderer === void 0 ? null : _ref7$WebGLRenderer;
378
+ WebGLRenderer = _ref7$WebGLRenderer === undefined ? null : _ref7$WebGLRenderer;
379
379
  if (Scene === null || PerspectiveCamera === null || SphereBufferGeometry === null || VideoTexture === null || MeshBasicMaterial === null || Mesh === null || WebGLRenderer === null) {
380
380
  return function () {
381
381
  camera.current = null;
@@ -392,7 +392,7 @@ var Video360Screen = function Video360Screen(_ref) {
392
392
  geometry.scale(-1, 1, 1);
393
393
  var _ref8 = mediaRef || {},
394
394
  _ref8$current = _ref8.current,
395
- videoElement = _ref8$current === void 0 ? null : _ref8$current;
395
+ videoElement = _ref8$current === undefined ? null : _ref8$current;
396
396
  var videoTexture = new VideoTexture(videoElement);
397
397
  var videoMaterial = new MeshBasicMaterial({
398
398
  map: videoTexture
@@ -453,18 +453,18 @@ var Video360Screen = function Video360Screen(_ref) {
453
453
  if (pointerDown.current) {
454
454
  var _ref9 = e || {},
455
455
  _ref9$clientX = _ref9.clientX,
456
- clientX = _ref9$clientX === void 0 ? null : _ref9$clientX,
456
+ clientX = _ref9$clientX === undefined ? null : _ref9$clientX,
457
457
  _ref9$clientY = _ref9.clientY,
458
- clientY = _ref9$clientY === void 0 ? null : _ref9$clientY;
458
+ clientY = _ref9$clientY === undefined ? null : _ref9$clientY;
459
459
  var downDeltaX = pointerDownX.current - clientX;
460
460
  var downDeltaY = pointerDownY.current - clientY;
461
461
  lon.current = downDeltaX * 0.2 + pointerLon.current;
462
462
  lat.current = downDeltaY * 0.2 + pointerLat.current;
463
463
  var _ref10 = lastPointerClient.current || {},
464
464
  _ref10$x = _ref10.x,
465
- lastX = _ref10$x === void 0 ? clientX : _ref10$x,
465
+ lastX = _ref10$x === undefined ? clientX : _ref10$x,
466
466
  _ref10$y = _ref10.y,
467
- lastY = _ref10$y === void 0 ? clientY : _ref10$y;
467
+ lastY = _ref10$y === undefined ? clientY : _ref10$y;
468
468
  var deltaX = Math.abs(lastX - clientX) || 0;
469
469
  var deltaY = Math.abs(lastY - clientY) || 0;
470
470
  pixelsMoved.current += deltaX + deltaY;
@@ -496,7 +496,7 @@ var Video360Screen = function Video360Screen(_ref) {
496
496
  if (validNavigateTap) {
497
497
  var _videoContainer$getBo = videoContainer.getBoundingClientRect(),
498
498
  _videoContainer$getBo2 = _videoContainer$getBo.left,
499
- containerX = _videoContainer$getBo2 === void 0 ? 0 : _videoContainer$getBo2,
499
+ containerX = _videoContainer$getBo2 === undefined ? 0 : _videoContainer$getBo2,
500
500
  containerWidth = _videoContainer$getBo.width;
501
501
  var hasTappedLeft = e.clientX - containerX < containerWidth * (1 - tapNextScreenWidthPercent);
502
502
  if (hasTappedLeft) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-video-360",
3
- "version": "0.3.607",
3
+ "version": "0.3.608",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -61,15 +61,15 @@
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.13.10",
63
63
  "@folklore/size": "^0.1.20",
64
- "@micromag/core": "^0.3.607",
65
- "@micromag/element-background": "^0.3.607",
66
- "@micromag/element-closed-captions": "^0.3.607",
67
- "@micromag/element-container": "^0.3.607",
68
- "@micromag/element-footer": "^0.3.607",
69
- "@micromag/element-header": "^0.3.607",
70
- "@micromag/element-image": "^0.3.607",
71
- "@micromag/element-video": "^0.3.607",
72
- "@micromag/transforms": "^0.3.607",
64
+ "@micromag/core": "^0.3.608",
65
+ "@micromag/element-background": "^0.3.608",
66
+ "@micromag/element-closed-captions": "^0.3.608",
67
+ "@micromag/element-container": "^0.3.608",
68
+ "@micromag/element-footer": "^0.3.608",
69
+ "@micromag/element-header": "^0.3.608",
70
+ "@micromag/element-image": "^0.3.608",
71
+ "@micromag/element-video": "^0.3.608",
72
+ "@micromag/transforms": "^0.3.608",
73
73
  "classnames": "^2.2.6",
74
74
  "lodash": "^4.17.21",
75
75
  "prop-types": "^15.7.2",
@@ -81,5 +81,5 @@
81
81
  "access": "public",
82
82
  "registry": "https://registry.npmjs.org/"
83
83
  },
84
- "gitHead": "635ee4c6bf057273a9c90bde7c80134ad92ebb9c"
84
+ "gitHead": "02f8cfe4dde0c33bec9ed7c3bdb671cd8acf78bc"
85
85
  }