{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-barcodescanner/issues/161","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-barcodescanner/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-barcodescanner/issues/161/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-barcodescanner/issues/161/events","html_url":"https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/161","id":128526746,"number":161,"title":"on windows platform preview freezes","user":{"login":"VladyslavGoloshchapov","id":1468675,"avatar_url":"https://avatars.githubusercontent.com/u/1468675?v=3","gravatar_id":"","url":"https://api.github.com/users/VladyslavGoloshchapov","html_url":"https://github.com/VladyslavGoloshchapov","followers_url":"https://api.github.com/users/VladyslavGoloshchapov/followers","following_url":"https://api.github.com/users/VladyslavGoloshchapov/following{/other_user}","gists_url":"https://api.github.com/users/VladyslavGoloshchapov/gists{/gist_id}","starred_url":"https://api.github.com/users/VladyslavGoloshchapov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladyslavGoloshchapov/subscriptions","organizations_url":"https://api.github.com/users/VladyslavGoloshchapov/orgs","repos_url":"https://api.github.com/users/VladyslavGoloshchapov/repos","events_url":"https://api.github.com/users/VladyslavGoloshchapov/events{/privacy}","received_events_url":"https://api.github.com/users/VladyslavGoloshchapov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-25T12:31:08Z","updated_at":"2016-01-25T14:22:44Z","closed_at":null,"body":"Hello.\r\n\r\nI faced the following issue on windows8.1 -\r\n1) you open barcodescanner,\r\n2)  switch to another app\r\n3) switch back to your app with barcodescanner opened\r\n\r\nError: preview is frozen. Though you can click on cancel button\r\nExpected result: preview is not frozen.\r\n\r\nProblem is that I am not very familiar with WinJS, so I don`t know how to fix this issue by myself.\r\n\r\nSo please either fix it or tell me how to do that and I will create a pull request.\r\n\r\nThanks,\r\nVLad\r\n"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-barcodescanner/issues/comments/174521641","html_url":"https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/161#issuecomment-174521641","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-barcodescanner/issues/161","id":174521641,"user":{"login":"vladimir-kotikov","id":3857604,"avatar_url":"https://avatars.githubusercontent.com/u/3857604?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-kotikov","html_url":"https://github.com/vladimir-kotikov","followers_url":"https://api.github.com/users/vladimir-kotikov/followers","following_url":"https://api.github.com/users/vladimir-kotikov/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-kotikov/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-kotikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-kotikov/subscriptions","organizations_url":"https://api.github.com/users/vladimir-kotikov/orgs","repos_url":"https://api.github.com/users/vladimir-kotikov/repos","events_url":"https://api.github.com/users/vladimir-kotikov/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-kotikov/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T14:22:44Z","updated_at":"2016-01-25T14:22:44Z","body":"Probably this is related to application's lifetime events. For more details see [MSDN article](https://msdn.microsoft.com/en-us/library/windows/apps/mt243896.aspx), section \"Handle app lifetime and page navigation events\".\r\n\r\nIn terms of Cordova it appears that you'll need to subscribe to document's `pause` and `resume` events - shutdown scanner's preview on `pause` event and restore it on `resume`."}}