Host Preview Page | Host Live Stream Page | Co-host Management Page | Audience Viewing Page |
![]() | ![]() | ![]() | ![]() |
sudo gem install cocoapods in your terminal.git clone https://github.com/Tencent-RTC/TUIKit_ReactNative.git
tuikit-atomic-x folder into your project’s root directory.live folder into your project’s root directory.{// Your project configuration"workspaces": ["tuikit-atomic-x","live",],}
yarn install
App.tsx fileApp.tsx file.import { CustomToastContainer, i18n, I18nextProvider } from 'react-native-tuikit-atomic-x';function App() {const renderPage = () => {// Your business logic};return (<I18nextProvider i18n={i18n}>......{renderPage()}<CustomToastContainer /></I18nextProvider>);}
target 'YourProjectTarget' do# Other existing Pod dependencies...# Add pod 'SVGAPlayer' dependency, the gift playback module uses this capacitypod 'SVGAPlayer', '~> 2.5.0'end
pod install
ios/YourApp/Info.plist<dict>camera permission<key>NSCameraUsageDescription</key><string>Require the use of camera to perform video call</string>mic permission<key>NSMicrophoneUsageDescription</key><string>Require the use of microphone to perform audio call</string>android.permission.INTERNET<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/></dict></dict>
android/app/src/main/AndroidManifest.xml<manifest xmlns:android="http://schemas.android.com/apk/res/android">android.permission.BASE<uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />android.permission.RECORD_AUDIO<uses-permission android:name="android.permission.CAMERA" /><uses-permission android:name="android.permission.RECORD_AUDIO" /><uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /><application>android.permission.INTERNET</application></manifest>
import { useLoginState } from 'react-native-tuikit-atomic-x';const { login } = useLoginState();async function Login() {try {await login({sdkAppID: 0, // SDKAppID, refer to Activate the Service to obtainuserID: '', // UserID, refer to Activate the Service to obtainuserSig: '', // userSig, refer to Activate the Service to obtain});} catch (error) {console.error('login error:', error);}}
Parameter | Type | Description |
SDKAppID | Int | |
UserID | String | The current user's unique ID, containing only English letters, digits, hyphens, and underscores. |
userSig | String | A ticket for TRTC authentication. Please note: Development Environment: You can use the local GenerateTestUserSig.genTestSig function to generate a UserSig or generate a temporary UserSig via the UserSig Generation Tool.Production Environment: To prevent key leakage, you must use a server-side method to generate UserSig. For details, see Server-side Generation of UserSig. |
Feature | Description | Experience Link |
Live Stream Publishing | The complete workflow for a host to start a stream, including pre-stream setup and various in-stream interactions. | |
Audience viewing | Audience can watch live streaming after entering the anchor's live streaming room, with features like audience mic connection, live room information, online audience, and bullet screen display. | |
Live Stream List | Display the live stream list interface and features, including the live stream list and room information display. |
# Clean up and rebuildnpx react-native clean
// android/build.gradlebuildscript {ext {minSdkVersion = 24compileSdkVersion = 36targetSdkVersion = 36ndkVersion = "27.1.12297006"kotlinVersion = "2.1.20"}}
Feedback