Anchor Preparation Page
Feature Overview
The anchor preparation page is where anchors preview the local camera, adjust beauty parameters, and flip the camera before starting the live broadcast. This document describes how to complete the access work for the anchor preparation page within 10 minutes.

Feature Integration
Note:
Note: Before completing the feature integration, you must first complete the integration steps in the overview.
Creating an Anchor Preparation Page View and Initializing
val roomId = "1236666"val anchorPrepareView = AnchorPrepareView(context)anchorPrepareView.init(roomId, null)
String roomId = "live_123456";mAnchorPrepareView = new AnchorPrepareView(this);mAnchorPrepareView.init(roomId, null);
Load the Preparation Page Into the Activity
setContentView(mAnchorPrepareView)
setContentView(mAnchorPrepareView);
Retrieve View Data Provided by the Host Preparation Page
The preparation page allows you to set the cover, live room name, and live mode. You can use the getState() api to retrieve the specific values you set.
val state: PrepareState = anchorPrepareView.getState()val roomName = state.roomName.getValue()val coverURL = state.coverURL.getValue()val liveMode: LiveStreamPrivacyStatus? = state.liveMode.getValue()
PrepareState state = mAnchorPrepareView.getState();String roomName = state.roomName.getValue();String coverURL = state.coverURL.getValue();LiveStreamPrivacyStatus liveMode = state.liveMode.getValue();
Adding Go Live Button Click Event
// Implement the AnchorPrepareViewDefine.AnchorPrepareViewListener interface in your Activity and override the following two methods.// Callback for clicking the go live buttonoverride fun onClickStartButton() {//}override fun onClickBackButton() {finish();}// Add a listener to the anchor preparation page view.anchorPrepareView.addAnchorPrepareViewListener(this)
// Implement the AnchorPrepareViewDefine.AnchorPrepareViewListener interface in your Activity and override the following two methods.// Callback for clicking the go live button@Overridepublic void onClickStartButton() {}// Callback for clicking the return button@Overridepublic void onClickBackButton() {}// Add a listener to the anchor preparation page view.mAnchorPrepareView.addAnchorPrepareViewListener(this);
Feature Customization
Hiding the Operation Area View
anchorPrepareView.disableFeatureMenu(true)
mAnchorPrepareView.disableFeatureMenu(true);
Hiding the Operation Area Beauty Effect Feature
anchorPrepareView.disableMenuBeautyButton(true)
mAnchorPrepareView.disableMenuBeautyButton(true);
Hide Operation Area Sound Effect Feature
anchorPrepareView.disableMenuAudioEffectButton(true)
mAnchorPrepareView.disableMenuAudioEffectButton(true);
Hide Operation Area Flip Feature
anchorPrepareView.disableMenuSwitchButton(true)
mAnchorPrepareView.disableMenuSwitchButton(true);