From 71f5df301c785a83a12f42e5d1ee01841ceaefb1 Mon Sep 17 00:00:00 2001 From: ToledoSDL Date: Fri, 30 Apr 2021 13:52:53 -0300 Subject: [PATCH] New createProgressBar options! --- src/Player.ts | 4 ++-- src/types/types.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Player.ts b/src/Player.ts index 66dd1c6..3fd32b8 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -881,8 +881,8 @@ export class Player extends EventEmitter { : 15; const index = Math.round((currentStreamTime / totalTime) * length); - const indicator = '🔘'; - const line = '▬'; + const indicator = typeof options?.indicator === 'string' ? options?.indicator.length > 0 ? options?.indicator : '🔘' : '🔘'; + const line = typeof options?.line === 'string' ? options?.line.length > 0 ? options?.line : '▬' : '▬'; if (index >= 1 && index <= length) { const bar = line.repeat(length - 1).split(''); diff --git a/src/types/types.ts b/src/types/types.ts index 81ee970..9e57e90 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -96,6 +96,8 @@ export interface PlayerProgressbarOptions { timecodes?: boolean; queue?: boolean; length?: number; + line?: string; + indicator?: string; } export interface LyricsData {