Skip to content

Commit 1ad8cec

Browse files
committed
fix(ios): fix ios issues with "useLocalHTML" prop
1 parent 596ca9f commit 1ad8cec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/YoutubeIframe.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ const YoutubeIframe = (props, ref) => {
184184
request => {
185185
try {
186186
const url = request.mainDocumentURL || request.url;
187-
return url.startsWith(baseUrlOverride || DEFAULT_BASE_URL);
187+
const iosFirstLoad = Platform.OS === 'ios' && url === 'about:blank';
188+
const shouldLoad =
189+
iosFirstLoad || url.startsWith(baseUrlOverride || DEFAULT_BASE_URL);
190+
return shouldLoad;
188191
} catch (error) {
189192
// defaults to true in case of error
190193
// returning false stops the video from loading

0 commit comments

Comments
 (0)