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:
@@ -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,
|
||||
}),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user