{"action":"created","issue":{"url":"https://api.github.com/repos/react-native-kit/react-native-track-player/issues/295","repository_url":"https://api.github.com/repos/react-native-kit/react-native-track-player","labels_url":"https://api.github.com/repos/react-native-kit/react-native-track-player/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/react-native-kit/react-native-track-player/issues/295/comments","events_url":"https://api.github.com/repos/react-native-kit/react-native-track-player/issues/295/events","html_url":"https://github.com/react-native-kit/react-native-track-player/pull/295","id":367939063,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMjMyNDA1","number":295,"title":"Handle Capabilities correctly on iOS","user":{"login":"CapitanRedBeard","id":5445860,"node_id":"MDQ6VXNlcjU0NDU4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/5445860?v=4","gravatar_id":"","url":"https://api.github.com/users/CapitanRedBeard","html_url":"https://github.com/CapitanRedBeard","followers_url":"https://api.github.com/users/CapitanRedBeard/followers","following_url":"https://api.github.com/users/CapitanRedBeard/following{/other_user}","gists_url":"https://api.github.com/users/CapitanRedBeard/gists{/gist_id}","starred_url":"https://api.github.com/users/CapitanRedBeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CapitanRedBeard/subscriptions","organizations_url":"https://api.github.com/users/CapitanRedBeard/orgs","repos_url":"https://api.github.com/users/CapitanRedBeard/repos","events_url":"https://api.github.com/users/CapitanRedBeard/events{/privacy}","received_events_url":"https://api.github.com/users/CapitanRedBeard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T20:21:29Z","updated_at":"2018-10-08T20:21:50Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/react-native-kit/react-native-track-player/pulls/295","html_url":"https://github.com/react-native-kit/react-native-track-player/pull/295","diff_url":"https://github.com/react-native-kit/react-native-track-player/pull/295.diff","patch_url":"https://github.com/react-native-kit/react-native-track-player/pull/295.patch"},"body":"A permanent fix for #77.\r\n\r\nBased on the solution @brenwell provided this correctly casts the `capabilities` option to enable the lock screen control center media controls. \r\n\r\nWorks in all the following scenario:\r\n\r\n#### No capabilities or Empty capabilities provided\r\n```\r\nTrackPlayer.updateOptions({\r\n});\r\n\r\n// OR\r\n\r\nTrackPlayer.updateOptions({\r\n  capabilities: []\r\n});\r\n```\r\n<img width=\"392\" alt=\"screen shot 2018-10-08 at 1 13 14 pm\" src=\"https://user-images.githubusercontent.com/5445860/46631350-fb81f400-cafb-11e8-8a6c-dccb40ea9e54.png\">\r\n\r\n#### Partial array of capabilities provided\r\n```\r\nTrackPlayer.updateOptions({\r\n  capabilities: [\r\n    TrackPlayer.CAPABILITY_SKIP_TO_NEXT,\r\n    TrackPlayer.CAPABILITY_SKIP_TO_PREVIOUS,\r\n    TrackPlayer.CAPABILITY_SEEK_TO,\r\n  ]\r\n});\r\n\r\n// OR\r\n\r\nTrackPlayer.updateOptions({\r\n  capabilities: [\r\n    TrackPlayer.CAPABILITY_PLAY,\r\n    TrackPlayer.CAPABILITY_PAUSE,\r\n  ]\r\n});\r\n\r\n// OR\r\n\r\nTrackPlayer.updateOptions({\r\n  capabilities: [\r\n    TrackPlayer.CAPABILITY_PLAY,\r\n    TrackPlayer.CAPABILITY_PAUSE,\r\n    TrackPlayer.CAPABILITY_SKIP_TO_NEXT,\r\n    TrackPlayer.CAPABILITY_SKIP_TO_PREVIOUS,\r\n    TrackPlayer.CAPABILITY_SEEK_TO,\r\n  ]\r\n});\r\n```\r\n![image](https://user-images.githubusercontent.com/5445860/46631599-bdd19b00-cafc-11e8-8f15-cfb951895030.png)\r\n\r\n![image](https://user-images.githubusercontent.com/5445860/46631607-c0cc8b80-cafc-11e8-8e44-c68113708253.png)\r\n\r\n![image](https://user-images.githubusercontent.com/5445860/46631575-b01c1580-cafc-11e8-8d01-d49d1e0d1b11.png)\r\n\r\n\r\nI'm not familiar with swift syntax so I'm not sure if this method of casting is correct or acceptable for this repo. However I do know the current way is not working as documented and this seems to provide a complete fix.\r\n\r\nAs always thanks for maintaining this repo.\r\nCheers!\r\n"},"comment":{"url":"https://api.github.com/repos/react-native-kit/react-native-track-player/issues/comments/427966668","html_url":"https://github.com/react-native-kit/react-native-track-player/pull/295#issuecomment-427966668","issue_url":"https://api.github.com/repos/react-native-kit/react-native-track-player/issues/295","id":427966668,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzk2NjY2OA==","user":{"login":"CapitanRedBeard","id":5445860,"node_id":"MDQ6VXNlcjU0NDU4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/5445860?v=4","gravatar_id":"","url":"https://api.github.com/users/CapitanRedBeard","html_url":"https://github.com/CapitanRedBeard","followers_url":"https://api.github.com/users/CapitanRedBeard/followers","following_url":"https://api.github.com/users/CapitanRedBeard/following{/other_user}","gists_url":"https://api.github.com/users/CapitanRedBeard/gists{/gist_id}","starred_url":"https://api.github.com/users/CapitanRedBeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CapitanRedBeard/subscriptions","organizations_url":"https://api.github.com/users/CapitanRedBeard/orgs","repos_url":"https://api.github.com/users/CapitanRedBeard/repos","events_url":"https://api.github.com/users/CapitanRedBeard/events{/privacy}","received_events_url":"https://api.github.com/users/CapitanRedBeard/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T20:21:50Z","updated_at":"2018-10-08T20:21:50Z","author_association":"NONE","body":"@dcvz \t"}}
{"actor":{"display_login":"CapitanRedBeard"}}