1/* 2* Copyright (C) 2023 Huawei Device Co., Ltd. 3* Licensed under the Apache License, Version 2.0 (the "License"); 4* you may not use this file except in compliance with the License. 5* You may obtain a copy of the License at 6* 7* http://www.apache.org/licenses/LICENSE-2.0 8* 9* Unless required by applicable law or agreed to in writing, software 10* distributed under the License is distributed on an "AS IS" BASIS, 11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12* See the License for the specific language governing permissions and 13* limitations under the License. 14*/ 15 16/** 17 * @file 18 * @kit AVSessionKit 19 */ 20 21import { AVCastPickerState } from './@ohos.multimedia.avCastPickerParam'; 22import { AVCastPickerStyle } from './@ohos.multimedia.avCastPickerParam'; 23import { AVCastPickerColorMode } from './@ohos.multimedia.avCastPickerParam'; 24 25/** 26 * A picker view to show availale streaming device list. 27 * @syscap SystemCapability.Multimedia.AVSession.AVCast 28 * @since 10 29 */ 30 /** 31 * A picker view to show availale streaming device list. 32 * @syscap SystemCapability.Multimedia.AVSession.AVCast 33 * @atomicservice 34 * @since 12 35 */ 36@Component 37declare struct AVCastPicker { 38 /** 39 * Assigns the color of picker component at normal state . 40 * @type { ? Color | number | string } 41 * @syscap SystemCapability.Multimedia.AVSession.AVCast 42 * @crossplatform 43 * @since 11 44 */ 45 /** 46 * Assigns the color of picker component at normal state . 47 * @type { ? Color | number | string } 48 * @syscap SystemCapability.Multimedia.AVSession.AVCast 49 * @crossplatform 50 * @atomicservice 51 * @since 12 52 */ 53 @Prop 54 normalColor?: Color | number | string; 55 56 /** 57 * Assigns the color of picker component at active state. 58 * @type { ? Color | number | string } 59 * @syscap SystemCapability.Multimedia.AVSession.AVCast 60 * @crossplatform 61 * @since 11 62 */ 63 /** 64 * Assigns the color of picker component at active state. 65 * @type { ? Color | number | string } 66 * @syscap SystemCapability.Multimedia.AVSession.AVCast 67 * @crossplatform 68 * @atomicservice 69 * @since 12 70 */ 71 @Prop 72 activeColor?: Color | number | string; 73 74 /** 75 * Set the picker style. 76 * @type { ? AVCastPickerStyle } 77 * @syscap SystemCapability.Multimedia.AVSession.AVCast 78 * @atomicservice 79 * @since 12 80 */ 81 @Prop 82 pickerStyle?: AVCastPickerStyle; 83 84 /** 85 * Set the picker color mode. 86 * @type { ? AVCastPickerColorMode } 87 * @syscap SystemCapability.Multimedia.AVSession.AVCast 88 * @atomicservice 89 * @since 12 90 */ 91 @Prop 92 colorMode?: AVCastPickerColorMode; 93 94 /** 95 * Set the session type used by current picker component which can refer to AVSessionType in avSession. 96 * If not set, default value is 'audio'. 97 * @type { ? string } 98 * @syscap SystemCapability.Multimedia.AVSession.AVCast 99 * @atomicservice 100 * @since 12 101 */ 102 @Prop 103 sessionType?: string; 104 105 /** 106 * Set the custom builder for the picker appearance. 107 * If not set, system will show the default appearance for different device type. 108 * @type { ? CustomBuilder } 109 * @syscap SystemCapability.Multimedia.AVSession.AVCast 110 * @atomicservice 111 * @since 12 112 */ 113 @Prop 114 customPicker?: CustomBuilder; 115 116 /** 117 * Picker state change callback. 118 * @type { ?function } 119 * @syscap SystemCapability.Multimedia.AVSession.AVCast 120 * @crossplatform 121 * @since 11 122 */ 123 /** 124 * Picker state change callback. 125 * @type { ?function } 126 * @syscap SystemCapability.Multimedia.AVSession.AVCast 127 * @crossplatform 128 * @atomicservice 129 * @since 12 130 */ 131 onStateChange?: (state: AVCastPickerState) => void; 132} 133export default AVCastPicker;