Errors and Troubleshooting
Invalid source
If the player cannot resolve a valid video ID from the source, it emits an error.
Use one of these formats:
'AbZH7XWDW_k'{ videoId: 'AbZH7XWDW_k' }{ url: 'https://www.youtube.com/watch?v=AbZH7XWDW_k' }
Common error codes
Autoplay blocked
Some environments block autoplay when audio is enabled. Try starting muted if autoplay behavior is important. You can also listen to autoplayBlocked and react in the UI.
embed not allowed
If inline HTML mode fails because YouTube embed restrictions are triggered:
- switch to
useInlineHtml={false} - use the default hosted player page or your own custom page
- verify the target
originmatches the hosted page origin
Origin mismatch issues
If you use a custom webViewUrl, keep the page origin and iframe origin value aligned. Mismatched origins can break iframe behavior even if the page itself loads.
WebView loading problems
If the native WebView fails to load:
- verify the URL is reachable
- verify your hosted page is serving the correct player content
- confirm the passed source URL and origin settings are correct
- inspect whether native
webViewProps.source.headersor hosting rules are interfering with page load
