|
1 | 1 | import { StyleSheet, View, Text, TouchableOpacity, Alert, Platform, Dimensions } from 'react-native'; |
2 | 2 | import { StatusBar } from 'expo-status-bar'; |
| 3 | + |
| 4 | +// TEST: This log should show up immediately when the app starts |
| 5 | +console.log('🧪 [TEST] App.tsx loaded - Console.log is working!'); |
| 6 | + |
| 7 | +console.log('🧪 [TEST] About to import cloudinary-react-native...'); |
3 | 8 | import {AdvancedImage, AdvancedVideo} from 'cloudinary-react-native'; |
| 9 | +console.log('🧪 [TEST] Successfully imported cloudinary-react-native!', {AdvancedVideo: typeof AdvancedVideo}); |
4 | 10 | import {Cloudinary} from '@cloudinary/url-gen'; |
5 | 11 | import {scale} from "@cloudinary/url-gen/actions/resize"; |
6 | 12 | import {cartoonify} from "@cloudinary/url-gen/actions/effect"; |
@@ -29,6 +35,9 @@ const cld = new Cloudinary({ |
29 | 35 | }); |
30 | 36 |
|
31 | 37 | export default function App() { |
| 38 | + // TEST: This should show when the App component is created |
| 39 | + console.log('🧪 [TEST] App component function called!'); |
| 40 | + |
32 | 41 | const videoPlayer = useRef<any>(null); |
33 | 42 | const [analyticsEnabled, setAnalyticsEnabled] = useState(false); |
34 | 43 | const [autoTracking, setAutoTracking] = useState(false); |
@@ -158,22 +167,27 @@ export default function App() { |
158 | 167 | </View> |
159 | 168 |
|
160 | 169 | <View style={styles.videoContainer}> |
161 | | - <AdvancedVideo |
162 | | - ref={videoPlayer} |
163 | | - videoStyle={styles.video} |
164 | | - cldVideo={createMyVideoObject()} |
165 | | - enableAnalytics={analyticsEnabled} |
166 | | - autoTrackAnalytics={autoTracking} |
167 | | - analyticsOptions={{ |
168 | | - customData: { |
169 | | - userId: 'demo-user-123', |
170 | | - appVersion: '1.0.0', |
171 | | - platform: 'react-native' |
172 | | - }, |
173 | | - videoPlayerType: 'auto-detected', |
174 | | - videoPlayerVersion: 'auto-detected' |
175 | | - }} |
176 | | - /> |
| 170 | + {(() => { |
| 171 | + console.log('🧪 [TEST] About to render AdvancedVideo component...'); |
| 172 | + return ( |
| 173 | + <AdvancedVideo |
| 174 | + ref={videoPlayer} |
| 175 | + videoStyle={styles.video} |
| 176 | + cldVideo={createMyVideoObject()} |
| 177 | + enableAnalytics={analyticsEnabled} |
| 178 | + autoTrackAnalytics={autoTracking} |
| 179 | + analyticsOptions={{ |
| 180 | + customData: { |
| 181 | + userId: 'demo-user-123', |
| 182 | + appVersion: '1.0.0', |
| 183 | + platform: 'react-native' |
| 184 | + }, |
| 185 | + videoPlayerType: 'auto-detected', |
| 186 | + videoPlayerVersion: 'auto-detected' |
| 187 | + }} |
| 188 | + /> |
| 189 | + ); |
| 190 | + })()} |
177 | 191 | </View> |
178 | 192 |
|
179 | 193 | <View style={styles.statusContainer}> |
|
0 commit comments