add activity log feature

This commit is contained in:
Luke Pulverenti 2014-08-10 18:13:17 -04:00
parent 4ca20d409b
commit 69682bd717
13 changed files with 367 additions and 119 deletions

View file

@ -981,6 +981,16 @@
return true;
};
// Replace audio version
self.cleanup = function (playerElement) {
if (playerElement.tagName.toLowerCase() == 'video') {
currentTimeElement.html('--:--');
unbindEventsForPlayback();
}
};
self.playVideo = function (item, mediaSource, startPosition) {
var mediaStreams = mediaSource.MediaStreams || [];
@ -1197,6 +1207,10 @@
}).one("playing.mediaplayerevent", function () {
// For some reason this is firing at the start, so don't bind until playback has begun
$(this).on("ended.playbackstopped", self.onPlaybackStopped).one('ended.playnext', self.playNextAfterEnded);
self.onPlaybackStart(this, item, mediaSource);
}).on("pause.mediaplayerevent", function (e) {
@ -1265,15 +1279,7 @@
self.toggleFullscreen();
}).on("ended.playbackstopped", function () {
currentTimeElement.html('--:--');
self.onPlaybackStopped.call(this);
unbindEventsForPlayback();
}).one('ended.playnext', self.playNextAfterEnded);
});
bindEventsForPlayback();