getSharedResource abstract method

Future<ZegoCopyrightedMusicGetSharedResourceResult> getSharedResource(
  1. ZegoCopyrightedMusicGetSharedConfig config,
  2. ZegoCopyrightedMusicResourceType type
)

Get shared 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. Related APIs: After a user in the room calls the requestresource interface to request a music resource successfully, other users in the room can call this interface to get the music resource for free once. When to call: After initializing the copyrighted music initCopyrightedMusic. Note: 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 getting shared music resource.
  • type The resource type of music.
  • Returns Result of getting shared music resource.

Implementation

Future<ZegoCopyrightedMusicGetSharedResourceResult> getSharedResource(
    ZegoCopyrightedMusicGetSharedConfig config,
    ZegoCopyrightedMusicResourceType type);