payload: {"action":"created","issue":{"url":"https://api.github.com/repos/MillmanY/MMPlayerView/issues/82","repository_url":"https://api.github.com/repos/MillmanY/MMPlayerView","labels_url":"https://api.github.com/repos/MillmanY/MMPlayerView/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/MillmanY/MMPlayerView/issues/82/comments","events_url":"https://api.github.com/repos/MillmanY/MMPlayerView/issues/82/events","html_url":"https://github.com/MillmanY/MMPlayerView/issues/82","id":498097042,"node_id":"MDU6SXNzdWU0OTgwOTcwNDI=","number":82,"title":"App Crash 0n MMPlayerView Version 5.1.1 and iOS 13","user":{"login":"mohit196","id":22215577,"node_id":"MDQ6VXNlcjIyMjE1NTc3","avatar_url":"https://avatars3.githubusercontent.com/u/22215577?v=4","gravatar_id":"","url":"https://api.github.com/users/mohit196","html_url":"https://github.com/mohit196","followers_url":"https://api.github.com/users/mohit196/followers","following_url":"https://api.github.com/users/mohit196/following{/other_user}","gists_url":"https://api.github.com/users/mohit196/gists{/gist_id}","starred_url":"https://api.github.com/users/mohit196/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohit196/subscriptions","organizations_url":"https://api.github.com/users/mohit196/orgs","repos_url":"https://api.github.com/users/mohit196/repos","events_url":"https://api.github.com/users/mohit196/events{/privacy}","received_events_url":"https://api.github.com/users/mohit196/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2019-09-25T07:18:47Z","updated_at":"2019-10-07T03:27:10Z","closed_at":null,"author_association":"NONE","body":"Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <_NSKeyValueObservation 0x282f08450> for the key path \"status\" from <MMPlayerView.MMPlayerItem 0x2837a6400> because it is not registered as an observer.'\r\n\r\nAre you aware of it?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/MillmanY/MMPlayerView/issues/comments/538826922","html_url":"https://github.com/MillmanY/MMPlayerView/issues/82#issuecomment-538826922","issue_url":"https://api.github.com/repos/MillmanY/MMPlayerView/issues/82","id":538826922,"node_id":"MDEyOklzc3VlQ29tbWVudDUzODgyNjkyMg==","user":{"login":"MillmanY","id":15795598,"node_id":"MDQ6VXNlcjE1Nzk1NTk4","avatar_url":"https://avatars1.githubusercontent.com/u/15795598?v=4","gravatar_id":"","url":"https://api.github.com/users/MillmanY","html_url":"https://github.com/MillmanY","followers_url":"https://api.github.com/users/MillmanY/followers","following_url":"https://api.github.com/users/MillmanY/following{/other_user}","gists_url":"https://api.github.com/users/MillmanY/gists{/gist_id}","starred_url":"https://api.github.com/users/MillmanY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MillmanY/subscriptions","organizations_url":"https://api.github.com/users/MillmanY/orgs","repos_url":"https://api.github.com/users/MillmanY/repos","events_url":"https://api.github.com/users/MillmanY/events{/privacy}","received_events_url":"https://api.github.com/users/MillmanY/received_events","type":"User","site_admin":false},"created_at":"2019-10-07T03:27:10Z","updated_at":"2019-10-07T03:27:10Z","author_association":"OWNER","body":"Crash on this\r\n     \r\n     videoRectObservation = self.observe(\\.videoRect, options: [.new, .old]) { [weak self] (player, change) in\r\n            if change.newValue != change.oldValue {\r\n                self?.updateCoverConstraint()\r\n            }\r\n     }\r\n\r\nI fix to use origin kvo registered function\r\n\r\n        self.addObserver(self, forKeyPath: \"videoRect\", options: [.new, .old], context: nil)\r\n\r\n    override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {\r\n        \r\n        switch keyPath {\r\n        case \"videoRect\", \"frame\", \"bounds\":\r\n            let new = change?[.newKey] as? CGRect ?? .zero\r\n            let old = change?[.oldKey] as? CGRect ?? .zero\r\n            if new != old {\r\n                self.updateCoverConstraint()\r\n            }\r\n            \r\n        case \"muted\":\r\n            let new = change?[.newKey] as? Bool ?? false\r\n            let old = change?[.oldKey] as? Bool ?? false\r\n            if new != old {\r\n                self.coverView?.player?(isMuted: new)\r\n            }\r\n        case \"rate\":\r\n            let new = change?[.newKey] as? Float ?? 1.0\r\n            let status = self.currentPlayStatus\r\n            switch status {\r\n            case .playing, .pause, .ready:\r\n                self.currentPlayStatus = (new == 0.0) ? .pause : .playing\r\n            case .end:\r\n                let total = self.player?.currentItem?.duration.seconds ?? 0.0\r\n                let current = self.player?.currentItem?.currentTime().seconds ?? 0.0\r\n                if current < total {\r\n                    self.currentPlayStatus = (new == 0.0) ? .pause : .playing\r\n                }\r\n            default: break\r\n            }\r\n\r\n        default:\r\n            super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context)\r\n        }\r\n    }\r\n\r\n\r\nFix on pod 5.1.2"}}
other: {"actor":{"display_login":"MillmanY"}}