Skip to content

Commit c5d220d

Browse files
committed
add webViewProps to allow customization of the underlying webview
1 parent 9111237 commit c5d220d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/YoutubeIframe.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const YoutubeIframe = (
3030
onPlaybackRateChange = _playbackRate => {},
3131
initialPlayerParams = {},
3232
webViewStyle,
33+
webViewProps,
3334
},
3435
ref,
3536
) => {
@@ -112,7 +113,6 @@ const YoutubeIframe = (
112113
const onWebMessage = useCallback(
113114
event => {
114115
const message = JSON.parse(event.nativeEvent.data);
115-
// console.log({message});
116116
try {
117117
switch (message.eventType) {
118118
case 'playerStateChange':
@@ -169,6 +169,7 @@ const YoutubeIframe = (
169169
source={{html: MAIN_SCRIPT(videoId, playList, initialPlayerParams)}}
170170
allowsInlineMediaPlayback
171171
onMessage={onWebMessage}
172+
{...webViewProps}
172173
/>
173174
</View>
174175
);

0 commit comments

Comments
 (0)