getInternalSongCode
Creates an internal identifier for a music resource's chorus segment.
public abstract long getInternalSongCode(long songCode, String jsonOption);
Before playing the chorus segment of a music resource, you need to call this method to create an internal identifier for the chorus segment using the songCode and jsonOption parameters. This identifier serves as the unique reference for the resource. When calling related methods to open, preload, or remove the resource, pass this identifier as the songCode parameter.
Parameters
- songCode
- The identifier of the music resource. You can obtain it by calling
getMusicCollectionByMusicChartIdorsearchMusic, and retrieve thesongCodefrom the onMusicCollectionResult callback triggered by these methods. - jsonOption
-
Note:Extended JSON field, default is
sceneTypeaffects the billing method. Different channel scenes have different billing standards. See the billing documentation for details. To switch channel scenes, you must call this method again with a newsceneTypevalue.null. Currently supports the following fields:- sceneType: Scene type. 1: Live scene, online karaoke room and background music playback; 2: Live scene, background music playback; 3: (default) Voice chat scene, online karaoke room; 4: Voice chat scene, background music playback; 5: VR scene, online karaoke room and background music playback. Example:
{"sceneType":1}. - highPart: Index of the chorus segment, obtained from the onMusicCollectionResult callback, starting from index 0. Example:
{"format": {"highpart": 0}}.
- sceneType: Scene type. 1: Live scene, online karaoke room and background music playback; 2: Live scene, background music playback; 3: (default) Voice chat scene, online karaoke room; 4: Voice chat scene, background music playback; 5: VR scene, online karaoke room and background music playback. Example:
Return Values
- If the method call succeeds, returns the created internal identifier of the music resource.
- < 0: Failure.