{"action":"created","issue":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/2875","repository_url":"https://api.github.com/repos/photonstorm/phaser","labels_url":"https://api.github.com/repos/photonstorm/phaser/issues/2875/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser/issues/2875/comments","events_url":"https://api.github.com/repos/photonstorm/phaser/issues/2875/events","html_url":"https://github.com/photonstorm/phaser/issues/2875","id":191238668,"number":2875,"title":"Phaser.Sound#update isPlaying=true missing cause marker loop fail in firefox","user":{"login":"lucap86","id":15343100,"avatar_url":"https://avatars.githubusercontent.com/u/15343100?v=3","gravatar_id":"","url":"https://api.github.com/users/lucap86","html_url":"https://github.com/lucap86","followers_url":"https://api.github.com/users/lucap86/followers","following_url":"https://api.github.com/users/lucap86/following{/other_user}","gists_url":"https://api.github.com/users/lucap86/gists{/gist_id}","starred_url":"https://api.github.com/users/lucap86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucap86/subscriptions","organizations_url":"https://api.github.com/users/lucap86/orgs","repos_url":"https://api.github.com/users/lucap86/repos","events_url":"https://api.github.com/users/lucap86/events{/privacy}","received_events_url":"https://api.github.com/users/lucap86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-23T10:49:19Z","updated_at":"2016-11-25T09:21:27Z","closed_at":null,"body":"This cause marker loop fail in firefox\r\n(see  // <-------MISSING comment in the code)\r\n```  \r\n/**\r\n         * Called automatically by Phaser.SoundManager.\r\n         * @method Phaser.Sound#update\r\n         * @protected\r\n         */\r\n        update: function () {\r\n\r\n            if (!this.game.cache.checkSoundKey(this.key))\r\n            {\r\n                this.destroy();\r\n                return;\r\n            }\r\n\r\n            if (this.isDecoded && !this._onDecodedEventDispatched)\r\n            {\r\n                this.onDecoded.dispatch(this);\r\n                this._onDecodedEventDispatched = true;\r\n            }\r\n\r\n            if (this.pendingPlayback && this.game.cache.isSoundReady(this.key))\r\n            {\r\n                this.pendingPlayback = false;\r\n                this.play(this._tempMarker, this._tempPosition, this._tempVolume, this._tempLoop);\r\n            }\r\n\r\n            if (this.isPlaying)\r\n            {\r\n                this.currentTime = this.game.time.time - this.startTime;\r\n\r\n                if (this.currentTime >= this.durationMS)\r\n                {\r\n                    if (this.usingWebAudio)\r\n                    {\r\n                        if (this.loop)\r\n                        {\r\n                            //  won't work with markers, needs to reset the position\r\n                            this.onLoop.dispatch(this);\r\n\r\n                            //  Gets reset by the play function\r\n                            this.isPlaying = false;\r\n\r\n                            if (this.currentMarker === '')\r\n                            {\r\n                                this.currentTime = 0;\r\n                                this.startTime = this.game.time.time;\r\n                                this.isPlaying = true; // play not called again in this case\r\n                            }\r\n                            else\r\n                            {\r\n                                this.onMarkerComplete.dispatch(this.currentMarker, this);\r\n                                this.isPlaying = true; // <-------MISSING\r\n                                this.play(this.currentMarker, 0, this.volume, true, true);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            //  Stop if we're using an audio marker, otherwise we let onended handle it\r\n                            if (this.currentMarker !== '')\r\n                            {\r\n                                this.stop();\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        if (this.loop)\r\n                        {\r\n                            this.onLoop.dispatch(this);\r\n\r\n                            if (this.currentMarker === '')\r\n                            {\r\n                                this.currentTime = 0;\r\n                                this.startTime = this.game.time.time;\r\n                            }\r\n\r\n                            //  Gets reset by the play function\r\n                            this.isPlaying = false;\r\n\r\n                            this.play(this.currentMarker, 0, this.volume, true, true);\r\n                        }\r\n                        else\r\n                        {\r\n                            this.stop();\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n```"},"comment":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/comments/262913600","html_url":"https://github.com/photonstorm/phaser/issues/2875#issuecomment-262913600","issue_url":"https://api.github.com/repos/photonstorm/phaser/issues/2875","id":262913600,"user":{"login":"stoneman1","id":4244526,"avatar_url":"https://avatars.githubusercontent.com/u/4244526?v=3","gravatar_id":"","url":"https://api.github.com/users/stoneman1","html_url":"https://github.com/stoneman1","followers_url":"https://api.github.com/users/stoneman1/followers","following_url":"https://api.github.com/users/stoneman1/following{/other_user}","gists_url":"https://api.github.com/users/stoneman1/gists{/gist_id}","starred_url":"https://api.github.com/users/stoneman1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoneman1/subscriptions","organizations_url":"https://api.github.com/users/stoneman1/orgs","repos_url":"https://api.github.com/users/stoneman1/repos","events_url":"https://api.github.com/users/stoneman1/events{/privacy}","received_events_url":"https://api.github.com/users/stoneman1/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T09:21:27Z","updated_at":"2016-11-25T09:21:27Z","body":"Can you give a example code which is not working? All the examples work fine on my firefox?"}}
{"actor":{"display_login":"stoneman1"}}