@shopgate/pwa-common 6.23.5 → 6.23.6

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.
@@ -17,7 +17,8 @@ _this.isPending=true;_this.remoteScriptUrl=scriptUrl;_this.deferred=[];return _t
17
17
  * @override
18
18
  * @param {ParentNode} container A DOM container.
19
19
  * @returns {VimeoMediaProvider}
20
- */},{key:"add",value:function add(container){var _this3=this;if(!this.checkScriptLoadingStatus()){this.deferred.push(container);return this;}var iframes=this.getMediaContainers(container);if(!iframes.length){return this;}var players=[];iframes.forEach(function(iframe){_this3.responsify(iframe);players.push(new window.Vimeo.Player(iframe));});this.containers.set(container,players);return this;}/**
20
+ */},{key:"add",value:function add(container){var _this3=this;if(!this.checkScriptLoadingStatus()){this.deferred.push(container);return this;}var iframes=this.getMediaContainers(container);if(!iframes.length){return this;}var players=[];iframes.forEach(function(iframe,index){// Block clicks on Vimeo icon
21
+ iframes[index].sandbox='allow-forms allow-scripts allow-pointer-lock allow-same-origin allow-top-navigation';_this3.responsify(iframe);players.push(new window.Vimeo.Player(iframe));});this.containers.set(container,players);return this;}/**
21
22
  * Stops all playing videos within the DOM containers.
22
23
  * @override
23
24
  * @returns {VimeoMediaProvider}
@@ -10,7 +10,8 @@ function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeo
10
10
  * @param {ParentNode} container A DOM container.
11
11
  * @returns {YouTubeMediaProvider}
12
12
  */},{key:"add",value:function add(container){var _this=this;var iframes=this.getMediaContainers(container);if(!iframes.length){return this;}// Update the video urls to enable stopping videos via the event API.
13
- iframes.forEach(function(iframe,index){_this.responsify(iframe);var src=iframe.src;var _src$split=src.split('?'),_src$split2=_slicedToArray(_src$split,2),url=_src$split2[0],query=_src$split2[1];var urlParams=new URLSearchParams(query);// Enable the js api to allow sending events to the iframe.
13
+ iframes.forEach(function(iframe,index){// Block clicks on YouTube icon
14
+ iframes[index].sandbox='allow-forms allow-scripts allow-pointer-lock allow-same-origin allow-top-navigation';_this.responsify(iframe);var src=iframe.src;var _src$split=src.split('?'),_src$split2=_slicedToArray(_src$split,2),url=_src$split2[0],query=_src$split2[1];var urlParams=new URLSearchParams(query);// Enable the js api to allow sending events to the iframe.
14
15
  urlParams.set('enablejsapi',1);// Enable controls to avoid the iframe not being resumable because of controls=0 param on ios.
15
16
  urlParams.set('controls',1);iframes[index].src="".concat(url,"?").concat(urlParams.toString());});this.containers.set(container,iframes);return this;}/**
16
17
  * Stops all playing videos within the DOM containers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common",
3
- "version": "6.23.5",
3
+ "version": "6.23.6",
4
4
  "description": "Common library for the Shopgate Connect PWA.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@sentry/browser": "^4.6.3",
19
- "@shopgate/pwa-benchmark": "6.23.5",
19
+ "@shopgate/pwa-benchmark": "6.23.6",
20
20
  "@virtuous/conductor": "~2.4.0",
21
21
  "@virtuous/react-conductor": "~2.4.0",
22
22
  "@virtuous/redux-persister": "1.1.0-beta.7",
@@ -44,7 +44,7 @@
44
44
  "url-search-params": "^0.10.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@shopgate/pwa-core": "6.23.5",
47
+ "@shopgate/pwa-core": "6.23.6",
48
48
  "lodash": "^4.17.4",
49
49
  "prop-types": "~15.7.2",
50
50
  "react": "~16.12.0",