Skip to content

Commit

Permalink
Merge branch 'TheWidlarzGroup:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-rinaldi authored Jun 19, 2024
2 parents f906ddf + dc2a2ab commit 6432ffc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

</details>
<details>
Expand Down
39 changes: 30 additions & 9 deletions src/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,16 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
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 {
Expand All @@ -208,9 +215,16 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
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;
}

Expand All @@ -224,9 +238,16 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
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 {
Expand Down

0 comments on commit 6432ffc

Please sign in to comment.