@ecency/render-helper 2.4.8 → 2.4.9
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/dist/node/index.mjs
CHANGED
|
@@ -864,7 +864,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
864
864
|
const imgEls2 = el.getElementsByTagName("img");
|
|
865
865
|
if (imgEls2.length === 1 || el.textContent.trim() === href) {
|
|
866
866
|
if ((match[1] || match[2]) && match[3]) {
|
|
867
|
-
const videoHref = `https://3speak.tv/
|
|
867
|
+
const videoHref = `https://play.3speak.tv/watch?v=${match[3]}&mode=iframe`;
|
|
868
868
|
el.setAttribute("class", "markdown-video-link markdown-video-link-speak");
|
|
869
869
|
el.removeAttribute("href");
|
|
870
870
|
el.setAttribute("data-embed-src", videoHref);
|
|
@@ -997,7 +997,11 @@ function iframe(el, parentDomain = "ecency.com") {
|
|
|
997
997
|
return;
|
|
998
998
|
}
|
|
999
999
|
if (src.match(SPEAK_EMBED_REGEX)) {
|
|
1000
|
-
let normalizedSrc = src.replace(/3speak\.[a-z]+/i, "3speak.tv");
|
|
1000
|
+
let normalizedSrc = src.replace(/3speak\.[a-z]+/i, "play.3speak.tv");
|
|
1001
|
+
const hasMode = /[?&]mode=/.test(normalizedSrc);
|
|
1002
|
+
if (!hasMode) {
|
|
1003
|
+
normalizedSrc = `${normalizedSrc}&mode=iframe`;
|
|
1004
|
+
}
|
|
1001
1005
|
const hasAutoplay = /[?&]autoplay=/.test(normalizedSrc);
|
|
1002
1006
|
const s = hasAutoplay ? normalizedSrc : `${normalizedSrc}&autoplay=true`;
|
|
1003
1007
|
el.setAttribute("src", s);
|