Skip to content

Commit 27fc41a

Browse files
refactor: improved the warning logs about video package not installed
1 parent cff0d39 commit 27fc41a

File tree

2 files changed

+6
-2
lines changed
  • package
    • expo-package/src/optionalDependencies
    • native-package/src/optionalDependencies

2 files changed

+6
-2
lines changed

package/expo-package/src/optionalDependencies/Video.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ try {
33
const videoPackage = require('expo-av');
44
VideoComponent = videoPackage.Video;
55
} catch (_) {
6-
console.log('video library is not installed');
6+
console.warn(
7+
'Video library is currently not installed. To allow in-app video playback, install the "expo-av" package.',
8+
);
79
}
810

911
export default VideoComponent;

package/native-package/src/optionalDependencies/Video.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ try {
44
const videoPackage = require('react-native-video');
55
VideoComponent = videoPackage.default;
66
} catch (_) {
7-
console.log('video library is not installed');
7+
console.warn(
8+
'Video library is currently not installed. To allow in-app video playback, install the "react-native-video" package.',
9+
);
810
}
911

1012
export default VideoComponent;

0 commit comments

Comments
 (0)