Shoutem RTE would use iframe tag for video attachments most of the time, but in rare cases it'd use video tag instead.
Our SimpleHtml component didn't have video tag renderer defined, thus video tags wouldn't render in app.
Added video tag renderer
Using WebView to render videos
Using html as WebView source because it gives us more control over video when compared to uri. When using uri as source, video html is defined at host and we've got no control over it. This way, we pick attributes and values we want to attach to video, before rendering it with WebView
figure is wrapping any video attachments coming from Shoutem RTE, the same goes for video tag. Included video tags into function that removes figure style breaking UI output - big blank space under video
Added more props to SimpleHtml, so that it's implementations can have more control over it
Summary
Shoutem RTE would use
iframe
tag for video attachments most of the time, but in rare cases it'd usevideo
tag instead. OurSimpleHtml
component didn't havevideo
tag renderer defined, thus video tags wouldn't render in app.video
tag rendererWebView
to render videoshtml
asWebView
source because it gives us more control over video when compared touri
. When usinguri
as source, video html is defined at host and we've got no control over it. This way, we pick attributes and values we want to attach to video, before rendering it withWebView
figure
is wrapping any video attachments coming from Shoutem RTE, the same goes forvideo
tag. Included video tags into function that removes figure style breaking UI output - big blank space under videoSimpleHtml
, so that it's implementations can have more control over it