Skip to content

Commit

Permalink
#16 Add method get state (#23)
Browse files Browse the repository at this point in the history
* Add method *StupidPlayer.prototype.getState*

* Add work in changelog

* Add editorconfig

* Add closure-linter.flags
  • Loading branch information
kicumkicum authored Jun 18, 2016
1 parent 7dc53f8 commit 47ad235
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .closure-linter.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--strict
--jsdoc
--disable=5,222
--max_line_length=120
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,md}]
charset = utf-8

# Indentation override for all JS under lib directory
[src/**.js]
indent_style = tab

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml,manifest.json}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

## Feature
* Rename event **StupidPlayer.prototype.EVENT_START** to **StupidPlayer.prototype.EVENT_PLAY**
* Add method **StupidPlayer.prototype.getState**
8 changes: 8 additions & 0 deletions lib/stupid-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ StupidPlayer.prototype.getVolume = function() {
};


/**
* @return {StupidPlayer.State}
*/
StupidPlayer.prototype.getState = function() {
return this._state;
};


/**
* @param {string} url
* @return {Promise.<Format>}
Expand Down

0 comments on commit 47ad235

Please sign in to comment.