|
7 | 7 | import com.herewhite.demo.R; |
8 | 8 | import com.herewhite.demo.common.SampleBaseActivity; |
9 | 9 | import com.herewhite.demo.databinding.ActivityWindowAppliancePluginBinding; |
| 10 | +import com.herewhite.sdk.RoomParams; |
10 | 11 | import com.herewhite.sdk.WhiteSdkConfiguration; |
11 | 12 | import com.herewhite.sdk.domain.Appliance; |
| 13 | +import com.herewhite.sdk.domain.AppliancePluginOptions; |
12 | 14 | import com.herewhite.sdk.domain.CameraConfig; |
13 | 15 | import com.herewhite.sdk.domain.ImageInformationWithUrl; |
14 | 16 | import com.herewhite.sdk.domain.MemberState; |
|
18 | 20 | import com.herewhite.sdk.domain.StrokeType; |
19 | 21 | import com.herewhite.sdk.domain.WindowAppParam; |
20 | 22 |
|
| 23 | +import java.util.Map; |
| 24 | + |
21 | 25 | public class WindowAppliancePluginActivity extends SampleBaseActivity { |
22 | 26 |
|
23 | 27 | private ActivityWindowAppliancePluginBinding binding; |
@@ -156,6 +160,43 @@ protected WhiteSdkConfiguration generateSdkConfig() { |
156 | 160 | return configuration; |
157 | 161 | } |
158 | 162 |
|
| 163 | + @Override |
| 164 | + protected RoomParams generateRoomParams() { |
| 165 | + RoomParams roomParams = super.generateRoomParams(); |
| 166 | + roomParams.setAppliancePluginOptions(getAppliancePluginOptions()); |
| 167 | + return roomParams; |
| 168 | + } |
| 169 | + |
| 170 | + private AppliancePluginOptions getAppliancePluginOptions() { |
| 171 | + Map<String, Object> extrasOptions = Map.of( |
| 172 | + // cursor 配置 |
| 173 | + "cursor", Map.of( |
| 174 | + "enable", false, |
| 175 | + "expirationTime", 500 |
| 176 | + ), |
| 177 | + // syncOpt 配置 |
| 178 | + "syncOpt", Map.of( |
| 179 | + "interval", 100, |
| 180 | + "smoothSync", false |
| 181 | + ), |
| 182 | + // bezier 配置 |
| 183 | + "bezier", Map.of( |
| 184 | + "enable", false, |
| 185 | + "maxDrawCount", 200 |
| 186 | + ), |
| 187 | + // textEditor 配置 |
| 188 | + "textEditor", Map.of( |
| 189 | + "showFloatBar", false, |
| 190 | + "canSelectorSwitch", false, |
| 191 | + "rightBoundBreak", true |
| 192 | + ) |
| 193 | + ); |
| 194 | + |
| 195 | + AppliancePluginOptions appliancePluginOptions = new AppliancePluginOptions(); |
| 196 | + appliancePluginOptions.setExtras(extrasOptions); |
| 197 | + return appliancePluginOptions; |
| 198 | + } |
| 199 | + |
159 | 200 | @Override |
160 | 201 | protected void onJoinRoomSuccess() { |
161 | 202 | room.disableSerialization(false); |
|
0 commit comments