From f69881c276e70580e50effd6319ceae3293ea548 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Tue, 29 Jul 2014 10:42:10 -0700 Subject: [PATCH] Added docs and changelog line for #1320 --- CHANGELOG.md | 1 + src/js/player.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 197c5e8366..48975396a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) -------------------- diff --git a/src/js/player.js b/src/js/player.js index 49f7f66776..95af727951 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -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_ || ''; };