Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
naturaltts-ui-audio-player
Advanced tools
Audio player for naturaltts ui based on material ui design player. Requires Material UI 4 version.
Just add your audio link to src
and your ready to go.
import { createMuiTheme } from '@material-ui/core';
import { ThemeProvider } from '@material-ui/styles';
import AudioPlayer from 'naturaltts-ui-audio-player';
const muiTheme = createMuiTheme({});
<ThemeProvider theme={muiTheme}>
<AudioPlayer src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" />
</ThemeProvider>;
A bunch of props will help to customize component.
import { createMuiTheme } from '@material-ui/core';
import { ThemeProvider } from '@material-ui/styles';
import AudioPlayer from 'naturaltts-ui-audio-player';
const muiTheme = createMuiTheme({});
const src = [
'https://converter-audio-example-1.s3.eu-central-1.amazonaws.com/Russell%2C%2BMale%2B-%2BEnglish%2C%2BAustralian+(1)+(online-audio-converter.com).wav',
'https://converter-audio-examples.s3.eu-central-1.amazonaws.com/Russell%2C+Male+-+English%2C+Australian.mp3'
];
<ThemeProvider theme={muiTheme}>
<AudioPlayer
elevation={1}
width="100%"
variation="default"
spacing={3}
download={true}
autoplay={true}
order="standart"
preload="auto"
loop={true}
src={src}
/>
</ThemeProvider>;
src
Could accept audio link or array of audio links.
string
| array
image
Path to image
string
title
Title for the player
string
image
Description for the player
string
width
Corresponds to style property width
.
100%
string
variation
Component view variation.
default
default
, primary
, secondary
string
download
Display download button (icon) with dropdown of available audio tracks for download.
false
boolean
autoplay
Corresponds to HTML audio autoplay
attribute.
false
boolean
elevation
Shadow depth. Corresponds to elevation
prop of Material Ui
Paper
component.
1
number
rounded
Rounded corners of the container. Corresponds to square
prop of Material Ui
Paper
component.
false
boolean
spacing
Spacing for root Grid
container. Corresponds to spacing
prop of Material Ui
Grid
component.
3
(2
- mobile)number
order
Order of Slider
and controls buttons.
standart
standart
, reverse
string
loop
Display loop button.
false
boolean
preload
Corresponds to HTML audio attribute preload
.
auto
string
useStyles
The attribute for customizing component styles. Accept the result of
makeStyles
function.
func
import { createMuiTheme } from '@material-ui/core';
import { ThemeProvider } from '@material-ui/styles';
import AudioPlayer from 'naturaltts-ui-audio-player';
const muiTheme = createMuiTheme({});
const useStyles = makeStyles(theme => {
return {
root: {
[theme.breakpoints.down('sm')]: {
width: '100%'
}
},
loopIcon: {
color: '#3f51b5',
'&.selected': {
color: '#0921a9'
},
'&:hover': {
color: '#7986cb'
},
[theme.breakpoints.down('sm')]: {
display: 'none'
}
},
playIcon: {
color: '#f50057',
'&:hover': {
color: '#ff4081'
}
},
volumeIcon: {
color: 'rgba(0, 0, 0, 0.54)'
},
volumeSlider: {
color: 'black'
},
progressTime: {
color: 'rgba(0, 0, 0, 0.54)'
},
mainSlider: {
color: '#3f51b5',
'& .MuiSlider-rail': {
color: '#7986cb'
},
'& .MuiSlider-track': {
color: '#3f51b5'
},
'& .MuiSlider-thumb': {
color: '#303f9f'
}
}
};
});
<ThemeProvider theme={muiTheme}>
<AudioPlayer
width="500px"
useStyles={useStyles}
src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"
loop={true}
/>
</ThemeProvider>;
FAQs
Audio player for Naturaltts ui design
We found that naturaltts-ui-audio-player demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.