Error 153, Video Player Configuration Error on youtube video embed
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
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
+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
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, }} />
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} />; }, .. />