fix: add video support in entry content (#3816)
* chore: enable fullscreen video in NativeWebView * feat: add video component support with controls in HTML parser
This commit is contained in:
parent
fb40cbea93
commit
6923d0e773
|
|
@ -50,8 +50,9 @@ export const NativeWebView: React.ComponentType<
|
|||
sharedCookiesEnabled
|
||||
originWhitelist={["*"]}
|
||||
allowUniversalAccessFromFileURLs
|
||||
startInLoadingState
|
||||
// startInLoadingState
|
||||
allowsBackForwardNavigationGestures
|
||||
allowsFullscreenVideo
|
||||
injectedJavaScriptBeforeContentLoaded={atStart}
|
||||
onNavigationStateChange={onNavigationStateChange}
|
||||
onLoadEnd={useCallback(() => {
|
||||
|
|
|
|||
|
|
@ -148,6 +148,11 @@ export const parseHtml = (
|
|||
className: tw`w-full my-0`,
|
||||
}),
|
||||
),
|
||||
video: ({ node, ...props }) =>
|
||||
createElement("video", {
|
||||
...props,
|
||||
controls: true,
|
||||
}),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue