@tencent-rtc/mcp 1.0.0
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/@tencent/aegis-node-sdk/CHANGELOG.md +8 -0
- package/@tencent/aegis-node-sdk/LICENSE +21 -0
- package/@tencent/aegis-node-sdk/README.md +562 -0
- package/@tencent/aegis-node-sdk/lib/aegis.min.js +1 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +14 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +1 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +9 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +2 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +85 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +3 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +9 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +3 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +9 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +62 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +11 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +4 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +130 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +34 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +2 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +18 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +8 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +8 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +2 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +4 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +10 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +3 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +3 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +34 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +12 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +14 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +2 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +12 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +3 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +33 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +2 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +18 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +60 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +15 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +5 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +6 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +18 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +12 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +10 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +20 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +27 -0
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +2 -0
- package/@tencent/aegis-node-sdk/package.json +19 -0
- package/@tencent/polaris/README.md +407 -0
- package/@tencent/polaris/dist/consumer/health.d.ts +126 -0
- package/@tencent/polaris/dist/consumer/health.js +283 -0
- package/@tencent/polaris/dist/consumer/health.js.map +1 -0
- package/@tencent/polaris/dist/consumer/index.d.ts +120 -0
- package/@tencent/polaris/dist/consumer/index.js +348 -0
- package/@tencent/polaris/dist/consumer/index.js.map +1 -0
- package/@tencent/polaris/dist/consumer/monitor.d.ts +145 -0
- package/@tencent/polaris/dist/consumer/monitor.js +343 -0
- package/@tencent/polaris/dist/consumer/monitor.js.map +1 -0
- package/@tencent/polaris/dist/consumer/selector.d.ts +73 -0
- package/@tencent/polaris/dist/consumer/selector.js +316 -0
- package/@tencent/polaris/dist/consumer/selector.js.map +1 -0
- package/@tencent/polaris/dist/errors.d.ts +373 -0
- package/@tencent/polaris/dist/errors.js +154 -0
- package/@tencent/polaris/dist/errors.js.map +1 -0
- package/@tencent/polaris/dist/global.d.ts +16 -0
- package/@tencent/polaris/dist/global.js +18 -0
- package/@tencent/polaris/dist/global.js.map +1 -0
- package/@tencent/polaris/dist/index.d.ts +62 -0
- package/@tencent/polaris/dist/index.js +145 -0
- package/@tencent/polaris/dist/index.js.map +1 -0
- package/@tencent/polaris/dist/instance.d.ts +109 -0
- package/@tencent/polaris/dist/instance.js +38 -0
- package/@tencent/polaris/dist/instance.js.map +1 -0
- package/@tencent/polaris/dist/limiter/bucket.d.ts +51 -0
- package/@tencent/polaris/dist/limiter/bucket.js +152 -0
- package/@tencent/polaris/dist/limiter/bucket.js.map +1 -0
- package/@tencent/polaris/dist/limiter/index.d.ts +73 -0
- package/@tencent/polaris/dist/limiter/index.js +149 -0
- package/@tencent/polaris/dist/limiter/index.js.map +1 -0
- package/@tencent/polaris/dist/limiter/ratelimit.d.ts +27 -0
- package/@tencent/polaris/dist/limiter/ratelimit.js +134 -0
- package/@tencent/polaris/dist/limiter/ratelimit.js.map +1 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/base.d.ts +17 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/base.js +15 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/base.js.map +1 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/global.d.ts +59 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/global.js +397 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/global.js.map +1 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/index.d.ts +3 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/index.js +19 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/index.js.map +1 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/local.d.ts +17 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/local.js +52 -0
- package/@tencent/polaris/dist/limiter/ratelimiter/local.js.map +1 -0
- package/@tencent/polaris/dist/location.d.ts +48 -0
- package/@tencent/polaris/dist/location.js +67 -0
- package/@tencent/polaris/dist/location.js.map +1 -0
- package/@tencent/polaris/dist/logging.d.ts +106 -0
- package/@tencent/polaris/dist/logging.js +130 -0
- package/@tencent/polaris/dist/logging.js.map +1 -0
- package/@tencent/polaris/dist/metadata.d.ts +78 -0
- package/@tencent/polaris/dist/metadata.js +119 -0
- package/@tencent/polaris/dist/metadata.js.map +1 -0
- package/@tencent/polaris/dist/plugins/breaker/polaris.d.ts +47 -0
- package/@tencent/polaris/dist/plugins/breaker/polaris.js +162 -0
- package/@tencent/polaris/dist/plugins/breaker/polaris.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/base.d.ts +24 -0
- package/@tencent/polaris/dist/plugins/lb/base.js +32 -0
- package/@tencent/polaris/dist/plugins/lb/base.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/edf.d.ts +24 -0
- package/@tencent/polaris/dist/plugins/lb/edf.js +77 -0
- package/@tencent/polaris/dist/plugins/lb/edf.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/hashring.d.ts +24 -0
- package/@tencent/polaris/dist/plugins/lb/hashring.js +53 -0
- package/@tencent/polaris/dist/plugins/lb/hashring.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/sticky.d.ts +31 -0
- package/@tencent/polaris/dist/plugins/lb/sticky.js +88 -0
- package/@tencent/polaris/dist/plugins/lb/sticky.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/swrr.d.ts +25 -0
- package/@tencent/polaris/dist/plugins/lb/swrr.js +72 -0
- package/@tencent/polaris/dist/plugins/lb/swrr.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/wr.d.ts +17 -0
- package/@tencent/polaris/dist/plugins/lb/wr.js +50 -0
- package/@tencent/polaris/dist/plugins/lb/wr.js.map +1 -0
- package/@tencent/polaris/dist/plugins/lb/wrr.d.ts +19 -0
- package/@tencent/polaris/dist/plugins/lb/wrr.js +81 -0
- package/@tencent/polaris/dist/plugins/lb/wrr.js.map +1 -0
- package/@tencent/polaris/dist/plugins/logging/console.d.ts +10 -0
- package/@tencent/polaris/dist/plugins/logging/console.js +38 -0
- package/@tencent/polaris/dist/plugins/logging/console.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/local-server/index.d.ts +32 -0
- package/@tencent/polaris/dist/plugins/naming/local-server/index.js +88 -0
- package/@tencent/polaris/dist/plugins/naming/local-server/index.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +124 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js +398 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +27 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +287 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +15 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js +43 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +28 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +249 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +19 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +222 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +26 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +99 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +60 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +259 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +24 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +18 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +12 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +39 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +115 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +24 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +22 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +28 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +80 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +18 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +65 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +66 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +95 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +1568 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/index.d.ts +36 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/index.js +51 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/index.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +18 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +67 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +82 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +11 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +46 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +16 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +10 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +1102 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.d.ts +29 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js +77 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +12 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +28 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +395 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.d.ts +13 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js +116 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/types.d.ts +67 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/types.js +67 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/types.js.map +1 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.d.ts +99 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js +217 -0
- package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js.map +1 -0
- package/@tencent/polaris/dist/plugins/registry/memory.d.ts +10 -0
- package/@tencent/polaris/dist/plugins/registry/memory.js +50 -0
- package/@tencent/polaris/dist/plugins/registry/memory.js.map +1 -0
- package/@tencent/polaris/dist/plugins/router/polaris/nearby.d.ts +51 -0
- package/@tencent/polaris/dist/plugins/router/polaris/nearby.js +145 -0
- package/@tencent/polaris/dist/plugins/router/polaris/nearby.js.map +1 -0
- package/@tencent/polaris/dist/plugins/router/polaris/rule.d.ts +11 -0
- package/@tencent/polaris/dist/plugins/router/polaris/rule.js +174 -0
- package/@tencent/polaris/dist/plugins/router/polaris/rule.js.map +1 -0
- package/@tencent/polaris/dist/plugins/router/trpc/canary.d.ts +25 -0
- package/@tencent/polaris/dist/plugins/router/trpc/canary.js +36 -0
- package/@tencent/polaris/dist/plugins/router/trpc/canary.js.map +1 -0
- package/@tencent/polaris/dist/plugins/router/trpc/env.d.ts +10 -0
- package/@tencent/polaris/dist/plugins/router/trpc/env.js +34 -0
- package/@tencent/polaris/dist/plugins/router/trpc/env.js.map +1 -0
- package/@tencent/polaris/dist/plugins/router/trpc/set.d.ts +56 -0
- package/@tencent/polaris/dist/plugins/router/trpc/set.js +106 -0
- package/@tencent/polaris/dist/plugins/router/trpc/set.js.map +1 -0
- package/@tencent/polaris/dist/plugins/shaping/unirate.d.ts +31 -0
- package/@tencent/polaris/dist/plugins/shaping/unirate.js +124 -0
- package/@tencent/polaris/dist/plugins/shaping/unirate.js.map +1 -0
- package/@tencent/polaris/dist/plugins/shaping/warmup.d.ts +61 -0
- package/@tencent/polaris/dist/plugins/shaping/warmup.js +171 -0
- package/@tencent/polaris/dist/plugins/shaping/warmup.js.map +1 -0
- package/@tencent/polaris/dist/plugins/weight/polaris.d.ts +23 -0
- package/@tencent/polaris/dist/plugins/weight/polaris.js +159 -0
- package/@tencent/polaris/dist/plugins/weight/polaris.js.map +1 -0
- package/@tencent/polaris/dist/plugins.d.ts +619 -0
- package/@tencent/polaris/dist/plugins.js +91 -0
- package/@tencent/polaris/dist/plugins.js.map +1 -0
- package/@tencent/polaris/dist/polaris.d.ts +33 -0
- package/@tencent/polaris/dist/polaris.js +59 -0
- package/@tencent/polaris/dist/polaris.js.map +1 -0
- package/@tencent/polaris/dist/provider/index.d.ts +102 -0
- package/@tencent/polaris/dist/provider/index.js +168 -0
- package/@tencent/polaris/dist/provider/index.js.map +1 -0
- package/@tencent/polaris/dist/registry.d.ts +174 -0
- package/@tencent/polaris/dist/registry.js +660 -0
- package/@tencent/polaris/dist/registry.js.map +1 -0
- package/@tencent/polaris/dist/rules.d.ts +163 -0
- package/@tencent/polaris/dist/rules.js +24 -0
- package/@tencent/polaris/dist/rules.js.map +1 -0
- package/@tencent/polaris/dist/scripts/postinstall.d.ts +1 -0
- package/@tencent/polaris/dist/scripts/postinstall.js +71 -0
- package/@tencent/polaris/dist/scripts/postinstall.js.map +1 -0
- package/@tencent/polaris/dist/service.d.ts +18 -0
- package/@tencent/polaris/dist/service.js +3 -0
- package/@tencent/polaris/dist/service.js.map +1 -0
- package/@tencent/polaris/dist/skeleton.d.ts +87 -0
- package/@tencent/polaris/dist/skeleton.js +282 -0
- package/@tencent/polaris/dist/skeleton.js.map +1 -0
- package/@tencent/polaris/dist/utils.d.ts +36 -0
- package/@tencent/polaris/dist/utils.js +74 -0
- package/@tencent/polaris/dist/utils.js.map +1 -0
- package/@tencent/polaris/dist/weak.d.ts +11 -0
- package/@tencent/polaris/dist/weak.js +44 -0
- package/@tencent/polaris/dist/weak.js.map +1 -0
- package/@tencent/polaris/package.json +114 -0
- package/README.md +61 -0
- package/cursor-setting.png +0 -0
- package/index.js +16 -0
- package/index.js.map +1 -0
- package/mcp-server-prompt.png +0 -0
- package/mcp.json +8 -0
- package/package.json +49 -0
- package/resource/doc/tuicallkit/android/.gitkeep +0 -0
- package/resource/doc/tuicallkit/android/api_TUICallKit.md +610 -0
- package/resource/doc/tuicallkit/android/api_TUICallObserver.md +784 -0
- package/resource/doc/tuicallkit/android/how_to_integrated_android_callkit.md +286 -0
- package/resource/doc/tuicallkit/faq/faq.md +127 -0
- package/resource/doc/tuicallkit/flutter/api_TUICallDefine.md +938 -0
- package/resource/doc/tuicallkit/flutter/api_TUICallKit.md +469 -0
- package/resource/doc/tuicallkit/flutter/api_TUICallObserver.md +897 -0
- package/resource/doc/tuicallkit/flutter/how_to_integrated_flutter_callkit.md +226 -0
- package/resource/doc/tuicallkit/flutter/how_to_run_flutter_callkit_demo.md +101 -0
- package/resource/doc/tuicallkit/iOS/api_TUICallKit.md +398 -0
- package/resource/doc/tuicallkit/iOS/api_TUICallObserver.md +781 -0
- package/resource/doc/tuicallkit/iOS/how_to_integrated_iOS_callkit.md +268 -0
- package/resource/doc/tuicallkit/iOS/how_to_run_iOS_callkit_demo.md +98 -0
- package/resource/doc/tuicallkit/react/.gitkeep +0 -0
- package/resource/doc/tuicallkit/react/api_TUICallKit.md +354 -0
- package/resource/doc/tuicallkit/react/how_to_integrated_react_callkit.md +166 -0
- package/resource/doc/tuicallkit/react/how_to_run_react_callkit_demo.md +61 -0
- package/resource/doc/tuicallkit/vue/.gitkeep +0 -0
- package/resource/doc/tuicallkit/vue/api_TUICallKit.md +354 -0
- package/resource/doc/tuicallkit/vue/how_to_integrated_vue_callkit.md +187 -0
- package/resource/doc/tuicallkit/vue/how_to_run_vue_callkit_demo.md +61 -0
- package/server.js +132 -0
- package/server.js.map +1 -0
- package/streamableHttp.js +74 -0
- package/streamableHttp.js.map +1 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
## TUICallKit (including UI Interface)
|
|
2
|
+
|
|
3
|
+
## TUICallKit APIs
|
|
4
|
+
|
|
5
|
+
UICallKit API, you can quickly implement a WeChat-like audio and video call scenario through simple interfaces.
|
|
6
|
+
<table>
|
|
7
|
+
<tr>
|
|
8
|
+
<td rowspan="1" colSpan="1" >API</td>
|
|
9
|
+
|
|
10
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
11
|
+
</tr>
|
|
12
|
+
|
|
13
|
+
<tr>
|
|
14
|
+
<td rowspan="1" colSpan="1" >[login](https://write.woa.com/document/162412580951224320)</td>
|
|
15
|
+
|
|
16
|
+
<td rowspan="1" colSpan="1" >Login.</td>
|
|
17
|
+
</tr>
|
|
18
|
+
|
|
19
|
+
<tr>
|
|
20
|
+
<td rowspan="1" colSpan="1" >[logout](https://write.woa.com/document/162412580951224320)</td>
|
|
21
|
+
|
|
22
|
+
<td rowspan="1" colSpan="1" >Logout.</td>
|
|
23
|
+
</tr>
|
|
24
|
+
|
|
25
|
+
<tr>
|
|
26
|
+
<td rowspan="1" colSpan="1" >[calls](https://write.woa.com/document/162412580951224320)</td>
|
|
27
|
+
|
|
28
|
+
<td rowspan="1" colSpan="1" >Initiate a one-to-one or multi-person call.</td>
|
|
29
|
+
</tr>
|
|
30
|
+
|
|
31
|
+
<tr>
|
|
32
|
+
<td rowspan="1" colSpan="1" >[call](https://write.woa.com/document/162412580951224320)</td>
|
|
33
|
+
|
|
34
|
+
<td rowspan="1" colSpan="1" >To make a one-on-one call, supports custom room ID, call timeout, offline push content, and more.</td>
|
|
35
|
+
</tr>
|
|
36
|
+
|
|
37
|
+
<tr>
|
|
38
|
+
<td rowspan="1" colSpan="1" >[groupCall](https://write.woa.com/document/162412580951224320)</td>
|
|
39
|
+
|
|
40
|
+
<td rowspan="1" colSpan="1" >To make a group call, supports custom room ID, call timeout, offline push content, and more.</td>
|
|
41
|
+
</tr>
|
|
42
|
+
|
|
43
|
+
<tr>
|
|
44
|
+
<td rowspan="1" colSpan="1" >[joinInGroupCall](https://write.woa.com/document/162412580951224320)</td>
|
|
45
|
+
|
|
46
|
+
<td rowspan="1" colSpan="1" >Join a group call.</td>
|
|
47
|
+
</tr>
|
|
48
|
+
|
|
49
|
+
<tr>
|
|
50
|
+
<td rowspan="1" colSpan="1" >[setCallingBell](https://write.woa.com/document/162412580951224320)</td>
|
|
51
|
+
|
|
52
|
+
<td rowspan="1" colSpan="1" >Customize user's ringtone.</td>
|
|
53
|
+
</tr>
|
|
54
|
+
|
|
55
|
+
<tr>
|
|
56
|
+
<td rowspan="1" colSpan="1" >[enableMuteMode](https://write.woa.com/document/162412580951224320)</td>
|
|
57
|
+
|
|
58
|
+
<td rowspan="1" colSpan="1" >Enable/Disable Ringtone.</td>
|
|
59
|
+
</tr>
|
|
60
|
+
|
|
61
|
+
<tr>
|
|
62
|
+
<td rowspan="1" colSpan="1" >[enableVirtualBackground](https://write.woa.com/document/162412580951224320)</td>
|
|
63
|
+
|
|
64
|
+
<td rowspan="1" colSpan="1" >Enable/disable blurry background feature.</td>
|
|
65
|
+
</tr>
|
|
66
|
+
|
|
67
|
+
<tr>
|
|
68
|
+
<td rowspan="1" colSpan="1" >[setScreenOrientation](https://write.woa.com/document/162412580951224320)</td>
|
|
69
|
+
|
|
70
|
+
<td rowspan="1" colSpan="1" >Set Screen Orientation.</td>
|
|
71
|
+
</tr>
|
|
72
|
+
|
|
73
|
+
<tr>
|
|
74
|
+
<td rowspan="1" colSpan="1" >[on](https://write.woa.com/document/162412580951224320)</td>
|
|
75
|
+
|
|
76
|
+
<td rowspan="1" colSpan="1" >Listen to TUICallKit events.</td>
|
|
77
|
+
</tr>
|
|
78
|
+
|
|
79
|
+
<tr>
|
|
80
|
+
<td rowspan="1" colSpan="1" >[off](https://write.woa.com/document/162412580951224320)</td>
|
|
81
|
+
|
|
82
|
+
<td rowspan="1" colSpan="1" >Cancel listening to TUICallKit events.</td>
|
|
83
|
+
</tr>
|
|
84
|
+
</table>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## TUICallEvent
|
|
88
|
+
|
|
89
|
+
TUICallEvent is the callback event class corresponding to TUICallKit. Through this callback, you can listen to the callback events you are interested in.
|
|
90
|
+
<table>
|
|
91
|
+
<tr>
|
|
92
|
+
<td rowspan="1" colSpan="1" >Event</td>
|
|
93
|
+
|
|
94
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
95
|
+
</tr>
|
|
96
|
+
|
|
97
|
+
<tr>
|
|
98
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onError](https://write.woa.com/document/162412628639113216)</td>
|
|
99
|
+
|
|
100
|
+
<td rowspan="1" colSpan="1" >Error Callback during Call.</td>
|
|
101
|
+
</tr>
|
|
102
|
+
|
|
103
|
+
<tr>
|
|
104
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onCallReceived](https://write.woa.com/document/162412628639113216)</td>
|
|
105
|
+
|
|
106
|
+
<td rowspan="1" colSpan="1" >Callback for a Call Request.</td>
|
|
107
|
+
</tr>
|
|
108
|
+
|
|
109
|
+
<tr>
|
|
110
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onCallCancelled](https://write.woa.com/document/162412628639113216)</td>
|
|
111
|
+
|
|
112
|
+
<td rowspan="1" colSpan="1" >Callback for Call Cancellation.</td>
|
|
113
|
+
</tr>
|
|
114
|
+
|
|
115
|
+
<tr>
|
|
116
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onCallBegin](https://write.woa.com/document/162412628639113216)</td>
|
|
117
|
+
|
|
118
|
+
<td rowspan="1" colSpan="1" >Callback for Call Connection.</td>
|
|
119
|
+
</tr>
|
|
120
|
+
|
|
121
|
+
<tr>
|
|
122
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onCallEnd](https://write.woa.com/document/162412628639113216)</td>
|
|
123
|
+
|
|
124
|
+
<td rowspan="1" colSpan="1" >Callback for Call Termination.</td>
|
|
125
|
+
</tr>
|
|
126
|
+
|
|
127
|
+
<tr>
|
|
128
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserReject](https://write.woa.com/document/162412628639113216)</td>
|
|
129
|
+
|
|
130
|
+
<td rowspan="1" colSpan="1" >xxxx User declines the call Callback.</td>
|
|
131
|
+
</tr>
|
|
132
|
+
|
|
133
|
+
<tr>
|
|
134
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserNoResponse](https://write.woa.com/document/162412628639113216)</td>
|
|
135
|
+
|
|
136
|
+
<td rowspan="1" colSpan="1" >xxxx User Non-response Callback.</td>
|
|
137
|
+
</tr>
|
|
138
|
+
|
|
139
|
+
<tr>
|
|
140
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserLineBusy](https://write.woa.com/document/162412628639113216)</td>
|
|
141
|
+
|
|
142
|
+
<td rowspan="1" colSpan="1" >xxxx User Busy Line Callback.</td>
|
|
143
|
+
</tr>
|
|
144
|
+
|
|
145
|
+
<tr>
|
|
146
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserJoin](https://write.woa.com/document/162412628639113216)</td>
|
|
147
|
+
|
|
148
|
+
<td rowspan="1" colSpan="1" >xxxx User Joins Call Callback.</td>
|
|
149
|
+
</tr>
|
|
150
|
+
|
|
151
|
+
<tr>
|
|
152
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserLeave](https://write.woa.com/document/162412628639113216)</td>
|
|
153
|
+
|
|
154
|
+
<td rowspan="1" colSpan="1" >A user left the call.</td>
|
|
155
|
+
</tr>
|
|
156
|
+
|
|
157
|
+
<tr>
|
|
158
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onCallMediaTypeChanged](https://write.woa.com/document/162412628639113216)</td>
|
|
159
|
+
|
|
160
|
+
<td rowspan="1" colSpan="1" >Callback for a change in the Call's Media Type.</td>
|
|
161
|
+
</tr>
|
|
162
|
+
|
|
163
|
+
<tr>
|
|
164
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onKickedOffline](https://write.woa.com/document/162412628639113216)</td>
|
|
165
|
+
|
|
166
|
+
<td rowspan="1" colSpan="1" >Current user kicked offline.</td>
|
|
167
|
+
</tr>
|
|
168
|
+
|
|
169
|
+
<tr>
|
|
170
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserSigExpired](https://write.woa.com/document/162412628639113216)</td>
|
|
171
|
+
|
|
172
|
+
<td rowspan="1" colSpan="1" >Ticket expired while online.</td>
|
|
173
|
+
</tr>
|
|
174
|
+
|
|
175
|
+
<tr>
|
|
176
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserVideoAvailable](https://write.woa.com/document/162412628639113216)</td>
|
|
177
|
+
|
|
178
|
+
<td rowspan="1" colSpan="1" >Whether a user has a video stream.</td>
|
|
179
|
+
</tr>
|
|
180
|
+
|
|
181
|
+
<tr>
|
|
182
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserAudioAvailable](https://write.woa.com/document/162412628639113216)</td>
|
|
183
|
+
|
|
184
|
+
<td rowspan="1" colSpan="1" >Whether a user has an audio stream.</td>
|
|
185
|
+
</tr>
|
|
186
|
+
|
|
187
|
+
<tr>
|
|
188
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserVoiceVolumeChanged](https://write.woa.com/document/162412628639113216)</td>
|
|
189
|
+
|
|
190
|
+
<td rowspan="1" colSpan="1" >The volume levels of all users.</td>
|
|
191
|
+
</tr>
|
|
192
|
+
|
|
193
|
+
<tr>
|
|
194
|
+
<td rowspan="1" colSpan="1" >[TUICallEvent.onUserNetworkQualityChanged](https://write.woa.com/document/162412628639113216)</td>
|
|
195
|
+
|
|
196
|
+
<td rowspan="1" colSpan="1" >The network quality of all users.</td>
|
|
197
|
+
</tr>
|
|
198
|
+
</table>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## TUICallEngine (No UI)
|
|
202
|
+
|
|
203
|
+
`TUICallEngine` is an audio/video call component that **does not include UI elements**. If `TUICallKit` does not meet your requirements, you can use the APIs of `TUICallEngine` to customize your project.
|
|
204
|
+
<table>
|
|
205
|
+
<tr>
|
|
206
|
+
<td rowspan="1" colSpan="1" >API</td>
|
|
207
|
+
|
|
208
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
209
|
+
</tr>
|
|
210
|
+
|
|
211
|
+
<tr>
|
|
212
|
+
<td rowspan="1" colSpan="1" >[createInstance](https://write.woa.com/document/165654454250659840)</td>
|
|
213
|
+
|
|
214
|
+
<td rowspan="1" colSpan="1" >Creates a `TUICallEngine` instance (singleton mode).</td>
|
|
215
|
+
</tr>
|
|
216
|
+
|
|
217
|
+
<tr>
|
|
218
|
+
<td rowspan="1" colSpan="1" >[destroyInstance](https://write.woa.com/document/165654454250659840)</td>
|
|
219
|
+
|
|
220
|
+
<td rowspan="1" colSpan="1" >Terminates a `TUICallEngine` instance (singleton mode).</td>
|
|
221
|
+
</tr>
|
|
222
|
+
|
|
223
|
+
<tr>
|
|
224
|
+
<td rowspan="1" colSpan="1" >[login](https://write.woa.com/document/165654454250659840)</td>
|
|
225
|
+
|
|
226
|
+
<td rowspan="1" colSpan="1" >Authenticates the basic audio/video call capabilities.</td>
|
|
227
|
+
</tr>
|
|
228
|
+
|
|
229
|
+
<tr>
|
|
230
|
+
<td rowspan="1" colSpan="1" >[on](https://write.woa.com/document/165654454250659840)</td>
|
|
231
|
+
|
|
232
|
+
<td rowspan="1" colSpan="1" >Registers an event listener.</td>
|
|
233
|
+
</tr>
|
|
234
|
+
|
|
235
|
+
<tr>
|
|
236
|
+
<td rowspan="1" colSpan="1" >[off](https://write.woa.com/document/165654454250659840)</td>
|
|
237
|
+
|
|
238
|
+
<td rowspan="1" colSpan="1" >Unregisters an event listener.</td>
|
|
239
|
+
</tr>
|
|
240
|
+
|
|
241
|
+
<tr>
|
|
242
|
+
<td rowspan="1" colSpan="1" >[call](https://write.woa.com/document/165654454250659840)</td>
|
|
243
|
+
|
|
244
|
+
<td rowspan="1" colSpan="1" >Makes a one-to-one call.</td>
|
|
245
|
+
</tr>
|
|
246
|
+
|
|
247
|
+
<tr>
|
|
248
|
+
<td rowspan="1" colSpan="1" >[accept](https://write.woa.com/document/165654454250659840)</td>
|
|
249
|
+
|
|
250
|
+
<td rowspan="1" colSpan="1" >Accepts a call.</td>
|
|
251
|
+
</tr>
|
|
252
|
+
|
|
253
|
+
<tr>
|
|
254
|
+
<td rowspan="1" colSpan="1" >[reject](https://write.woa.com/document/165654454250659840)</td>
|
|
255
|
+
|
|
256
|
+
<td rowspan="1" colSpan="1" >Rejects a call.</td>
|
|
257
|
+
</tr>
|
|
258
|
+
|
|
259
|
+
<tr>
|
|
260
|
+
<td rowspan="1" colSpan="1" >[ignore](https://write.woa.com/document/165654454250659840)</td>
|
|
261
|
+
|
|
262
|
+
<td rowspan="1" colSpan="1" >Ignores a call.</td>
|
|
263
|
+
</tr>
|
|
264
|
+
|
|
265
|
+
<tr>
|
|
266
|
+
<td rowspan="1" colSpan="1" >[hangup](https://write.woa.com/document/165654454250659840)</td>
|
|
267
|
+
|
|
268
|
+
<td rowspan="1" colSpan="1" >Ends a call.</td>
|
|
269
|
+
</tr>
|
|
270
|
+
|
|
271
|
+
<tr>
|
|
272
|
+
<td rowspan="1" colSpan="1" >[switchCallMediaType](https://write.woa.com/document/165654454250659840)</td>
|
|
273
|
+
|
|
274
|
+
<td rowspan="1" colSpan="1" >Changes the call type, for example, from video call to audio call.</td>
|
|
275
|
+
</tr>
|
|
276
|
+
|
|
277
|
+
<tr>
|
|
278
|
+
<td rowspan="1" colSpan="1" >[startRemoteView](https://write.woa.com/document/165654454250659840)</td>
|
|
279
|
+
|
|
280
|
+
<td rowspan="1" colSpan="1" >Subscribes to the video stream of a remote user.</td>
|
|
281
|
+
</tr>
|
|
282
|
+
|
|
283
|
+
<tr>
|
|
284
|
+
<td rowspan="1" colSpan="1" >[stopRemoteView](https://write.woa.com/document/165654454250659840)</td>
|
|
285
|
+
|
|
286
|
+
<td rowspan="1" colSpan="1" >Unsubscribes from the video stream of a remote user.</td>
|
|
287
|
+
</tr>
|
|
288
|
+
|
|
289
|
+
<tr>
|
|
290
|
+
<td rowspan="1" colSpan="1" >[openCamera](https://write.woa.com/document/165654454250659840)</td>
|
|
291
|
+
|
|
292
|
+
<td rowspan="1" colSpan="1" >Turns the camera on.</td>
|
|
293
|
+
</tr>
|
|
294
|
+
|
|
295
|
+
<tr>
|
|
296
|
+
<td rowspan="1" colSpan="1" >[switchCamera](https://write.woa.com/document/165654454250659840)</td>
|
|
297
|
+
|
|
298
|
+
<td rowspan="1" colSpan="1" >Switches between the front and rear cameras.</td>
|
|
299
|
+
</tr>
|
|
300
|
+
|
|
301
|
+
<tr>
|
|
302
|
+
<td rowspan="1" colSpan="1" >[closeCamera](https://write.woa.com/document/165654454250659840)</td>
|
|
303
|
+
|
|
304
|
+
<td rowspan="1" colSpan="1" >Turns the camera off.</td>
|
|
305
|
+
</tr>
|
|
306
|
+
|
|
307
|
+
<tr>
|
|
308
|
+
<td rowspan="1" colSpan="1" >[openMicrophone](https://write.woa.com/document/165654454250659840)</td>
|
|
309
|
+
|
|
310
|
+
<td rowspan="1" colSpan="1" >Turns the mic on.</td>
|
|
311
|
+
</tr>
|
|
312
|
+
|
|
313
|
+
<tr>
|
|
314
|
+
<td rowspan="1" colSpan="1" >[closeMicrophone](https://write.woa.com/document/165654454250659840)</td>
|
|
315
|
+
|
|
316
|
+
<td rowspan="1" colSpan="1" >Turns the mic off.</td>
|
|
317
|
+
</tr>
|
|
318
|
+
|
|
319
|
+
<tr>
|
|
320
|
+
<td rowspan="1" colSpan="1" >[selectAudioPlaybackDevice](https://write.woa.com/document/165654454250659840)</td>
|
|
321
|
+
|
|
322
|
+
<td rowspan="1" colSpan="1" >Selects the audio playback device (receiver or speaker).</td>
|
|
323
|
+
</tr>
|
|
324
|
+
|
|
325
|
+
<tr>
|
|
326
|
+
<td rowspan="1" colSpan="1" >[setVideoRenderParams](https://write.woa.com/document/165654454250659840)</td>
|
|
327
|
+
|
|
328
|
+
<td rowspan="1" colSpan="1" >Set the rendering mode of video image.</td>
|
|
329
|
+
</tr>
|
|
330
|
+
|
|
331
|
+
<tr>
|
|
332
|
+
<td rowspan="1" colSpan="1" >[setVideoEncoderParams](https://write.woa.com/document/165654454250659840)</td>
|
|
333
|
+
|
|
334
|
+
<td rowspan="1" colSpan="1" >Set the encoding parameters of video encoder.</td>
|
|
335
|
+
</tr>
|
|
336
|
+
|
|
337
|
+
<tr>
|
|
338
|
+
<td rowspan="1" colSpan="1" >[setBeautyLevel](https://write.woa.com/document/165654454250659840)</td>
|
|
339
|
+
|
|
340
|
+
<td rowspan="1" colSpan="1" >Set beauty level, support turning off default beauty.</td>
|
|
341
|
+
</tr>
|
|
342
|
+
|
|
343
|
+
<tr>
|
|
344
|
+
<td rowspan="1" colSpan="1" >[setSelfInfo](https://write.woa.com/document/165654454250659840)</td>
|
|
345
|
+
|
|
346
|
+
<td rowspan="1" colSpan="1" >Sets the alias and profile photo.</td>
|
|
347
|
+
</tr>
|
|
348
|
+
|
|
349
|
+
<tr>
|
|
350
|
+
<td rowspan="1" colSpan="1" >[enableMultiDeviceAbility](https://write.woa.com/document/165654454250659840)</td>
|
|
351
|
+
|
|
352
|
+
<td rowspan="1" colSpan="1" >Sets whether to enable multi-device login for `TUICallEngine` .</td>
|
|
353
|
+
</tr>
|
|
354
|
+
</table>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
This article will guide you through the process of integrating the TUICallKit component quickly. By following this documentation, you can complete the access work in just 10 minutes and ultimately obtain an application with a complete user interface as well as audio and video calling features.
|
|
2
|
+
<table>
|
|
3
|
+
<tr>
|
|
4
|
+
<td rowspan="1" colSpan="1" >Video Call</td>
|
|
5
|
+
|
|
6
|
+
<td rowspan="1" colSpan="1" >Group call</td>
|
|
7
|
+
</tr>
|
|
8
|
+
|
|
9
|
+
<tr>
|
|
10
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
11
|
+
|
|
12
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Environment Preparations
|
|
18
|
+
- [Node.js](https://nodejs.org/en/) version 16+.
|
|
19
|
+
|
|
20
|
+
- two Mobile phone.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Step 1. Activate the service
|
|
24
|
+
|
|
25
|
+
Refer to [Activate the Service](https://trtc.io/document/59832?platform=web&product=call) to obtain `SDKAppID, SDKSecretKey`, which will be used as **Mandatory Parameters in **[Initialize the TUICallKit](https://write.woa.com/document/133160392291844096)**.**
|
|
26
|
+
|
|
27
|
+
## Step 2. Download the TUICallKit
|
|
28
|
+
1. Download the [@tencentcloud/call-uikit-react-native](https://www.npmjs.com/package/@tencentcloud/call-uikit-react) component.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
【shell】
|
|
33
|
+
``` bash
|
|
34
|
+
yarn add @tencentcloud/call-uikit-react-native
|
|
35
|
+
```
|
|
36
|
+
2. Copy the `debug` directory to your project directory `src/debug`, it is necessary when generating userSig locally.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
【MacOS】
|
|
43
|
+
``` bash
|
|
44
|
+
cp -r node_modules/@tencentcloud/call-uikit-react-native/src/debug ./src
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
【Windows】
|
|
49
|
+
``` bash
|
|
50
|
+
xcopy node_modules\@tencentcloud\call-uikit-react\src\debug .\src\debug /i /e
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Step 3. Login the TUICallKit
|
|
55
|
+
|
|
56
|
+
You can choose to import the sample code in the `/src/App.tsx` file.
|
|
57
|
+
1. Import the call uikit.
|
|
58
|
+
|
|
59
|
+
``` javascript
|
|
60
|
+
import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';
|
|
61
|
+
import * as GenerateTestUserSig from "./debug/GenerateTestUserSig-es"; // Refer to Step 2.2
|
|
62
|
+
```
|
|
63
|
+
2. using the [TUICallKit.login](https://write.woa.com/document/162412491425603584) API to log in to the component, you need to `fill in``SDKAppID, SDKSecretKey `as two parameters in the code.
|
|
64
|
+
|
|
65
|
+
``` javascript
|
|
66
|
+
const handleLogin = async () => {
|
|
67
|
+
const userId = "denny"; // Please replace with your userId
|
|
68
|
+
const SDKAppID = 0; // Please replace with the SDKAppID obtained from step 1
|
|
69
|
+
const SecretKey = "****"; // Please replace with the SDKSecretKey obtained from step 1
|
|
70
|
+
|
|
71
|
+
const { userSig } = genTestUserSig({ userID: userId, SDKAppID, SecretKey });
|
|
72
|
+
|
|
73
|
+
TUICallKit.login(
|
|
74
|
+
{
|
|
75
|
+
sdkAppId: SDKAppID,
|
|
76
|
+
userId,
|
|
77
|
+
userSig,
|
|
78
|
+
},
|
|
79
|
+
(res) => {},
|
|
80
|
+
(errCode, errMsg) => {}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
```
|
|
84
|
+
<table>
|
|
85
|
+
<tr>
|
|
86
|
+
<td rowspan="1" colSpan="1" >**Parameter**</td>
|
|
87
|
+
|
|
88
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
89
|
+
|
|
90
|
+
<td rowspan="1" colSpan="1" >**Note**</td>
|
|
91
|
+
</tr>
|
|
92
|
+
|
|
93
|
+
<tr>
|
|
94
|
+
<td rowspan="1" colSpan="1" >userId</td>
|
|
95
|
+
|
|
96
|
+
<td rowspan="1" colSpan="1" >String</td>
|
|
97
|
+
|
|
98
|
+
<td rowspan="1" colSpan="1" >**Unique identifier of the user, **`defined by you`**, **it is allowed to contain only upper and lower case letters (a-z, A-Z), numbers (0-9), underscores, and hyphens.</td>
|
|
99
|
+
</tr>
|
|
100
|
+
|
|
101
|
+
<tr>
|
|
102
|
+
<td rowspan="1" colSpan="1" >SDKAppID</td>
|
|
103
|
+
|
|
104
|
+
<td rowspan="1" colSpan="1" >Number</td>
|
|
105
|
+
|
|
106
|
+
<td rowspan="1" colSpan="1" >The unique identifier for the audio and video application created in the [Tencent RTC Console](https://console.trtc.io/).</td>
|
|
107
|
+
</tr>
|
|
108
|
+
|
|
109
|
+
<tr>
|
|
110
|
+
<td rowspan="1" colSpan="1" >SecretKey</td>
|
|
111
|
+
|
|
112
|
+
<td rowspan="1" colSpan="1" >String</td>
|
|
113
|
+
|
|
114
|
+
<td rowspan="1" colSpan="1" >The SDKSecretKey of the audio and video application created in the [Tencent RTC Console](https://console.trtc.io/).</td>
|
|
115
|
+
</tr>
|
|
116
|
+
|
|
117
|
+
<tr>
|
|
118
|
+
<td rowspan="1" colSpan="1" >userSig</td>
|
|
119
|
+
|
|
120
|
+
<td rowspan="1" colSpan="1" >String</td>
|
|
121
|
+
|
|
122
|
+
<td rowspan="1" colSpan="1" >A security protection signature used for user log in authentication to confirm the user's identity and prevent malicious attackers from stealing your cloud service usage rights.</td>
|
|
123
|
+
</tr>
|
|
124
|
+
</table>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
> **Explanation of userSig:**
|
|
128
|
+
>
|
|
129
|
+
> - **Development environment:** If you are running a demo locally and developing debugging, you can use the `genTestUserSig` (Refer to Step 3.2) function in the debug file to generate a `userSig`. In this method, SDKSecretKey is vulnerable to decompilation and reverse engineering. Once your key is leaked, attackers can steal your Tencent Cloud traffic.
|
|
130
|
+
> - **Production environment: **If your project is going live, please use the [Server-side Generation of UserSig](https://trtc.io/document/35166) method.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Step 4. Make your first call
|
|
134
|
+
1. using the [TUICallKit.call API](https://write.woa.com/document/162412580951224320) to make a call.
|
|
135
|
+
|
|
136
|
+
``` javascript
|
|
137
|
+
//【3】Make a 1v1 video call
|
|
138
|
+
const users: string[] = ["mike"];
|
|
139
|
+
const call = async () => {
|
|
140
|
+
await TUICallKit.calls({
|
|
141
|
+
userID: users,
|
|
142
|
+
mediaType: MediaType.Video,
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
```
|
|
146
|
+
2. **After both userID login to successfully**, make a call..
|
|
147
|
+
|
|
148
|
+
<table>
|
|
149
|
+
<tr>
|
|
150
|
+
<td rowspan="1" colSpan="1" >Caller initiates an audio call</td>
|
|
151
|
+
|
|
152
|
+
<td rowspan="1" colSpan="1" >Callee receives an audio call request</td>
|
|
153
|
+
</tr>
|
|
154
|
+
|
|
155
|
+
<tr>
|
|
156
|
+
<td rowspan="1" colSpan="1" ><br></td>
|
|
157
|
+
|
|
158
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
159
|
+
</tr>
|
|
160
|
+
</table>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## FAQs
|
|
164
|
+
- If you encounter any problems with access and use, please refer to [FAQs](https://trtc.io/document/51024?platform=web&product=call).
|
|
165
|
+
|
|
166
|
+
- If you have any requirements or feedback, you can contact: info_rtc@tencent.com.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
This article will guide you on how to quickly run through the Audio and Video Call Demo. By following this document, you can have the Demo up and running in 10 minutes, and ultimately experience an Audio and Video Call feature with a complete UI interface.
|
|
2
|
+
<table>
|
|
3
|
+
<tr>
|
|
4
|
+
<td rowspan="1" colSpan="1" >1v1 Video Call</td>
|
|
5
|
+
|
|
6
|
+
<td rowspan="1" colSpan="1" >Group call</td>
|
|
7
|
+
</tr>
|
|
8
|
+
|
|
9
|
+
<tr>
|
|
10
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
11
|
+
|
|
12
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Step 1: Download the demo
|
|
18
|
+
1. Open the terminal and clone the repository.
|
|
19
|
+
|
|
20
|
+
``` bash
|
|
21
|
+
git clone https://github.com/Tencent-RTC/TUICallKit.git
|
|
22
|
+
```
|
|
23
|
+
2. Install dependencies.
|
|
24
|
+
|
|
25
|
+
``` bash
|
|
26
|
+
cd ./TUICallKit/ReactNative
|
|
27
|
+
yarn install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Step 2: Configure the demo
|
|
31
|
+
1. [Go to the Activate Service page](https://trtc.io/document/59832?platform=web&product=call&menulabel=web) and get `the SDKAppID and SDKSecretKey`
|
|
32
|
+
|
|
33
|
+
2. Fill them in the `TUICallKit/ReactNative/src/debug/GenerateTestUserSig-es.js` file.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Step 3: Run the demo
|
|
40
|
+
``` bash
|
|
41
|
+
# TUICallKit/ReactNative
|
|
42
|
+
yarn start
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Step 4: Make the first call
|
|
46
|
+
|
|
47
|
+
> **Note:**
|
|
48
|
+
>
|
|
49
|
+
|
|
50
|
+
> To experience the complete audio and video calling process, please log into the Demo on two devices as two different users, with one acting as the caller and the other as the callee.
|
|
51
|
+
>
|
|
52
|
+
|
|
53
|
+
- log in to userID (defined by you).
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
- Input the callee's userID and click all to experience your first call.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+

|
|
File without changes
|