Preparing search index...

    Handle for a music asset from the Asset Library.

        // MusicAsset represents a single licensed music track returned by MusicListService.
    // It is read from a MusicListResponse — never constructed directly.
    const provider = this.pluginSystem.findInterface(
    IAssetLibraryProvider.interfaceId
    ) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;

    const envSetting = new EnvironmentSetting();
    envSetting.environment = Environment.Production;
    envSetting.space = Space.Public;

    const filter = new AssetFilter();
    filter.searchText = 'chill';

    const response = await provider.musicService.fetchAsync(
    new AssetListRequest(envSetting, filter)
    );

    if (response.ok && response.data) {
    for (const track of response.data.musicAssets.slice(0, 3)) {
    console.log(track.assetName, '—', track.artistName,
    '(explicit:', track.isExplicit + ')');
    console.log(' id:', track.assetId, 'platforms:', track.platforms.length);
    }
    }
    Index

    Constructors

    Properties

    artistName: string

    Name of the artist who created the music track.

    assetId: string

    Unique identifier for this asset in the Asset Library.

    assetName: string

    Display name of the music asset.

    assetType: AssetType

    Type category of the asset, as an AssetType enum value.

    complexity: number

    Complexity rating or level associated with this asset.

    creator?: Creator

    Creator or rights holder of the asset.

    description: string

    Short description of the music asset.

    documentationUrl: string

    URL pointing to documentation or more information about this asset.

    fullDescription: string

    Extended description of the music asset with additional detail.

    isExplicit: boolean

    Indicates whether the track contains explicit content.

    maxLsVersion: Editor.Version

    Maximum Lens Studio version this asset is compatible with.

    platforms: Platform[]

    List of platforms on which this asset is available.

    previews: Resource[]

    Preview resources available for this music asset.

    resources: Resource[]

    Downloadable or importable resources associated with this asset.

    subcategories: Subcategory[]

    Subcategory tags used to classify this asset within the library.