@tellescope/video-chat 0.0.82 → 0.0.83

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/video-chat",
3
- "version": "0.0.82",
3
+ "version": "0.0.83",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -33,13 +33,13 @@
33
33
  "@fontsource/roboto": "^4.5.1",
34
34
  "@mui/icons-material": "^5.0.1",
35
35
  "@mui/material": "^5.0.2",
36
- "@tellescope/constants": "^0.0.82",
37
- "@tellescope/react-components": "^0.0.82",
38
- "@tellescope/sdk": "^0.0.82",
39
- "@tellescope/types-client": "^0.0.82",
40
- "@tellescope/types-models": "^0.0.82",
41
- "@tellescope/types-utilities": "^0.0.82",
42
- "@tellescope/utilities": "^0.0.82",
36
+ "@tellescope/constants": "^0.0.83",
37
+ "@tellescope/react-components": "^0.0.83",
38
+ "@tellescope/sdk": "^0.0.83",
39
+ "@tellescope/types-client": "^0.0.83",
40
+ "@tellescope/types-models": "^0.0.83",
41
+ "@tellescope/types-utilities": "^0.0.83",
42
+ "@tellescope/utilities": "^0.0.83",
43
43
  "@typescript-eslint/eslint-plugin": "^4.33.0",
44
44
  "@typescript-eslint/parser": "^4.33.0",
45
45
  "amazon-chime-sdk-component-library-react": "^2.12.0",
@@ -54,7 +54,7 @@
54
54
  "react": "^17.0.2",
55
55
  "react-dom": "^17.0.2"
56
56
  },
57
- "gitHead": "b58c6fb19dedb78e2c51a740fc41306ed2562300",
57
+ "gitHead": "dcd7caa7dd899e0eaab8cc5b1e85cf65ffaebe76",
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  }
package/src/index.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  export * from "./video"
2
- export * from "./controls"
2
+ export * from "./controls"
3
+ export {
4
+ RNVideoRenderView,
5
+ } from "./native/RNVideoRenderView"
@@ -7,7 +7,7 @@ import React from 'react';
7
7
  import { requireNativeComponent, findNodeHandle, ViewStyle } from 'react-native';
8
8
  import { NativeFunction } from './bridge';
9
9
 
10
- export class RNVideoView extends React.Component<{ tileId: number, style?: ViewStyle }> {
10
+ export class RNVideoRenderView extends React.Component<{ tileId: number, style?: ViewStyle }> {
11
11
  componentDidMount() {
12
12
  // we need to delay the bind video
13
13
  // Because "componentDidMount" will be called "immediately after the initial rendering occurs"
@@ -29,4 +29,5 @@ export class RNVideoView extends React.Component<{ tileId: number, style?: ViewS
29
29
  }
30
30
 
31
31
  // can try ts ignore and using RNVideoView as a second argument to this function
32
- const RNVideoRenderViewNative = requireNativeComponent('RNVideoView');
32
+ // @ts-ignore
33
+ const RNVideoRenderViewNative = requireNativeComponent('RNVideoView', RNVideoRenderView);
@@ -40,7 +40,7 @@ import {
40
40
  MobileSDKEvent,
41
41
  NativeFunction,
42
42
  } from "./native/bridge"
43
- import { RNVideoView } from "./native/RNVideoRenderView"
43
+ import { RNVideoRenderView } from "./native/RNVideoRenderView"
44
44
 
45
45
  export { CurrentCallContext }
46
46
 
@@ -172,7 +172,7 @@ export const useRemoteViews = (props={} as { style: React.CSSProperties }) => {
172
172
  const nonLocal = videoTiles.filter(v => v !== localTileId)
173
173
 
174
174
  return nonLocal.map(tileId =>
175
- <RNVideoView key={tileId} style={convert_CSS_to_RNStyles(props.style) ?? styles.video} tileId={tileId} />
175
+ <RNVideoRenderView key={tileId} style={convert_CSS_to_RNStyles(props.style) ?? styles.video} tileId={tileId} />
176
176
  )
177
177
  }
178
178
 
@@ -181,7 +181,7 @@ export const SelfView = ({ style } : VideoViewProps) => {
181
181
  if (localTileId === null) return null // localTileId may be zero, don't return null on simple falsey check
182
182
 
183
183
  return (
184
- <RNVideoView style={convert_CSS_to_RNStyles(style) ?? styles.video} tileId={localTileId}/>
184
+ <RNVideoRenderView style={convert_CSS_to_RNStyles(style) ?? styles.video} tileId={localTileId}/>
185
185
  )
186
186
  }
187
187
 
@@ -271,7 +271,7 @@ export const VideoTileGrid = () => {
271
271
  <Flex style={styles.videoContainer}>
272
272
  {
273
273
  videoTiles.length > 0 ? videoTiles.map(tileId =>
274
- <RNVideoView style={styles.video} key={tileId} tileId={tileId} />
274
+ <RNVideoRenderView style={styles.video} key={tileId} tileId={tileId} />
275
275
  ) : <Typography style={styles.subtitle}>No one is sharing video at this moment</Typography>
276
276
  }
277
277
  </Flex>
@@ -282,7 +282,7 @@ export const VideoTileGrid = () => {
282
282
  <React.Fragment>
283
283
  <Typography style={styles.title}>Screen Share</Typography>
284
284
  <View style={styles.videoContainer}>
285
- <RNVideoView style={styles.screenShare} key={shareScreenId} tileId={shareScreenId} />
285
+ <RNVideoRenderView style={styles.screenShare} key={shareScreenId} tileId={shareScreenId} />
286
286
  </View>
287
287
  </React.Fragment>
288
288
  }
@@ -21,6 +21,11 @@ export interface CallContext {
21
21
  }
22
22
 
23
23
  export const CurrentCallContext = React.createContext({} as CallContext)
24
+
25
+ export const useCurrentCallContext = () => {
26
+ return React.useContext(CurrentCallContext)
27
+ }
28
+
24
29
  export interface VideoProps {
25
30
  children?: React.ReactNode,
26
31
  }