@imposium-hub/components 1.28.2 → 1.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ interface IVideoPlayerProps {
14
14
  hideDefaultControls? : boolean;
15
15
  allowManualScale? : boolean;
16
16
  customControls? : JSX.Element;
17
+ autoPlay? : boolean;
17
18
  }
18
19
 
19
20
  interface IVideoPlayerState {
@@ -108,12 +109,20 @@ class VideoPlayer extends React.PureComponent<IVideoPlayerProps, IVideoPlayerSta
108
109
 
109
110
  const {url, active, muted, customControls, hideDefaultControls} = this.props;
110
111
  const controls = (!customControls && !hideDefaultControls);
112
+ const autoPlay = (this.props.autoPlay) ? this.props.autoPlay : false;
111
113
 
112
114
  if (active !== false) {
113
115
  return (
114
116
  <div className = 'media-player'>
115
117
  <div className = 'inner-viewer' style = {this.getVideoStyle()}>
116
- <video controls = {controls} onLoadedMetadata = {(e) => this.metadataLoaded(e)} muted = {muted} src = {url} ref = {this.videoNode}/>
118
+ <video
119
+ controls = {controls}
120
+ onLoadedMetadata = {(e) => this.metadataLoaded(e)}
121
+ muted = {muted}
122
+ src = {url}
123
+ ref = {this.videoNode}
124
+ preload = 'auto'
125
+ autoPlay = {autoPlay}/>
117
126
  {this.renderCustomControls()}
118
127
  </div>
119
128
  </div>