• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Introduction to Media Library Kit
2<!--Kit: Media Library Kit-->
3<!--Subsystem: Multimedia-->
4<!--Owner: @yixiaoff-->
5<!--SE: @liweilu1-->
6<!--TSE: @xchaosioda-->
7
8Media 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.
9
10## Available Capabilities
11
12With Media Library Kit, you can manage albums and media files, including creating and accessing albums and modifying media assets in albums.
13
14The following capabilities are opened to all applications:
15
16- Selecting or saving media assets
17  - [Selecting Media Assets Using Picker](photoAccessHelper-photoviewpicker.md)
18  - [Saving Media Assets](photoAccessHelper-savebutton.md)
19- Managing moving photos
20  - [Accessing and Managing Moving Photos](photoAccessHelper-movingphoto.md)
21  - [Playing Moving Photos with MovingPhotoView](movingphotoview-guidelines.md)
22<!--RP2--><!--RP2End-->
23
24The following capabilities are restrictedly opened to third-party applications:
25
26> **NOTE**
27>
28> 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](photoAccessHelper-preparation.md#requesting-permissions). <!--RP1-->The following permissions are opened to third-party applications with certain restrictions.<!--RP1End-->
29
30- [Media asset management](photoAccessHelper-resource-guidelines.md), including:
31  - Obtaining media assets
32  - Obtaining image and video thumbnails
33  - Renaming a media asset
34- [User album management](photoAccessHelper-userAlbum-guidelines.md), including:
35  - Obtaining a user album
36  - Renaming a user album
37  - Adding images and videos to a user album.
38  - Obtaining images and videos from a user album
39  - Removing images and videos from a user album
40- [Management of system albums](photoAccessHelper-systemAlbum-guidelines.md), including:
41  - Favorites
42  - Video album
43- [Change notifications of images, videos, and albums](photoAccessHelper-notify-guidelines.md), including:
44  - Registering a listener for the specified URI
45  - Unregistering a listener for the specified URI
46
47<!--Del-->
48The following capabilities are opened to system applications:
49
50- Media asset operations, including:
51  - Creating a media asset
52  - Moving a media asset to the trash
53  - Deleting a media asset permanently
54
55- Album-related operations, including:
56  - Creating a user album
57  - Deleting a user album
58  - Hiding an album
59  - Favoriting and unfavoriting an album
60  - Using the Screenshots album
61<!--DelEnd-->
62
63## Features
64
65- Simple and efficient development thanks to object-based API design.
66- Integrated device-cloud access management.
67- Precise security control and automatic authorization with Pickers and security component **SaveButton**.
68- Intelligent format conversion completed at the framework layer in a unified manner.
69
70## Working Principles
71
72The 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.
73