ZegoCopyrightedMusic Class Reference
Inherits from | NSObject |
---|---|
Declared in | ZegoExpressDefines.h |
– setEventHandler:
The object used to receive copyrighted music callbacks.
- (void)setEventHandler:(nullable id<ZegoCopyrightedMusicEventHandler>)handler
Parameters
handler |
The object used to receive copyrighted music callbacks. |
---|
Declared In
ZegoExpressDefines.h
– initCopyrightedMusic:callback:
the copyrighted music configuration.
- (void)initCopyrightedMusic:(ZegoCopyrightedMusicConfig *)config callback:(nullable ZegoCopyrightedMusicInitCallback)callback
Parameters
config |
the copyrighted music configuration. |
---|---|
callback |
init result |
Declared In
ZegoExpressDefines.h
– getCacheSize
cache file size, in byte.
- (unsigned long long)getCacheSize
Return Value
cache file size, in byte.
Declared In
ZegoExpressDefines.h
– clearCache
Available since: 2.13.0 Description: When using this module, some cache files may be generated, which can be cleared through this interface. Use case: Used to clear the cache of the App. When to call: After initializing the copyrighted music [createCopyrightedMusic].
- (void)clearCache
Declared In
ZegoExpressDefines.h
– sendExtendedRequest:params:callback:
request command, details about the commands supported.
- (void)sendExtendedRequest:(NSString *)command params:(NSString *)params callback:(nullable ZegoCopyrightedMusicSendExtendedRequestCallback)callback
Parameters
command |
request command, details about the commands supported. |
---|---|
params |
request parameters, each request command has corresponding request parameters. |
callback |
send extended feature request result |
Declared In
ZegoExpressDefines.h
– getLrcLyric:vendorID:callback:
the ID of the song or accompaniment, the song and accompaniment of a song share the same ID.
- (void)getLrcLyric:(NSString *)songID vendorID:(ZegoCopyrightedMusicVendorID)vendorID callback:(nullable ZegoCopyrightedMusicGetLrcLyricCallback)callback
Parameters
songID |
the ID of the song or accompaniment, the song and accompaniment of a song share the same ID. |
---|---|
vendorID |
Copyright music resource song copyright provider. |
callback |
get lyrics result |
Declared In
ZegoExpressDefines.h
– getLrcLyricWithConfig:callback:
The configuration of get lyric.
- (void)getLrcLyricWithConfig:(ZegoCopyrightedMusicGetLyricConfig *)config callback:(nullable ZegoCopyrightedMusicGetLrcLyricCallback)callback
Parameters
config |
The configuration of get lyric. |
---|---|
callback |
get lyrics result |
Declared In
ZegoExpressDefines.h
– getKrcLyricByToken:callback:
The krcToken obtained by calling requestAccompaniment.
- (void)getKrcLyricByToken:(NSString *)krcToken callback:(nullable ZegoCopyrightedMusicGetKrcLyricByTokenCallback)callback
Parameters
krcToken |
The krcToken obtained by calling requestAccompaniment. |
---|---|
callback |
get lyrics result. |
Declared In
ZegoExpressDefines.h
– requestResource:type:callback:
The configuration of requesting music resource.
- (void)requestResource:(ZegoCopyrightedMusicRequestConfig *)config type:(ZegoCopyrightedMusicResourceType)type callback:(nullable ZegoCopyrightedMusicRequestResourceCallback)callback
Parameters
config |
The configuration of requesting music resource. |
---|---|
type |
The resource type of music. |
callback |
Callback of requesting music resource. |
Declared In
ZegoExpressDefines.h
– requestResource:callback:
The configuration of requesting music resource.
- (void)requestResource:(ZegoCopyrightedMusicRequestConfigV2 *)config callback:(nullable ZegoCopyrightedMusicRequestResourceCallback)callback
Parameters
config |
The configuration of requesting music resource. |
---|---|
callback |
Callback of requesting music resource. |
Declared In
ZegoExpressDefines.h
– getSharedResource:type:callback:
The configuration of getting shared music resource.
- (void)getSharedResource:(ZegoCopyrightedMusicGetSharedConfig *)config type:(ZegoCopyrightedMusicResourceType)type callback:(nullable ZegoCopyrightedMusicGetSharedResourceCallback)callback
Parameters
config |
The configuration of getting shared music resource. |
---|---|
type |
The resource type of music. |
callback |
Callback of getting shared music resource. |
Declared In
ZegoExpressDefines.h
– getSharedResource:callback:
The configuration of getting shared music resource.
- (void)getSharedResource:(ZegoCopyrightedMusicGetSharedConfigV2 *)config callback:(nullable ZegoCopyrightedMusicGetSharedResourceCallback)callback
Parameters
config |
The configuration of getting shared music resource. |
---|---|
callback |
Callback of getting shared music resource. |
Declared In
ZegoExpressDefines.h
– download:callback:
the resource ID corresponding to the song or accompaniment.
- (void)download:(NSString *)resourceID callback:(nullable ZegoCopyrightedMusicDownloadCallback)callback
Parameters
resourceID |
the resource ID corresponding to the song or accompaniment. |
---|---|
callback |
download song or accompaniment result. |
Declared In
ZegoExpressDefines.h
– cancelDownload:
the resource ID corresponding to the song or accompaniment.
- (void)cancelDownload:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the song or accompaniment. |
---|
Declared In
ZegoExpressDefines.h
– queryCache:
The configuration of querying cache.
- (BOOL)queryCache:(ZegoCopyrightedMusicQueryCacheConfig *)config
Parameters
config |
The configuration of querying cache. |
---|
Declared In
ZegoExpressDefines.h
– queryCacheV2:
The configuration of querying cache.
- (BOOL)queryCacheV2:(ZegoCopyrightedMusicQueryCacheConfigV2 *)config
Parameters
config |
The configuration of querying cache. |
---|
Declared In
ZegoExpressDefines.h
– getDuration:
the resource ID corresponding to the song or accompaniment.
- (unsigned long long)getDuration:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the song or accompaniment. |
---|
Declared In
ZegoExpressDefines.h
– setScoringLevel:
The difficulty level of scoring. The level ranges from 0 to 4. The scoring difficulty decreases from 0 to 4.
- (void)setScoringLevel:(int)level
Parameters
level |
The difficulty level of scoring. The level ranges from 0 to 4. The scoring difficulty decreases from 0 to 4. |
---|
Declared In
ZegoExpressDefines.h
– startScore:pitchValueInterval:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)startScore:(NSString *)resourceID pitchValueInterval:(int)pitchValueInterval
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|---|
pitchValueInterval |
the time interval of real-time pitch line callback, in milliseconds, the default is 50 milliseconds. |
Declared In
ZegoExpressDefines.h
– pauseScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)pauseScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– resumeScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)resumeScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– stopScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)stopScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– resetScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)resetScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– getPreviousScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)getPreviousScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– getAverageScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)getAverageScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– getTotalScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)getTotalScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– getFullScore:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (int)getFullScore:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|
Declared In
ZegoExpressDefines.h
– getStandardPitch:callback:
the resource ID corresponding to the accompaniment or accompaniment clip.
- (void)getStandardPitch:(NSString *)resourceID callback:(nullable ZegoCopyrightedMusicGetStandardPitchCallback)callback
Parameters
resourceID |
the resource ID corresponding to the accompaniment or accompaniment clip. |
---|---|
callback |
get standard pitch data result. |
Declared In
ZegoExpressDefines.h
– getCurrentPitch:
the resource ID corresponding to the song or accompaniment.
- (int)getCurrentPitch:(NSString *)resourceID
Parameters
resourceID |
the resource ID corresponding to the song or accompaniment. |
---|
Declared In
ZegoExpressDefines.h
+ new
Please use the [createCopyrightedMusic] function in ZegoExpressEngine class instead.
+ (instancetype)new
Declared In
ZegoExpressDefines.h
– init
Please use the [createCopyrightedMusic] function in ZegoExpressEngine class instead.
- (instancetype)init
Declared In
ZegoExpressDefines.h
– requestSong:callback:
Deprecated since 3.0.2, please use the [requestResource] function instead. (Deprecated: Deprecated since 3.0.2, please use the [requestResource] function instead.)
- (void)requestSong:(ZegoCopyrightedMusicRequestConfig *)config callback:(nullable ZegoCopyrightedMusicRequestSongCallback)callback
Parameters
config |
request configuration. |
---|---|
callback |
request a song result |
Declared In
ZegoExpressDefines.h
– requestAccompaniment:callback:
Deprecated since 3.0.2, please use the [requestResource] function instead. (Deprecated: Deprecated since 3.0.2, please use the [requestResource] function instead.)
- (void)requestAccompaniment:(ZegoCopyrightedMusicRequestConfig *)config callback:(nullable ZegoCopyrightedMusicRequestAccompanimentCallback)callback
Parameters
config |
request configuration. |
---|---|
callback |
request accompaniment result. |
Declared In
ZegoExpressDefines.h
– requestAccompanimentClip:callback:
Deprecated since 3.0.2, please use the [requestResource] function instead. (Deprecated: Deprecated since 3.0.2, please use the [requestResource] function instead.)
- (void)requestAccompanimentClip:(ZegoCopyrightedMusicRequestConfig *)config callback:(nullable ZegoCopyrightedMusicRequestAccompanimentClipCallback)callback
Parameters
config |
request configuration. |
---|---|
callback |
request accompaniment clip result. |
Declared In
ZegoExpressDefines.h
– getMusicByToken:callback:
Deprecated since 3.0.2, please use the [getSharedResource] function instead. (Deprecated: Deprecated since 3.0.2, please use the [getSharedResource] function instead.)
- (void)getMusicByToken:(NSString *)shareToken callback:(nullable ZegoCopyrightedMusicGetMusicByTokenCallback)callback
Parameters
shareToken |
access the corresponding authorization token for a song or accompaniment. |
---|---|
callback |
get a song or accompaniment result. |
Declared In
ZegoExpressDefines.h
– getLrcLyric:callback:
Deprecated since 2.14.0, please use the method with the same name with [vendorID] parameter instead. (Deprecated: Deprecated since 2.14.0, please use the method with the same name with [vendorID] parameter instead.)
- (void)getLrcLyric:(NSString *)songID callback:(nullable ZegoCopyrightedMusicGetLrcLyricCallback)callback
Parameters
songID |
the ID of the song or accompaniment, the song and accompaniment of a song share the same ID. |
---|---|
callback |
get lyrics result |
Declared In
ZegoExpressDefines.h
– queryCache:type:
Deprecated since 2.14.0, please use the method with the same name with [vendorID] parameter instead. (Deprecated: Deprecated since 2.14.0, please use the method with the same name with [vendorID] parameter instead.)
- (BOOL)queryCache:(NSString *)songID type:(ZegoCopyrightedMusicType)type
Parameters
songID |
the ID of the song or accompaniment, the song and accompaniment of a song share the same ID. |
---|---|
type |
the song resource type. |
Declared In
ZegoExpressDefines.h
– queryCache:type:vendorID:
Deprecated since 3.9.0, please use the method with the same name with [config] parameter instead. (Deprecated: Deprecated since 3.9.0, please use the method with the same name with [config] parameter instead.)
- (BOOL)queryCache:(NSString *)songID type:(ZegoCopyrightedMusicType)type vendorID:(ZegoCopyrightedMusicVendorID)vendorID
Parameters
songID |
the ID of the song or accompaniment, the song and accompaniment of a song share the same ID. |
---|---|
type |
the song resource type. |
vendorID |
Copyright music resource song copyright provider. |
Declared In
ZegoExpressDefines.h