@micromag/screen-video-360 0.3.651 → 0.3.656

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
@@ -142,21 +142,21 @@ var Video360Screen = function Video360Screen(_ref) {
142
142
  var mediaShouldLoad = current || preload;
143
143
  var _ref2 = video || {},
144
144
  _ref2$media = _ref2.media,
145
- videoMedia = _ref2$media === undefined ? null : _ref2$media,
145
+ videoMedia = _ref2$media === void 0 ? null : _ref2$media,
146
146
  _ref2$closedCaptions = _ref2.closedCaptions,
147
- closedCaptions = _ref2$closedCaptions === undefined ? null : _ref2$closedCaptions,
147
+ closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
148
148
  _ref2$captions = _ref2.captions,
149
- captions = _ref2$captions === undefined ? null : _ref2$captions,
149
+ captions = _ref2$captions === void 0 ? null : _ref2$captions,
150
150
  _ref2$withSeekBar = _ref2.withSeekBar,
151
- withSeekBar = _ref2$withSeekBar === undefined ? false : _ref2$withSeekBar,
151
+ withSeekBar = _ref2$withSeekBar === void 0 ? false : _ref2$withSeekBar,
152
152
  _ref2$withControls = _ref2.withControls,
153
- withControls = _ref2$withControls === undefined ? false : _ref2$withControls,
153
+ withControls = _ref2$withControls === void 0 ? false : _ref2$withControls,
154
154
  _ref2$autoPlay = _ref2.autoPlay,
155
- autoPlay = _ref2$autoPlay === undefined ? true : _ref2$autoPlay,
155
+ autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
156
156
  _ref2$color = _ref2.color,
157
- color = _ref2$color === undefined ? null : _ref2$color,
157
+ color = _ref2$color === void 0 ? null : _ref2$color,
158
158
  _ref2$progressColor = _ref2.progressColor,
159
- progressColor = _ref2$progressColor === undefined ? null : _ref2$progressColor;
159
+ progressColor = _ref2$progressColor === void 0 ? null : _ref2$progressColor;
160
160
  var videoContainerRef = useRef();
161
161
  var _usePlaybackContext = usePlaybackContext(),
162
162
  playing = _usePlaybackContext.playing,
@@ -287,17 +287,17 @@ var Video360Screen = function Video360Screen(_ref) {
287
287
  }) : null;
288
288
  var _ref5 = videoMedia || {},
289
289
  _ref5$metadata = _ref5.metadata,
290
- videoMetadata = _ref5$metadata === undefined ? null : _ref5$metadata,
290
+ videoMetadata = _ref5$metadata === void 0 ? null : _ref5$metadata,
291
291
  _ref5$url = _ref5.url,
292
- videoUrl = _ref5$url === undefined ? null : _ref5$url,
292
+ videoUrl = _ref5$url === void 0 ? null : _ref5$url,
293
293
  _ref5$thumbnail_url = _ref5.thumbnail_url,
294
- thumbnailUrl = _ref5$thumbnail_url === undefined ? null : _ref5$thumbnail_url;
294
+ thumbnailUrl = _ref5$thumbnail_url === void 0 ? null : _ref5$thumbnail_url;
295
295
  var hasVideoUrl = videoUrl !== null;
296
296
  var _ref6 = videoMetadata || {},
297
297
  _ref6$width = _ref6.width,
298
- videoWidth = _ref6$width === undefined ? 0 : _ref6$width,
298
+ videoWidth = _ref6$width === void 0 ? 0 : _ref6$width,
299
299
  _ref6$height = _ref6.height,
300
- videoHeight = _ref6$height === undefined ? 0 : _ref6$height;
300
+ videoHeight = _ref6$height === void 0 ? 0 : _ref6$height;
301
301
  var hasThumbnail = thumbnailUrl !== null;
302
302
  var _useState7 = useState(!hasThumbnail),
303
303
  _useState8 = _slicedToArray(_useState7, 2),
