Merge pull request #379 from ToledoSDL/develop
createProgressBar options
This commit is contained in:
commit
de10f51c31
2 changed files with 4 additions and 2 deletions
|
@ -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('');
|
||||
|
|
|
@ -96,6 +96,8 @@ export interface PlayerProgressbarOptions {
|
|||
timecodes?: boolean;
|
||||
queue?: boolean;
|
||||
length?: number;
|
||||
line?: string;
|
||||
indicator?: string;
|
||||
}
|
||||
|
||||
export interface LyricsData {
|
||||
|
|
Loading…
Reference in a new issue