@adobe/helix-rum-enhancer 2.13.0 → 2.14.0

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [2.14.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.13.0...v2.14.0) (2024-06-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **viewmedia:** expand view media tracking to all images that are there at render time ([d7a1715](https://github.com/adobe/helix-rum-enhancer/commit/d7a17158cf6ef2023ca36811ac5e436b6f18847e))
7
+
1
8
  # [2.13.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.12.0...v2.13.0) (2024-06-11)
2
9
 
3
10
 
@@ -274,7 +274,7 @@
274
274
  function addViewMediaTracking(parent) {
275
275
  const mediaobserver = getIntersectionObsever('viewmedia');
276
276
  if (mediaobserver) {
277
- parent.querySelectorAll('picture > img, video, audio, iframe').forEach((m) => {
277
+ parent.querySelectorAll('img, video, audio, iframe').forEach((m) => {
278
278
  if (!m.closest('div .block') || m.closest('div[data-block-status="loaded"]')) {
279
279
  mediaobserver.observe(m);
280
280
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -274,7 +274,7 @@ function addViewBlockTracking(element) {
274
274
  function addViewMediaTracking(parent) {
275
275
  const mediaobserver = getIntersectionObsever('viewmedia');
276
276
  if (mediaobserver) {
277
- parent.querySelectorAll('picture > img, video, audio, iframe').forEach((m) => {
277
+ parent.querySelectorAll('img, video, audio, iframe').forEach((m) => {
278
278
  if (!m.closest('div .block') || m.closest('div[data-block-status="loaded"]')) {
279
279
  mediaobserver.observe(m);
280
280
  }