YouTube.js
Guide
Discord
GitHub
Guide
Discord
GitHub

youtubei.js / Managers / PlaylistManager

Class: PlaylistManager

Constructors

new PlaylistManager()

new PlaylistManager(actions): PlaylistManager

Parameters

• actions: Actions

Returns

PlaylistManager

Defined in

src/core/managers/PlaylistManager.ts:11

Methods

addVideos()

addVideos(playlist_id, video_ids): Promise<object>

Adds videos to a given playlist.

Parameters

• playlist_id: string

The playlist ID.

• video_ids: string[]

An array of video IDs to add to the playlist.

Returns

Promise<object>

action_result

action_result: any

playlist_id

playlist_id: string

Defined in

src/core/managers/PlaylistManager.ts:74


create()

create(title, video_ids): Promise<object>

Creates a playlist.

Parameters

• title: string

The title of the playlist.

• video_ids: string[]

An array of video IDs to add to the playlist.

Returns

Promise<object>

data

data: any

playlist_id?

optional playlist_id: string

status_code

status_code: number

success

success: boolean

Defined in

src/core/managers/PlaylistManager.ts:20


delete()

delete(playlist_id): Promise<object>

Deletes a given playlist.

Parameters

• playlist_id: string

The playlist ID.

Returns

Promise<object>

data

data: any

playlist_id

playlist_id: string

status_code

status_code: number

success

success: boolean

Defined in

src/core/managers/PlaylistManager.ts:47


moveVideo()

moveVideo(playlist_id, moved_video_id, predecessor_video_id): Promise<object>

Moves a video to a new position within a given playlist.

Parameters

• playlist_id: string

The playlist ID.

• moved_video_id: string

The video ID to move.

• predecessor_video_id: string

The video ID to move the moved video before.

Returns

Promise<object>

action_result

action_result: any

playlist_id

playlist_id: string

Defined in

src/core/managers/PlaylistManager.ts:154


removeVideos()

removeVideos(playlist_id, video_ids, use_set_video_ids): Promise<object>

Removes videos from a given playlist.

Parameters

• playlist_id: string

The playlist ID.

• video_ids: string[]

An array of video IDs to remove from the playlist.

• use_set_video_ids: boolean = false

Option to remove videos using set video IDs.

Returns

Promise<object>

action_result

action_result: any

playlist_id

playlist_id: string

Defined in

src/core/managers/PlaylistManager.ts:104


setDescription()

setDescription(playlist_id, description): Promise<object>

Sets the description for the given playlist.

Parameters

• playlist_id: string

The playlist ID.

• description: string

The description to use for the playlist.

Returns

Promise<object>

action_result

action_result: any

playlist_id

playlist_id: string

Defined in

src/core/managers/PlaylistManager.ts:243


setName()

setName(playlist_id, name): Promise<object>

Sets the name for the given playlist.

Parameters

• playlist_id: string

The playlist ID.

• name: string

The name / title to use for the playlist.

Returns

Promise<object>

action_result

action_result: any

playlist_id

playlist_id: string

Defined in

src/core/managers/PlaylistManager.ts:216

Edit this page
Last Updated:: 3/25/25, 8:08 PM
Contributors: EdamAme-x