Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gion/movie-maker
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Sticea committed Feb 28, 2013
2 parents bb925a4 + ab92991 commit 64c5e50
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions app/scripts/services/ngAudio5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

movieMakerApp.factory('AudioService', ['config', function (config) {

return new Audio5js(angular.extend({
swf_path:'../../swf/audio5js.swf',
throw_errors:true,
format_time:true,
ready:function () {

}
}, config.audio5js));
}]);
4 changes: 2 additions & 2 deletions app/scripts/services/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,15 @@ var $ = angular.element;
this.audio = util.createAudioElement(this.data);
},
onStart : function(){
this.audio.seek(0);
this.audio.currentTime = 0;
this.onUpdate();
},
onUpdate : function(){
if(this.tween.timeline.paused())
{
this.audio.pause();
}
else if(!this.audio.playing)
else if(this.audio.paused)
{
this.audio.currentTime = this.tween.time();
this.audio.play();
Expand Down

0 comments on commit 64c5e50

Please sign in to comment.