Skip to content

Commit

Permalink
Fixed play/pause bug. And bower resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Jan 29, 2014
1 parent 9b2aead commit 7bc18fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {},
"resolutions": {
"angular": "1.2.x"
"angular": ">1.2.6"
},
"private": true
}
6 changes: 3 additions & 3 deletions src/components/directives/ngAudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bawds.directive('ngAudio', ['$parse', function ($parse) {
function pause() {
element.pause();
}

function toStart() {
element.currentTime = 0;
}
Expand All @@ -72,7 +72,7 @@ bawds.directive('ngAudio', ['$parse', function ($parse) {
}
}

function updateState(event) {
function updateState(event, isPlaying) {
scope.$safeApply2(function () {
if (attributes.ngAudio) {
var target = expression(scope);
Expand All @@ -89,7 +89,7 @@ bawds.directive('ngAudio', ['$parse', function ($parse) {

updateObject(element ,target);

target.isPlaying = event && event.type === "playing";
target.isPlaying = !element.paused;

target.canPlay = element.readyState >= readyStates.haveFutureData;

Expand Down

0 comments on commit 7bc18fe

Please sign in to comment.