Skip to content

Commit

Permalink
Added docs and changelog line for #1320
Browse files Browse the repository at this point in the history
  • Loading branch information
heff committed Jul 29, 2014
1 parent 1166817 commit f69881c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CHANGELOG
* Added files to be ignored in the bower.json ([view](https://github.com/videojs/video.js/pull/1337))
* Fixed an error that could happen if Flash was diposed before the ready callback was fired ([view](https://github.com/videojs/video.js/pull/1340))
* The up and down arrows can now be used to control sliders in addition to left and right ([view](https://github.com/videojs/video.js/pull/1345))
* Added a player.currentType() function to get the MIME type of the current source ([view](https://github.com/videojs/video.js/pull/1320))

--------------------

Expand Down
6 changes: 6 additions & 0 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,12 @@ vjs.Player.prototype.currentSrc = function(){
return this.techGet('currentSrc') || this.cache_.src || '';
};

/**
* Get the current source type e.g. video/mp4
* This can allow you rebuild the current source object so that you could load the same
* source and tech later
* @return {String} The source MIME type
*/
vjs.Player.prototype.currentType = function(){
return this.currentType_ || '';
};
Expand Down

0 comments on commit f69881c

Please # to comment.