Skip to content

Commit

Permalink
Support auto positioned; Support auto set aspectRatio;
Browse files Browse the repository at this point in the history
  • Loading branch information
cycjimmy committed Oct 14, 2019
1 parent 6106dde commit 17bb297
Show file tree
Hide file tree
Showing 19 changed files with 5,843 additions and 5,290 deletions.
5 changes: 1 addition & 4 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@
},
"plugins": [
"@babel/plugin-syntax-dynamic-import"
],
"ignore": [
"node_modules"
]
}
}
13 changes: 13 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[production staging]
last 4 versions
ie >= 10
ie_mob >= 10
ff >= 30
chrome >= 40
safari >= 8
opera >= 23
ios >= 8
android >= 4.4

[development]
last 2 versions
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
9 changes: 7 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# IDE
.idea
.editorconfig

# doc
.github

# test
test
Expand All @@ -11,7 +15,8 @@ yarn-error.log

# project
src
static
dist
temp
static
*.config.js
gulpfile.js

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ cache:

script:
- yarn --version
- npm run prepare
- npm run build
- jest
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ $ yarn add h5-video-player
```javascript
import H5VideoPlayer from 'h5-video-player';
# OR
let H5VideoPlayer = require('h5-video-player');
const H5VideoPlayer = require('h5-video-player');
```

```javascript
let videoPlayer = new H5VideoPlayer(source, [, options]);
const videoPlayer = new H5VideoPlayer(source, [, options]);
videoPlayer.load();
```

Expand All @@ -49,13 +49,12 @@ $ yarn add h5-video-player
* [Array]: E.g: `[{url: 'video.mp4', type:'mp4'},{},...]`
* options
* `context`: [Element|String] Context Wrapper Element. Default `'body'`.
* `positioned`: [Boolean] Whether the context element has been positioned. Default `false`.
* `control`: [Boolean] Whether the user can control. Default `false`.
* `autoPlay`: [Boolean] Whether to play immediately after loading. Default `false`.
* `autoClose`: [Boolean] Whether to close immediately when the video played off. Default `true`.
* `preload`: [Boolean] Whether to preload the video. Default `true`.
* `orientation`: [String] landscape / portrait. Default `'portrait'`.
* `aspectRatio`: [Number] Video aspect ratio. Default `9 / 16`.
* `aspectRatio`: [Number] Set video aspect ratio. Default `9 / 16`(when orientation is portrait) or `16 / 9`(when orientation is landscape).
* `disableRotation`: [Boolean] Whether to prohibit automatic rotation. Default `false`.
* `picMode`: [Boolean] picture mode (no playButton). Default `false`.
* `fixAndroidWechatContinue`: [Boolean] Whether compatible with Wechat(Android) play after Forced to pause. Default `false`.
Expand Down
Loading

0 comments on commit 17bb297

Please sign in to comment.