• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.multimedia.avCastPicker (AVCastPicker)
2
3The **AVCastPicker** component provides a unified entry for device discovery and connection.
4
5> **NOTE**
6>
7> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8> - You can preview how this component looks on a real device. The preview is not yet available in the DevEco Studio Previewer.
9
10## Modules to Import
11
12```js
13import AVCastPicker from '@ohos.multimedia.avCastPicker';
14```
15
16## APIs
17
18AVCastPicker()
19
20Implements an **AVCastPicker** component, which can be used to cast audio and video onto other devices.
21
22This component is a custom component. Some basic knowledge of [@Component](../../quick-start/arkts-create-custom-components.md) will be helpful in using the component.
23
24**System capability**: SystemCapability.Multimedia.AVSession.AVCast
25
26## Attributes
27
28The [universal attributes](ts-universal-attributes-size.md) are supported.
29
30## Events
31
32The [universal events](ts-universal-events-click.md) are supported.
33
34## Example
35
36The following is an example of using **AVCastPicker**:
37
38```ts
39import AVCastPicker from '@ohos.multimedia.avCastPicker'
40
41@Entry
42@Component
43struct Index {
44  build() {
45    Row() {
46      Column() {
47        AVCastPicker()
48          .width('40vp')
49          .height('40vp')
50          .border({ width: 1, color: Color.Red })
51      }.height('50%')
52    }.width('50%')
53  }
54}
55```
56