requestResource abstract method

Future<ZegoCopyrightedMusicRequestResourceResult> requestResource(
  1. ZegoCopyrightedMusicRequestConfig config,
  2. ZegoCopyrightedMusicResourceType type
)

Request music resource.

Available since: 3.0.2 Description: In addition to obtaining the basic information of the song (duration, song name, singer, etc.), and the most important resource id that can be used for local playback, there are also some related authentications information. Use case: Get copyrighted songs for local playback and sharing. Related APIs: After a user in the room successfully calls this interface to request a music resource, other users in the room can call the getsharedresource interface to get the music resource for free once. When to call: After initializing the copyrighted music initCopyrightedMusic. Note:

  1. Each resource has a unique resource ID.
  2. Every time this API is called, it will be billed once, please consult ZEGO business personnel for details.
  3. Each resource has a unique resource ID. The resources obtained by calling this API are time-sensitive, the valid duration is the minimum value between the SDK life cycle and 24-hour.
  • config The configuration of requesting music resource.
  • type The resource type of music.
  • Returns Result of requesting music resource.

Implementation

Future<ZegoCopyrightedMusicRequestResourceResult> requestResource(
    ZegoCopyrightedMusicRequestConfig config,
    ZegoCopyrightedMusicResourceType type);