react-native-render-html icon indicating copy to clipboard operation
react-native-render-html copied to clipboard

Error 153, Video Player Configuration Error on youtube video embed

Open gilshaan opened this issue 1 month ago • 3 comments

Decision Table

  • [x] My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
  • [x] My issue does not look like “The HTML element <yyy> is not rendered”

Good Faith Declaration

  • [x] I have read the HELP document here: https://git.io/JBi6R
  • [x] I have read the CONTRIBUTING document here: https://git.io/JJ0Pg
  • [x] I have confirmed that this bug has not been reported yet

Description

Error 153, Video Player Configuration Error on youtube video embed

Image

React Native Information

Version 0.80.2

RNRH Version

Latest availabel as of now

Tested Platforms

  • [x] Android
  • [ ] iOS
  • [ ] Web
  • [ ] MacOS
  • [ ] Windows

Reproduction Platforms

  • [x] Android
  • [ ] iOS
  • [ ] Web
  • [ ] MacOS
  • [ ] Windows

Minimal, Reproducible Example

Just use a html content having embed youtube video

Additional Notes

No response

gilshaan avatar Nov 19 '25 10:11 gilshaan

+1 i can replicate the issue in IOS too. I tried with few available solutions but not working, react-native-youtube-iframe it is working with same old configuration

dezudas avatar Nov 20 '25 08:11 dezudas

I think youtube changed some things, you now have to add a valid referer header when requesting an embedded video: Referer: 'https://www.example.com',

I am using react-native-webview for this: <WebView style={styles.webview} javaScriptEnabled={true} domStorageEnabled={true} source={{ headers: { Referer: 'https://www.example.com' }, uri: 'https://www.youtube.com/embed/' + videoId, }} />

mJordan8 avatar Nov 28 '25 11:11 mJordan8

I had the same issue, what helped me was <HTML renderers={{ iframe: (ifProps: CustomRendererProps<TBlock>) => { const { attributes } = ifProps.tnode; if (!!attributes?.src && attributes?.src?.includes('youtube.com')) { return ( <WebView style={{ height: attributes?.height || 170, width: attributes?.width || 300, }} javaScriptEnabled={true} domStorageEnabled={true} source={{ uri: attributes.src, }} /> ); } return <IFrameRenderer iFrameProps={ifProps} htmlWidth={htmlWidth} />; }, .. />

csillaj avatar Dec 04 '25 12:12 csillaj