Options
Player constructor options.
Description#
| Option | Description |
|---|---|
| container | The player mounts the container element. Like mount method parameter, if mount is not imported, this parameter will be used. When the parameter is a string, the corresponding element will be found automatically. |
| src | Video address, like video element src attribute. |
| video | Provide own video element. |
| videoProps | Properties of video element. |
| videoSources | Video source element array, see Getting Started |
| live | Whether is live mode |
| autoSeekTime | When the video is loaded successfully, jump to the point of time (this parameter will be set to 0 automatically). You can use this to allow memory to see the last time. |
| thumbnail | Please see Preview thumbnails |
| controls | Please see Control Bar |
| bpControls | Set the layout of different breakpoint, see Control Bar |
| settings | Please see Setting Menu |
| contextMenus | Please see Context menu |
| contextMenuToggle | toggle context menu (browser default menu & nplayer context menu). |
| plugins | List of plugins, see Plugins |
| i18n | Current player language, e.g. en,zh, etc |
| shortcut | Enable shortcuts |
| seekStep | One-time fast and forward step long and will be used in shortcuts |
| volumeStep | Increases and decreases the volume step by step and will be used in a shortcut |
| themeColor | Theme color, please see Custom Theme |
| posterBgColor | Poster background color, please see Custom Theme |
| progressBg | Progress bar background. See Custom Theme |
| progressDot | Points on progress bars, see Custom Theme |
| volumeProgressBg | Volume bars background, please view Custom Theme |
| volumeBarWidth | Volume width, see Custom Theme |
| loadingEl | Custom video loading element, see Custom Theme |
| openEdgeInIE | Whether to automatically open Edge in Win10 IE, see IE 11 compatibility |
| poster | Poster photo address, see Poster |
| posterEnable | Enable Poster |
| posterPlayEl | Custom poster playback button, see Custom Theme |
Default parameters#
caution
Note that the control bar parameters will vary according to other parameters.If isTouch is true, it will not include volume, if live parameter is true, it will not include progress control items.