Skip to content

Commit

Permalink
Disable autoplay queue by default, closes #100.
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Aug 27, 2018
1 parent 527820e commit 5df1ff9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ import Dailymotion from 'react-dailymotion';
| showEndScreen | bool | | Whether to enable the end screen or not. |
| mute | bool | | Whether to mute the video or not. |
| origin | string | | The domain of the page hosting the Dailymotion player. You might want to specify origin for extra security. |
| quality | enum:<br>&nbsp;'240'<br>&nbsp;'380'<br>&nbsp;'480'<br>&nbsp;'720'<br>&nbsp;'1080'<br>&nbsp;'1440'<br>&nbsp;'2160'<br> | | Specifies the _suggested_ playback quality for the video. |
| quality | enum:<br>&nbsp;'auto'<br>&nbsp;'240'<br>&nbsp;'380'<br>&nbsp;'480'<br>&nbsp;'720'<br>&nbsp;'1080'<br>&nbsp;'1440'<br>&nbsp;'2160'<br> | 'auto' | Specifies the _suggested_ playback quality for the video. |
| showQueue | bool | false | Whether to show the Up Next queue. |
| autoplayQueue | bool | false | Whether to play automatically the next item in the queue. |
| sharing | bool | | Whether to display the sharing button or not. |
| start | number | | Specifies the time (in seconds) from which the video should start playing. |
| subtitles | string | | Specifies the selected subtitles language. |
Expand Down
12 changes: 12 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Dailymotion extends React.Component {
mute: this.props.mute,
origin: this.props.origin,
quality: this.props.quality,
'queue-autoplay-neext': this.props.autoplayQueue,
'queue-enable': this.props.showQueue,
'sharing-enable': this.props.sharing,
start: this.props.start,
'subtitles-default': this.props.subtitles,
Expand Down Expand Up @@ -229,6 +231,14 @@ Dailymotion.propTypes = {
* Specifies the _suggested_ playback quality for the video.
*/
quality: PropTypes.oneOf(['auto', '240', '380', '480', '720', '1080', '1440', '2160']),
/**
* Whether to show the Up Next queue.
*/
showQueue: PropTypes.bool,
/**
* Whether to play automatically the next item in the queue.
*/
autoplayQueue: PropTypes.bool,
/**
* Whether to display the sharing button or not.
*/
Expand Down Expand Up @@ -400,6 +410,8 @@ Dailymotion.propTypes = {
Dailymotion.defaultProps = {
uiTheme: 'dark',
quality: 'auto',
showQueue: false,
autoplayQueue: false,
};

export default Dailymotion;

0 comments on commit 5df1ff9

Please sign in to comment.