Skip to content

Commit 4cda6ca

Browse files
authored
Fix issue to get accurate iframe video src (#573)
1 parent 08146f3 commit 4cda6ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/click-to-load.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ function replaceTrackingElement (widget, trackingElement, placeholderElement) {
523523
// from the DOM after they are collapsed. As a workaround, have the iframe
524524
// load a benign data URI, so that it's uncollapsed, before removing it from
525525
// the DOM. See https://crbug.com/1428971
526-
const originalSrc = elementToReplace.src
526+
const originalSrc = elementToReplace.src || elementToReplace.getAttribute('data-src')
527527
elementToReplace.src =
528528
'data:text/plain;charset=utf-8;base64,' + btoa('https://crbug.com/1428971')
529529

0 commit comments

Comments
 (0)