Skip to content

Commit adef2a1

Browse files
authored
Fix depedencies
1 parent 56c366a commit adef2a1

File tree

4 files changed

+4319
-20211
lines changed

4 files changed

+4319
-20211
lines changed

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ Or
3636
yarn add cloudinary-react-native --save
3737
```
3838

39+
### For Video Player functionality
40+
If you want to use the video player features, you need to install `expo-av`:
41+
42+
```bash
43+
npm install expo-av
44+
```
45+
Or
46+
```bash
47+
yarn add expo-av
48+
```
49+
3950
## Usage
4051
### Setup
4152
The `Cloudinary` class is the main entry point for using the library. Your `cloud_name` is required to create an instance of this class. Your `api_key` and `api_secret` are also needed to perform secure API calls to Cloudinary (e.g., image and video uploads). Setting the configuration parameters can be done either programmatically using an appropriate constructor of the Cloudinary class or globally using an environment variable. You can find your account-specific configuration parameters in the **Dashboard** page of your [account console](https://cloudinary.com/console).
@@ -71,6 +82,70 @@ export default function App() {
7182
};
7283
```
7384

85+
### Video Player
86+
The `AdvancedVideo` component provides video playback capabilities with optional analytics tracking. **Note: This requires `expo-av` to be installed.**
87+
88+
```tsx
89+
import { AdvancedVideo } from 'cloudinary-react-native';
90+
import {Cloudinary} from '@cloudinary/url-gen';
91+
92+
const myCld = new Cloudinary({
93+
cloud: {
94+
cloudName: "demo",
95+
},
96+
});
97+
98+
let video = myCld.video('sea_turtle');
99+
100+
export default function App() {
101+
return (
102+
<View style={styles.container}>
103+
<AdvancedVideo
104+
cldVideo={video}
105+
videoStyle={{width: 400, height: 220}}
106+
/>
107+
</View>
108+
);
109+
};
110+
```
111+
112+
#### Video Player with Analytics
113+
Enable analytics tracking for detailed video performance insights:
114+
115+
```tsx
116+
import { AdvancedVideo } from 'cloudinary-react-native';
117+
import {Cloudinary} from '@cloudinary/url-gen';
118+
119+
const myCld = new Cloudinary({
120+
cloud: {
121+
cloudName: "demo",
122+
},
123+
});
124+
125+
let video = myCld.video('sea_turtle');
126+
127+
export default function App() {
128+
return (
129+
<View style={styles.container}>
130+
<AdvancedVideo
131+
cldVideo={video}
132+
videoStyle={{width: 400, height: 220}}
133+
enableAnalytics={true}
134+
autoTrackAnalytics={true}
135+
analyticsOptions={{
136+
customData: {
137+
userId: 'user-123',
138+
appVersion: '1.0.0'
139+
},
140+
videoPlayerType: 'expo-av',
141+
videoPlayerVersion: '14.0.0'
142+
}}
143+
/>
144+
</View>
145+
);
146+
};
147+
```
148+
74149
### Uploading Assets
75150
The following example performs an unsigned upload of a `string` using the default settings, a request upload callback, and an upload preset (required for unsigned uploads):
76151

example/package-lock.json

Lines changed: 2 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/yarn.lock

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,7 +2877,6 @@
28772877
"version" "1.1.0"
28782878
dependencies:
28792879
"@cloudinary/url-gen" "^1.10.0"
2880-
"cloudinary-react-native" "^1.0.0"
28812880
"expo-crypto" "^14.1.5"
28822881
"isomorphic-fetch" "^3.0.0"
28832882
"util" "^0.10.4"
@@ -3523,11 +3522,6 @@
35233522
"invariant" "^2.2.4"
35243523
"md5-file" "^3.2.3"
35253524

3526-
3527-
"integrity" "sha512-FvKZxyy+2/qcCmp+e1GTK3s4zH8ZO1RfjpqNxh7ARlS1oH8HPtk1AyZAMo52tHz3yQ3UIqxQ2YbI9CFb4065lA=="
3528-
"resolved" "https://cloudinary-232482882421.d.codeartifact.us-east-1.amazonaws.com/npm/cld-npm-store/expo-av/-/expo-av-14.0.7.tgz"
3529-
"version" "14.0.7"
3530-
35313525
"expo-constants@~15.4.0":
35323526
"integrity" "sha512-vizE69dww2Vl0PTWWvDmK0Jo2/J+WzdcMZlA05YEnEYofQuhKxTVsiuipf79mSOmFavt4UQYC1UnzptzKyfmiQ=="
35333527
"resolved" "https://cloudinary-232482882421.d.codeartifact.us-east-1.amazonaws.com/npm/cld-npm-store/expo-constants/-/expo-constants-15.4.6.tgz"

0 commit comments

Comments
 (0)