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;
|
: 15;
|
||||||
|
|
||||||
const index = Math.round((currentStreamTime / totalTime) * length);
|
const index = Math.round((currentStreamTime / totalTime) * length);
|
||||||
const indicator = '🔘';
|
const indicator = typeof options?.indicator === 'string' ? options?.indicator.length > 0 ? options?.indicator : '🔘' : '🔘';
|
||||||
const line = '▬';
|
const line = typeof options?.line === 'string' ? options?.line.length > 0 ? options?.line : '▬' : '▬';
|
||||||
|
|
||||||
if (index >= 1 && index <= length) {
|
if (index >= 1 && index <= length) {
|
||||||
const bar = line.repeat(length - 1).split('');
|
const bar = line.repeat(length - 1).split('');
|
||||||
|
|
|
@ -96,6 +96,8 @@ export interface PlayerProgressbarOptions {
|
||||||
timecodes?: boolean;
|
timecodes?: boolean;
|
||||||
queue?: boolean;
|
queue?: boolean;
|
||||||
length?: number;
|
length?: number;
|
||||||
|
line?: string;
|
||||||
|
indicator?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LyricsData {
|
export interface LyricsData {
|
||||||
|
|
Loading…
Reference in a new issue