stream-chat-react-native 4.6.1-beta.1 → 4.7.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +4 -3
  2. package/src/index.js +20 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native",
3
3
  "description": "The official React Native SDK for Stream Chat, a service for building chat applications",
4
- "version": "4.6.1-beta.1",
4
+ "version": "4.7.0-beta.2",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -11,7 +11,7 @@
11
11
  "types": "types/index.d.ts",
12
12
  "dependencies": {
13
13
  "es6-symbol": "^3.1.3",
14
- "stream-chat-react-native-core": "4.6.1-beta.1"
14
+ "stream-chat-react-native-core": "4.7.0-beta.2"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@react-native-community/cameraroll": ">=4.0.1",
@@ -23,7 +23,8 @@
23
23
  "react-native-haptic-feedback": ">=1.11.0",
24
24
  "react-native-image-crop-picker": ">=0.33.2",
25
25
  "react-native-image-resizer": ">=1.4.2",
26
- "react-native-share": ">=4.1.0"
26
+ "react-native-share": ">=4.1.0",
27
+ "react-native-video": "^5.2.0"
27
28
  },
28
29
  "scripts": {
29
30
  "prepack": " cp ../../README.md .",
package/src/index.js CHANGED
@@ -8,6 +8,8 @@ import ImagePicker from 'react-native-image-crop-picker';
8
8
  import ImageResizer from 'react-native-image-resizer';
9
9
  import RNShare from 'react-native-share';
10
10
 
11
+ import Video from 'react-native-video';
12
+
11
13
  import CameraRoll from '@react-native-community/cameraroll';
12
14
  import NetInfo from '@react-native-community/netinfo';
13
15
  import { FlatList } from '@stream-io/flat-list-mvcp';
@@ -247,6 +249,24 @@ registerNativeHandlers({
247
249
  ignoreAndroidSystemSettings: false,
248
250
  });
249
251
  },
252
+ // eslint-disable-next-line react/display-name
253
+ Video: ({ onBuffer, onEnd, onLoad, onProgress, paused, resizeMode, style, uri, videoRef }) => (
254
+ <Video
255
+ onBuffer={onBuffer}
256
+ onEnd={onEnd}
257
+ onError={(error) => {
258
+ console.error(error);
259
+ }}
260
+ onLoad={onLoad}
261
+ onProgress={onProgress}
262
+ paused={paused}
263
+ ref={videoRef}
264
+ source={{
265
+ uri,
266
+ }}
267
+ style={style}
268
+ />
269
+ ),
250
270
  });
251
271
 
252
272
  if (Platform.OS === 'android') {