- Release Notes and Announcements
- User Tutorial
- Product Introduction
- Purchase Guide
- Free Demo
- SDK Download
- Integration (UI Included)
- TUIKit Overview
- Audio/Video Call
- Overview (TUICallKit)
- Integration (TUICallKit)
- UI Customization (TUICallKit)
- Offline Call Push (TUICallKit)
- On-Cloud Recording (TUICallKit)
- API Documentation (TUICallKit)
- Release Notes (TUICallKit)
- FAQs
- Audio/Video Conference
- Overview (TUIRoomKit)
- Integration (TUIRoomKit)
- UI Customization (TUIRoomKit)
- API Documentation(TUIRoomKit)
- iOS&Mac
- Android
- Windows
- Web
- Electron
- Flutter
- FAQs
- Error Code
- Interactive Live Audio Streaming
- Interactive Video Streaming
- Online Karaoke
- Quick Integration (TUIKaraoke)
- Solution Overview (TUIKaraoke)
- TUIKaraoke APIs
- FAQs
- Integration (No UI)
- 0. API Examples
- 1. Importing the SDK
- 2. Entering a Room
- 3. Subscribing to Audio/Video Streams
- 4. Publishing Audio/Video Streams
- 5. Exiting a Room
- 6. Sensing Network Quality
- 7. Enabling Screen Sharing
- 8. Sharing Computer Audio
- 9. Setting Video Quality
- 10. Rotating Videos
- 11.FAQs
- Advanced Features
- Relay to CDN
- Enabling Advanced Permission Control
- RTMP Streaming with TRTC
- Testing Hardware Devices
- Testing Network Quality
- On-Cloud Recording
- Custom Capturing and Rendering
- Custom Audio Capturing and Playback
- Sending and Receiving Messages
- Event Callbacks
- Content Moderation
- Access Management
- How to push stream to TRTC room with OBS WHIP
- Sample Code
- Client APIs
- iOS and macOS
- Android
- All Platforms (C++)
- Web
- Electron
- Flutter
- Unity
- Server APIs
- History
- Introduction
- API Category
- Making API Requests
- Room Management APIs
- Call Quality Monitoring APIs
- Pull stream Relay Related interface
- Stream mixing and relay APIs
- On-cloud recording APIs
- Usage Statistics APIs
- Data Types
- Error Codes
- Appendix
- Console Guide
- Selection of Service region
- Application Management
- Package Management
- Usage Statistics
- Monitoring Dashboard
- Development Assistance
- FAQs
- Legacy Documentation
- Service Level Agreement
- TRTC Policy
- Glossary
Menu
Web
Last updated: 2023-09-26 17:01:08Download PDF
This document describes how an anchor publishes audio/video streams. "Publishing" refers to turning on the mic and camera to make the audio heard and video seen by other users in the room.

Step 1. Enter Room
Step 2. Turn on camera
// To preview the camera image, you need to place an HTMLElement in the DOM, which can be a div tag, assuming its id is local-video.const view = 'local-video';await trtc.startLocalVideo({ view });
Step 3. Turn on microphone
await trtc.startLocalAudio();