diff --git a/src/MediaPlayer/Control.tsx b/src/MediaPlayer/Control.tsx index 2a675fbb..4004428f 100644 --- a/src/MediaPlayer/Control.tsx +++ b/src/MediaPlayer/Control.tsx @@ -104,6 +104,7 @@ export default class Control extends React.Component onChangePlaybackRate, onChangeVolume, onChangeSeek, + className, ...attributes } = this.props; const { showPlaybackChoose, showVolumeSlider } = this.state; @@ -112,8 +113,12 @@ export default class Control extends React.Component played = played || 0; duration = duration || 0; const playedValue = played * duration; - const styles = getStyles(this); const isDefaultMode = displayMode === "default"; + const inlineStyles = getStyles(this); + const styles = theme.prepareStyles({ + className: "media-player-control", + styles: inlineStyles + }); const playButton = {playing ? "Pause" : "Play"}; const playSlider = ( @@ -178,7 +183,7 @@ export default class Control extends React.Component horizontalPosition="left" > return isDefaultMode ? (
-
+
{playSlider} {this.second2HHMMSS(playedValue)} {this.second2HHMMSS(duration)}
-
+
{volumeButton} {subtitleButton} @@ -278,7 +284,7 @@ export default class Control extends React.Component
) : ( -
+
{playButton} {playSlider} {volumeButton} diff --git a/src/MediaPlayer/index.tsx b/src/MediaPlayer/index.tsx index 7cf6c59f..41e7fec3 100644 --- a/src/MediaPlayer/index.tsx +++ b/src/MediaPlayer/index.tsx @@ -117,6 +117,7 @@ export interface DataProps { */ onProgress?: React.ReactEventHandler; + className?: string; style?: React.CSSProperties; onTouchStart?: React.ReactEventHandler; onMouseEnter?: React.ReactEventHandler; @@ -348,10 +349,9 @@ export class MediaPlayer extends React.Component