@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.cjs
CHANGED
|
@@ -893,7 +893,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
893
893
|
const imgEls2 = el.getElementsByTagName("img");
|
|
894
894
|
if (imgEls2.length === 1 || el.textContent.trim() === href) {
|
|
895
895
|
if ((match[1] || match[2]) && match[3]) {
|
|
896
|
-
const videoHref = `https://3speak.tv/
|
|
896
|
+
const videoHref = `https://play.3speak.tv/watch?v=${match[3]}&mode=iframe`;
|
|
897
897
|
el.setAttribute("class", "markdown-video-link markdown-video-link-speak");
|
|
898
898
|
el.removeAttribute("href");
|
|
899
899
|
el.setAttribute("data-embed-src", videoHref);
|
|
@@ -1026,7 +1026,11 @@ function iframe(el, parentDomain = "ecency.com") {
|
|
|
1026
1026
|
return;
|
|
1027
1027
|
}
|
|
1028
1028
|
if (src.match(SPEAK_EMBED_REGEX)) {
|
|
1029
|
-
let normalizedSrc = src.replace(/3speak\.[a-z]+/i, "3speak.tv");
|
|
1029
|
+
let normalizedSrc = src.replace(/3speak\.[a-z]+/i, "play.3speak.tv");
|
|
1030
|
+
const hasMode = /[?&]mode=/.test(normalizedSrc);
|
|
1031
|
+
if (!hasMode) {
|
|
1032
|
+
normalizedSrc = `${normalizedSrc}&mode=iframe`;
|
|
1033
|
+
}
|
|
1030
1034
|
const hasAutoplay = /[?&]autoplay=/.test(normalizedSrc);
|
|
1031
1035
|
const s = hasAutoplay ? normalizedSrc : `${normalizedSrc}&autoplay=true`;
|
|
1032
1036
|
el.setAttribute("src", s);
|