diff --git a/docs/pages/installation.md b/docs/pages/installation.md index 1392d0b3d2..28c58fca86 100644 --- a/docs/pages/installation.md +++ b/docs/pages/installation.md @@ -94,7 +94,7 @@ buildscript { } ``` -See [sample app](https://github.com/TheWidlarzGroup/react-native-videoo/blob/9c669a2d8a53df36773fd82ff0917280d0659bc7/examples/basic/android/build.gradle#L14C5-L14C5) +See [sample app](https://github.com/TheWidlarzGroup/react-native-video/blob/9c669a2d8a53df36773fd82ff0917280d0659bc7/examples/basic/android/build.gradle#L14C5-L14C5)
diff --git a/src/Video.tsx b/src/Video.tsx index 05c5c08374..a7bcfc19f2 100644 --- a/src/Video.tsx +++ b/src/Video.tsx @@ -193,9 +193,16 @@ const Video = forwardRef( if (!selectedTextTrack) { return; } - const type = typeof selectedTextTrack.value; - if (type !== 'number' && type !== 'string') { - console.log('invalid type provided to selectedTextTrack'); + const typeOfValueProp = typeof selectedTextTrack.value; + if ( + typeOfValueProp !== 'number' && + typeOfValueProp !== 'string' && + typeOfValueProp !== 'undefined' + ) { + console.warn( + 'invalid type provided to selectedTextTrack.value: ', + typeOfValueProp, + ); return; } return { @@ -208,9 +215,16 @@ const Video = forwardRef( if (!selectedAudioTrack) { return; } - const type = typeof selectedAudioTrack.value; - if (type !== 'number' && type !== 'string') { - console.log('invalid type provided to selectedAudioTrack'); + const typeOfValueProp = typeof selectedAudioTrack.value; + if ( + typeOfValueProp !== 'number' && + typeOfValueProp !== 'string' && + typeOfValueProp !== 'undefined' + ) { + console.warn( + 'invalid type provided to selectedAudioTrack.value: ', + typeOfValueProp, + ); return; } @@ -224,9 +238,16 @@ const Video = forwardRef( if (!selectedVideoTrack) { return; } - const type = typeof selectedVideoTrack.value; - if (type !== 'number' && type !== 'string') { - console.log('invalid type provided to selectedVideoTrack'); + const typeOfValueProp = typeof selectedVideoTrack.value; + if ( + typeOfValueProp !== 'number' && + typeOfValueProp !== 'string' && + typeOfValueProp !== 'undefined' + ) { + console.warn( + 'invalid type provided to selectedVideoTrack.value: ', + typeOfValueProp, + ); return; } return {