@@ -364,19 +364,19 @@ var Video360Screen = function Video360Screen(_ref) {
364
364
  if (THREE !== null && hasVideoUrl && withVideoSphere) {
365
365
  var _ref7 = THREE || {},
366
366
  _ref7$Scene = _ref7.Scene,
367
- Scene = _ref7$Scene === undefined ? null : _ref7$Scene,
367
+ Scene = _ref7$Scene === void 0 ? null : _ref7$Scene,
368
368
  _ref7$PerspectiveCame = _ref7.PerspectiveCamera,
369
- PerspectiveCamera = _ref7$PerspectiveCame === undefined ? null : _ref7$PerspectiveCame,
369
+ PerspectiveCamera = _ref7$PerspectiveCame === void 0 ? null : _ref7$PerspectiveCame,
370
370
  _ref7$SphereBufferGeo = _ref7.SphereBufferGeometry,
371
- SphereBufferGeometry = _ref7$SphereBufferGeo === undefined ? null : _ref7$SphereBufferGeo,
371
+ SphereBufferGeometry = _ref7$SphereBufferGeo === void 0 ? null : _ref7$SphereBufferGeo,
372
372
  _ref7$VideoTexture = _ref7.VideoTexture,
373
- VideoTexture = _ref7$VideoTexture === undefined ? null : _ref7$VideoTexture,
373
+ VideoTexture = _ref7$VideoTexture === void 0 ? null : _ref7$VideoTexture,
374
374
  _ref7$MeshBasicMateri = _ref7.MeshBasicMaterial,
375
- MeshBasicMaterial = _ref7$MeshBasicMateri === undefined ? null : _ref7$MeshBasicMateri,
375
+ MeshBasicMaterial = _ref7$MeshBasicMateri === void 0 ? null : _ref7$MeshBasicMateri,
376
376
  _ref7$Mesh = _ref7.Mesh,
377
- Mesh = _ref7$Mesh === undefined ? null : _ref7$Mesh,
377
+ Mesh = _ref7$Mesh === void 0 ? null : _ref7$Mesh,
378
378
  _ref7$WebGLRenderer = _ref7.WebGLRenderer,
379
- WebGLRenderer = _ref7$WebGLRenderer === undefined ? null : _ref7$WebGLRenderer;
379
+ WebGLRenderer = _ref7$WebGLRenderer === void 0 ? null : _ref7$WebGLRenderer;
380
380
  if (Scene === null || PerspectiveCamera === null || SphereBufferGeometry === null || VideoTexture === null || MeshBasicMaterial === null || Mesh === null || WebGLRenderer === null) {
381
381
  return function () {
382
382
  camera.current = null;
@@ -393,7 +393,7 @@ var Video360Screen = function Video360Screen(_ref) {
393
393
  geometry.scale(-1, 1, 1);
394
394
  var _ref8 = mediaRef || {},
395
395
  _ref8$current = _ref8.current,
396
- videoElement = _ref8$current === undefined ? null : _ref8$current;
396
+ videoElement = _ref8$current === void 0 ? null : _ref8$current;
397
397
  var videoTexture = new VideoTexture(videoElement);
398
398
  var videoMaterial = new MeshBasicMaterial({
399
399
  map: videoTexture
@@ -454,18 +454,18 @@ var Video360Screen = function Video360Screen(_ref) {
454
454
  if (pointerDown.current) {
455
455
  var _ref9 = e || {},
456
456
  _ref9$clientX = _ref9.clientX,
457
- clientX = _ref9$clientX === undefined ? null : _ref9$clientX,
457
+ clientX = _ref9$clientX === void 0 ? null : _ref9$clientX,
458
458
  _ref9$clientY = _ref9.clientY,
459
- clientY = _ref9$clientY === undefined ? null : _ref9$clientY;
459
+ clientY = _ref9$clientY === void 0 ? null : _ref9$clientY;
460
460
  var downDeltaX = pointerDownX.current - clientX;
461
461
  var downDeltaY = pointerDownY.current - clientY;
462
462
  lon.current = downDeltaX * 0.2 + pointerLon.current;
463
463
  lat.current = downDeltaY * 0.2 + pointerLat.current;
464
464
  var _ref10 = lastPointerClient.current || {},
465
465
  _ref10$x = _ref10.x,
466
- lastX = _ref10$x === undefined ? clientX : _ref10$x,
466
+ lastX = _ref10$x === void 0 ? clientX : _ref10$x,
467
467
  _ref10$y = _ref10.y,
468
- lastY = _ref10$y === undefined ? clientY : _ref10$y;
468
+ lastY = _ref10$y === void 0 ? clientY : _ref10$y;
469
469
  var deltaX = Math.abs(lastX - clientX) || 0;
470
470
  var deltaY = Math.abs(lastY - clientY) || 0;
471
471
  pixelsMoved.current += deltaX + deltaY;
@@ -497,7 +497,7 @@ var Video360Screen = function Video360Screen(_ref) {
497
497
  if (validNavigateTap) {
498
498
  var _videoContainer$getBo = videoContainer.getBoundingClientRect(),
499
499
  _videoContainer$getBo2 = _videoContainer$getBo.left,
500
- containerX = _videoContainer$getBo2 === undefined ? 0 : _videoContainer$getBo2,
500
+ containerX = _videoContainer$getBo2 === void 0 ? 0 : _videoContainer$getBo2,
501
501
  containerWidth = _videoContainer$getBo.width;
502
502
  var hasTappedLeft = e.clientX - containerX < containerWidth * (1 - tapNextScreenWidthPercent);
503
503
  if (hasTappedLeft) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-video-360",
3
- "version": "0.3.651",
3
+ "version": "0.3.656",
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.651",
65
- "@micromag/element-background": "^0.3.651",
66
- "@micromag/element-closed-captions": "^0.3.651",
67
- "@micromag/element-container": "^0.3.651",
68
- "@micromag/element-footer": "^0.3.651",
69
- "@micromag/element-header": "^0.3.651",
70
- "@micromag/element-image": "^0.3.651",
71
- "@micromag/element-video": "^0.3.651",
72
- "@micromag/transforms": "^0.3.651",
64
+ "@micromag/core": "^0.3.656",
65
+ "@micromag/element-background": "^0.3.656",
66
+ "@micromag/element-closed-captions": "^0.3.656",
67
+ "@micromag/element-container": "^0.3.656",
68
+ "@micromag/element-footer": "^0.3.656",
69
+ "@micromag/element-header": "^0.3.656",
70
+ "@micromag/element-image": "^0.3.656",
71
+ "@micromag/element-video": "^0.3.656",
72
+ "@micromag/transforms": "^0.3.656",
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": "9639dccc046f7adfe9673f53ede77360b8b75d51"
84
+ "gitHead": "fd956cc4a183b621df124f3f3afbae4af974db27"
85
85
  }