From 7e9d6173c07396ccac19803140efa77de74c5f2e Mon Sep 17 00:00:00 2001 From: Ariel Ashri Date: Sun, 1 Oct 2023 15:11:12 +0300 Subject: [PATCH 1/4] CLOUDINARY-469 - change version pattern to v1.19.90 --- composer.json | 2 +- etc/module.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1a0f919..880b1aa 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "cloudinary/cloudinary", "description": "Cloudinary Magento 2 Integration.", "type": "magento2-module", - "version": "1.19.8.1", + "version": "1.19.90", "license": "MIT", "require": { "cloudinary/cloudinary_php": ">=2.7 <=2.11.0" diff --git a/etc/module.xml b/etc/module.xml index dbb10f4..7de462a 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + From 35fd1126eca6e4d6bd8ebee378cbd375fdce5227 Mon Sep 17 00:00:00 2001 From: Ariel Ashri Date: Mon, 27 Nov 2023 12:11:43 +0200 Subject: [PATCH 2/4] CLOUDINARY-476 - fix bug: Product Videos (Vimeo) - MAG-847 --- composer.json | 2 +- etc/csp_whitelist.xml | 2 + etc/module.xml | 2 +- view/frontend/web/js/load-player.js | 98 ++++++++++++++--------------- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/composer.json b/composer.json index 880b1aa..2f347c6 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "cloudinary/cloudinary", "description": "Cloudinary Magento 2 Integration.", "type": "magento2-module", - "version": "1.19.90", + "version": "1.19.91", "license": "MIT", "require": { "cloudinary/cloudinary_php": ">=2.7 <=2.11.0" diff --git a/etc/csp_whitelist.xml b/etc/csp_whitelist.xml index 2e5afe9..bdb7949 100644 --- a/etc/csp_whitelist.xml +++ b/etc/csp_whitelist.xml @@ -6,6 +6,8 @@ cloudinary.com *.cloudinary.com cdnjs.cloudflare.com + *.youtube.com + *.vimeo.com diff --git a/etc/module.xml b/etc/module.xml index 7de462a..a2927dd 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/view/frontend/web/js/load-player.js b/view/frontend/web/js/load-player.js index 8be12c8..0ed669a 100644 --- a/view/frontend/web/js/load-player.js +++ b/view/frontend/web/js/load-player.js @@ -10,8 +10,8 @@ define( [ - 'jquery', - 'jquery-ui-modules/widget' + 'jquery', + 'jquery-ui-modules/widget' ], function ($) { 'use strict'; @@ -59,19 +59,19 @@ define( */ _create: function () { switch (this.element.data('type')) { - case 'youtube': - this.element.videoYoutube(); - this._player = this.element.data('mageVideoYoutube'); + case 'youtube': + this.element.videoYoutube(); + this._player = this.element.data('mageVideoYoutube'); break; - case 'vimeo': - this.element.videoVimeo(); - this._player = this.element.data('mageVideoVimeo'); + case 'vimeo': + this.element.videoVimeo(); + this._player = this.element.data('mageVideoVimeo'); break; - case 'cloudinary': - this.element.videoCloudinary(); - this._player = this.element.data('mageVideoCloudinary'); + case 'cloudinary': + this.element.videoCloudinary(); + this._player = this.element.data('mageVideoCloudinary'); break; - default: + default: throw { name: 'Video Error', message: 'Unknown video type', @@ -82,7 +82,7 @@ define( toString: function () { return this.name + ': ' + this.message; } - }; + }; } }, @@ -226,11 +226,11 @@ define( */ onStateChange: function (data) { switch (window.parseInt(data.data, 10)) { - case 1: - self._playing = true; + case 1: + self._playing = true; break; - default: - self._playing = false; + default: + self._playing = false; break; } @@ -339,7 +339,7 @@ define( _create: function () { var timestamp, additionalParams = '', - src; + src, id; this._initialize(); timestamp = new Date().getTime(); @@ -357,27 +357,25 @@ define( this._code + timestamp + additionalParams; + id = 'vimeo' + this._code + timestamp; this.element.append( $('