Merge pull request #379 from ToledoSDL/develop

createProgressBar options
This commit is contained in:
MegaPixel 2021-05-01 13:30:00 +05:45 committed by GitHub
commit de10f51c31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -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('');

View file

@ -96,6 +96,8 @@ export interface PlayerProgressbarOptions {
timecodes?: boolean;
queue?: boolean;
length?: number;
line?: string;
indicator?: string;
}
export interface LyricsData {