@ohos.multimedia.avCastPicker (AVCastPicker)
The AVCastPicker component provides a unified entry for device discovery and connection.
NOTE
- 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.
- You can preview how this component looks on a real device. The preview is not yet available in the DevEco Studio Previewer.
Modules to Import
import AVCastPicker from '@ohos.multimedia.avCastPicker';
APIs
AVCastPicker()
Implements an AVCastPicker component, which can be used to cast audio and video onto other devices.
This component is a custom component. Some basic knowledge of @Component will be helpful in using the component.
System capability: SystemCapability.Multimedia.AVSession.AVCast
Attributes
The universal attributes are supported.
Events
The universal events are supported.
Example
The following is an example of using AVCastPicker:
import AVCastPicker from '@ohos.multimedia.avCastPicker'
@Entry
@Component
struct Index {
build() {
Row() {
Column() {
AVCastPicker()
.width('40vp')
.height('40vp')
.border({ width: 1, color: Color.Red })
}.height('50%')
}.width('50%')
}
}