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: Use custom svgs for buttons #24

Closed
Robstaa opened this issue Feb 20, 2020 · 5 comments
Closed

Feature Request: Use custom svgs for buttons #24

Robstaa opened this issue Feb 20, 2020 · 5 comments

Comments

@Robstaa
Copy link

Robstaa commented Feb 20, 2020

What do you think about the idea of making it possible to use custom images as buttons?
I was for example thinking about using a 10-sec-fast-forward button (used by Netflix on iOS for example).
image

Any tips on how to implement that? Thank you so much again for this great product!

@lhz516
Copy link
Owner

lhz516 commented Feb 21, 2020

Currently the player uses inline svg for icons, so it's unlikely to use css to overwrite. But this is definitely a reasonable feature request. I'll add it to the roadmap.

@lhz516
Copy link
Owner

lhz516 commented Feb 21, 2020

I'm proposing to add a new prop called customIcons and defaults to {}. Users can pass in custom icon elements to overwrite the default ones. For example:

<Player customIcons={{
    rewind: <i className="xxx" />,
    forward: <img src="xxx" />,
    play: <SomeSVGIcon />
  }}
/>

@Robstaa
Copy link
Author

Robstaa commented Feb 21, 2020

I love it! Would be really appreciated!!

@lhz516
Copy link
Owner

lhz516 commented Feb 27, 2020

Released 2.4.0 https://github.com/lhz516/react-h5-audio-player/releases/tag/v2.4.0

@lhz516 lhz516 closed this as completed Feb 27, 2020
@Robstaa
Copy link
Author

Robstaa commented Feb 27, 2020

You are aweome!

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

No branches or pull requests

2 participants