{"action":"created","issue":{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/751","repository_url":"https://api.github.com/repos/katspaugh/wavesurfer.js","labels_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/751/labels{/name}","comments_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/751/comments","events_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/751/events","html_url":"https://github.com/katspaugh/wavesurfer.js/issues/751","id":161237507,"number":751,"title":"window is undefined","user":{"login":"omerts","id":4996164,"avatar_url":"https://avatars.githubusercontent.com/u/4996164?v=3","gravatar_id":"","url":"https://api.github.com/users/omerts","html_url":"https://github.com/omerts","followers_url":"https://api.github.com/users/omerts/followers","following_url":"https://api.github.com/users/omerts/following{/other_user}","gists_url":"https://api.github.com/users/omerts/gists{/gist_id}","starred_url":"https://api.github.com/users/omerts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omerts/subscriptions","organizations_url":"https://api.github.com/users/omerts/orgs","repos_url":"https://api.github.com/users/omerts/repos","events_url":"https://api.github.com/users/omerts/events{/privacy}","received_events_url":"https://api.github.com/users/omerts/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-20T16:28:28Z","updated_at":"2016-06-20T17:14:24Z","closed_at":"2016-06-20T16:51:31Z","body":"First of all thanks for this great library. \r\n\r\nI am trying to use this project in server-side environment, but it fails with:\r\n```\r\nwindow is undefined\r\n```\r\n\r\nThe reason for this is because different references to window across the code, specifically `window.devicePixelRatio`, and there is no window object at the server-side. \r\n\r\nIf you are asking yourself, why do I need it in server side, it is because I am doing server-side rendering (React.js app)."},"comment":{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/comments/227207301","html_url":"https://github.com/katspaugh/wavesurfer.js/issues/751#issuecomment-227207301","issue_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/751","id":227207301,"user":{"login":"katspaugh","id":381895,"avatar_url":"https://avatars.githubusercontent.com/u/381895?v=3","gravatar_id":"","url":"https://api.github.com/users/katspaugh","html_url":"https://github.com/katspaugh","followers_url":"https://api.github.com/users/katspaugh/followers","following_url":"https://api.github.com/users/katspaugh/following{/other_user}","gists_url":"https://api.github.com/users/katspaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/katspaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katspaugh/subscriptions","organizations_url":"https://api.github.com/users/katspaugh/orgs","repos_url":"https://api.github.com/users/katspaugh/repos","events_url":"https://api.github.com/users/katspaugh/events{/privacy}","received_events_url":"https://api.github.com/users/katspaugh/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T17:14:24Z","updated_at":"2016-06-20T17:14:24Z","body":"> I am not trying to run it, but just to render it and pass it rendered to the browser.\r\n\r\nThen it's an easy fix. Set the default pixel ratio to 1 and in the init function conditionally assign to `window.devicePixelRatio` if no param was passed."}}
{"actor":{"display_login":"katspaugh"}}