Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Customizable player templates #59

Open
cgpro opened this issue May 4, 2022 · 2 comments
Open

[feature request] Customizable player templates #59

cgpro opened this issue May 4, 2022 · 2 comments
Assignees
Labels
feature request New feature or request

Comments

@cgpro
Copy link

cgpro commented May 4, 2022

It would be a very handy feature to make the player templates customizable.

The player is based on templates already:
https://github.com/jessuni/shikwasa/tree/main/src/templates
But it's referenced internally at the moment.

I could imagine the following:

const TemplateChapter = `... my fancy markup ...`
const TemplateIcon = `...`
const TemplatePlayer = `...`

// or with an import (a bit cleaner)
import { TemplateChapter, TemplateIcon, TemplatePlayer  } from './shikwasa-templates.js';

const player = new Shikwasa({
    container: () => document.querySelector('.shikwasa-player'),
    tplChapter: TemplateChapter,
    tplIcon: TemplateIcon,
    tplPlayer: TemplatePlayer,
    audio: {
        title: '...', 
        artist: '...',
        cover: '...',
        src: '...',
        },
});

Sometimes it is necessary to change the icons or change the structure of the layout fundamentally, which would be easy to do in this case.

@jessuni jessuni added the feature request New feature or request label May 6, 2022
@jessuni jessuni self-assigned this May 6, 2022
@travisvn
Copy link
Contributor

travisvn commented Mar 1, 2023

This would be awesome 👍

@rolandschuetz
Copy link

Implemented with #84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants