harmony 鸿蒙Introduction to Media Library Kit

  • 2025-06-12
  • 浏览 (2)

Introduction to Media Library Kit

Media Library Kit provides the capabilities of managing albums and media files, including images and videos, to enable your application to quickly display images and play back videos.

Available Capabilities

With Media Library Kit, you can manage albums and media files, including creating and accessing albums and modifying media assets in albums.

The following capabilities are opened to all applications:

The following capabilities are restrictedly opened to third-party applications:

NOTE

To use the restricted open capabilities, the application must have the ohos.permission.READ_IMAGEVIDEO and ohos.permission.WRITE_IMAGEVIDEO permissions. For details, see Requesting Permissions. The following permissions are opened to third-party applications with certain restrictions.

The following capabilities are opened to system applications:

  • Media asset operations, including:

    • Creating a media asset
    • Moving a media asset to the trash
    • Deleting a media asset permanently
  • Album-related operations, including:

    • Creating a user album
    • Deleting a user album
    • Hiding an album
    • Favoriting and unfavoriting an album
    • Using the Screenshots album

Features

  • Simple and efficient development thanks to object-based API design.
  • Integrated device-cloud access management.
  • Precise security control and automatic authorization with Pickers and security component SaveButton.
  • Intelligent format conversion completed at the framework layer in a unified manner.

Working Principles

The media library receives requests for obtaining or changing media assets from users, verifies the request validity and permissions, interacts with the database if the verification is successful, and returns the result.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Media Library Kit (Media File Management Service)

harmony 鸿蒙Playing Moving Photos with MovingPhotoView

harmony 鸿蒙Accessing and Managing Moving Photos

harmony 鸿蒙Observing Media Assets

harmony 鸿蒙Selecting Media Assets Using Picker

harmony 鸿蒙Before You Start

harmony 鸿蒙Managing Media Assets

harmony 鸿蒙Saving Media Assets

harmony 鸿蒙Managing System Albums

harmony 鸿蒙Managing User Albums

0  赞