{"action":"created","issue":{"url":"https://api.github.com/repos/craftyjs/Crafty/issues/1027","repository_url":"https://api.github.com/repos/craftyjs/Crafty","labels_url":"https://api.github.com/repos/craftyjs/Crafty/issues/1027/labels{/name}","comments_url":"https://api.github.com/repos/craftyjs/Crafty/issues/1027/comments","events_url":"https://api.github.com/repos/craftyjs/Crafty/issues/1027/events","html_url":"https://github.com/craftyjs/Crafty/issues/1027","id":150382101,"number":1027,"title":"Audio repeating when passed 'play once' argument","user":{"login":"anthwinter","id":4440999,"avatar_url":"https://avatars.githubusercontent.com/u/4440999?v=3","gravatar_id":"","url":"https://api.github.com/users/anthwinter","html_url":"https://github.com/anthwinter","followers_url":"https://api.github.com/users/anthwinter/followers","following_url":"https://api.github.com/users/anthwinter/following{/other_user}","gists_url":"https://api.github.com/users/anthwinter/gists{/gist_id}","starred_url":"https://api.github.com/users/anthwinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthwinter/subscriptions","organizations_url":"https://api.github.com/users/anthwinter/orgs","repos_url":"https://api.github.com/users/anthwinter/repos","events_url":"https://api.github.com/users/anthwinter/events{/privacy}","received_events_url":"https://api.github.com/users/anthwinter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-22T14:20:49Z","updated_at":"2016-04-26T23:04:15Z","closed_at":null,"body":"The line I am referring to is: https://github.com/craftyjs/Crafty/blob/develop/src/sound/sound.js#L237\r\n\r\nThe condition checks if \"repeat == -1\". However, if I have passed the play method a 'repeat' argument that is 1, the c.onEnd function seems to think 'repeat' is -1 when the \"ended\" event occurs.\r\n\r\nShould \"repeat == -1\" not be \"c.repeat == -1\" ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/craftyjs/Crafty/issues/comments/214914053","html_url":"https://github.com/craftyjs/Crafty/issues/1027#issuecomment-214914053","issue_url":"https://api.github.com/repos/craftyjs/Crafty/issues/1027","id":214914053,"user":{"login":"mucaho","id":3935691,"avatar_url":"https://avatars.githubusercontent.com/u/3935691?v=3","gravatar_id":"","url":"https://api.github.com/users/mucaho","html_url":"https://github.com/mucaho","followers_url":"https://api.github.com/users/mucaho/followers","following_url":"https://api.github.com/users/mucaho/following{/other_user}","gists_url":"https://api.github.com/users/mucaho/gists{/gist_id}","starred_url":"https://api.github.com/users/mucaho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mucaho/subscriptions","organizations_url":"https://api.github.com/users/mucaho/orgs","repos_url":"https://api.github.com/users/mucaho/repos","events_url":"https://api.github.com/users/mucaho/events{/privacy}","received_events_url":"https://api.github.com/users/mucaho/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T23:04:15Z","updated_at":"2016-04-26T23:04:15Z","body":"Alrighty, see also a4f5bb9b3b117f1f8f4df39273c852f6c98825a4 for reference.\r\nIf this small change fixes the issue, let's go ahead and add it.\r\nAdditionally, if applicable, we should add a testcase to `tests/audio.js` for that."}}