Skip to content

Commit

Permalink
Fix pause/play; tag 0.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bvibber committed Aug 3, 2015
1 parent 8ca6a50 commit 0d8c3c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION:=0.9.4
VERSION:=0.9.5
BUILDDATE:=$(shell date -u "+%Y%m%d%H%M%S")
HASH:=$(shell git rev-parse --short HEAD)
FULLVER:=$(VERSION)-$(BUILDDATE)-$(HASH)
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Based around libogg, libvorbis, libtheora, libopus, libvpx, and libnestegg compi

## Updates

* 0.9.5
* fix pause/play regression
* 0.9.4
* fix regressions
* 0.9.3
Expand Down
12 changes: 7 additions & 5 deletions src/OGVPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ OGVPlayer = window.OGVPlayer = function(options) {
if (offset !== undefined) {
initialPlaybackOffset = offset;
}
log('continuing at ' + initialPlaybackPosition + ', ' + initialPlaybackOffset);
}

function stopPlayback() {
if (audioFeeder) {
audioFeeder.stop();
}
initialPlaybackOffset = getPlaybackTime();
log('pausing at ' + initialPlaybackOffset);
}

/**
Expand Down Expand Up @@ -1109,14 +1111,14 @@ OGVPlayer = window.OGVPlayer = function(options) {
if (paused) {
startedPlaybackInDocument = document.body.contains(self);
paused = false;
actionQueue.push(function() {
startPlayback();
fireEvent('play');
pingProcessing(0);
});
if (continueVideo) {
continueVideo();
} else {
actionQueue.push(function() {
startPlayback();
fireEvent('play');
pingProcessing(0);
});
continueVideo = function() {
if (isProcessing()) {
// waiting on the codec already
Expand Down

0 comments on commit 0d8c3c3

Please sign in to comment.