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