harmony 鸿蒙Introduction to Media Library Kit
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:
- Selecting or saving media assets
- Managing moving photos
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.
- Media asset management, including:
- Obtaining media assets
- Obtaining image and video thumbnails
- Renaming a media asset
- User album management, including:
- Obtaining a user album
- Renaming a user album
- Adding images and videos to a user album.
- Obtaining images and videos from a user album
- Removing images and videos from a user album
- Management of system albums, including:
- Favorites
- Video album
- Change notifications of images, videos, and albums, including:
- Registering a listener for the specified URI
- Unregistering a listener for the specified URI
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 鸿蒙Managing Media Assets
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