mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
changed uri source to support all videos in anchor renderer
This commit is contained in:
parent
68a94dd2c1
commit
8b4e2ea013
@ -137,9 +137,11 @@ export const PostHtmlRenderer = memo(({
|
|||||||
const data = parseLinkData(tnode);
|
const data = parseLinkData(tnode);
|
||||||
_handleOnLinkPress(data);
|
_handleOnLinkPress(data);
|
||||||
};
|
};
|
||||||
console.log("parseLinkData(tnode) : ", parseLinkData(tnode));
|
|
||||||
|
|
||||||
if (tnode.classes?.indexOf('markdown-video-link') >= 0) {
|
if (tnode.classes?.indexOf('markdown-video-link') >= 0) {
|
||||||
|
// get video src
|
||||||
|
let videoHref = tnode.attributes['data-embed-src'] || tnode.attributes['data-video-href'] || tnode.children[0].attributes['src'];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WebView
|
<WebView
|
||||||
scalesPageToFit={true}
|
scalesPageToFit={true}
|
||||||
@ -152,7 +154,7 @@ export const PostHtmlRenderer = memo(({
|
|||||||
onLoadStart={() => {
|
onLoadStart={() => {
|
||||||
console.log('load start');
|
console.log('load start');
|
||||||
}}
|
}}
|
||||||
source={{ uri: parseLinkData(tnode).videoHref }}
|
source={{ uri: videoHref }}
|
||||||
style={{ width: contentWidth, height: (contentWidth * 9) / 16 }}
|
style={{ width: contentWidth, height: (contentWidth * 9) / 16 }}
|
||||||
startInLoadingState={true}
|
startInLoadingState={true}
|
||||||
onShouldStartLoadWithRequest={() => true}
|
onShouldStartLoadWithRequest={() => true}
|
||||||
|
Loading…
Reference in New Issue
Block a user