harmony 鸿蒙@ohos.multimedia.avCastPicker (AVCastPicker)

  • 2023-10-30
  • 浏览 (491)

@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%')
  }
}

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkTS-based Declarative Development Paradigm

harmony 鸿蒙Property Animation

harmony 鸿蒙Enums

harmony 鸿蒙Blank

harmony 鸿蒙Button

harmony 鸿蒙CalendarPicker

harmony 鸿蒙Checkbox

harmony 鸿蒙CheckboxGroup

harmony 鸿蒙DataPanel

harmony 鸿蒙DatePicker

0  赞