Added getCurrentTime API method (fixes #292)

This commit is contained in:
Sam Potts 2016-07-10 20:58:19 +10:00
parent 39dc651a9d
commit 3c9e9862d8
3 changed files with 8 additions and 2 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -535,6 +535,11 @@ Here's a list of the methods supported:
<td>&mdash;</td> <td>&mdash;</td>
<td>Reverses the effects of the <code>destroy()</code> method, restoring the UI and listeners.</td> <td>Reverses the effects of the <code>destroy()</code> method, restoring the UI and listeners.</td>
</tr> </tr>
<tr>
<td><code>getCurrentTime()</code></td>
<td>&mdash;</td>
<td>Will return a float with the current time in seconds.</td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -3264,7 +3264,8 @@
isFullscreen: function() { return plyr.isFullscreen || false; }, isFullscreen: function() { return plyr.isFullscreen || false; },
support: function(mimeType) { return _supportMime(plyr, mimeType); }, support: function(mimeType) { return _supportMime(plyr, mimeType); },
destroy: _destroy, destroy: _destroy,
restore: _init restore: _init,
getCurrentTime: function() { return plyr.media.currentTime; }
}; };
} }