{"action":"created","issue":{"url":"https://api.github.com/repos/feross/webtorrent/issues/376","labels_url":"https://api.github.com/repos/feross/webtorrent/issues/376/labels{/name}","comments_url":"https://api.github.com/repos/feross/webtorrent/issues/376/comments","events_url":"https://api.github.com/repos/feross/webtorrent/issues/376/events","html_url":"https://github.com/feross/webtorrent/issues/376","id":95358397,"number":376,"title":"Error trying to get video streaming on the browser","user":{"login":"marianobrc","id":9864478,"avatar_url":"https://avatars.githubusercontent.com/u/9864478?v=3","gravatar_id":"","url":"https://api.github.com/users/marianobrc","html_url":"https://github.com/marianobrc","followers_url":"https://api.github.com/users/marianobrc/followers","following_url":"https://api.github.com/users/marianobrc/following{/other_user}","gists_url":"https://api.github.com/users/marianobrc/gists{/gist_id}","starred_url":"https://api.github.com/users/marianobrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marianobrc/subscriptions","organizations_url":"https://api.github.com/users/marianobrc/orgs","repos_url":"https://api.github.com/users/marianobrc/repos","events_url":"https://api.github.com/users/marianobrc/events{/privacy}","received_events_url":"https://api.github.com/users/marianobrc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-16T06:02:31Z","updated_at":"2015-07-26T21:46:23Z","closed_at":null,"body":"Hi, i'm trying to make streaming to a HTML5 video tag. Here is my full code:\r\n\r\n```\r\n<!DOCTYPE html>\r\n<html>\r\n<head lang=\"en\">\r\n    <meta charset=\"UTF-8\">\r\n    <title>Web Torrent Player</title>\r\n    <script src=\"https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js\"></script>\r\n    \r\n</head>\r\n<body style=\"background-color: black\">\r\n\r\n    <script>\r\n        var showPlayer = function (){\r\n\r\n            console.log('Creating WebTorrent Client..');\r\n            var client = new WebTorrent();\r\n            var magnetUri = 'magnet:?xt=urn:btih:4cb67059ed6bd08362da625b3ae77f6f4a075705&dn=bl001-introduction.webm&tr=http%3A%2F%2Ft.bitlove.org%2Fannounce&ws=http%3A%2F%2Fspaceboyz.net%2F%7Eastro%2Fbitlove-show%2Fbl001-introduction.webm';\r\n\r\n            if(!client){\r\n                console.log('ERROR creating WebTorrent Client!');\r\n                return;\r\n            }\r\n\r\n            console.log('Adding torrent url..');\r\n            client.add(magnetUri, function (torrent) {\r\n                // Got torrent metadata!\r\n                console.log('Torrent info hash:', torrent.infoHash);\r\n\r\n                // Let's say the first file is a webm (vp8) or mp4 (h264) video...\r\n                var file = torrent.files[0];\r\n\r\n                // Create a video element\r\n                var video = document.createElement('video');\r\n                video.controls = true;\r\n                document.body.appendChild(video);\r\n\r\n                // Stream the video into the video tag\r\n                file.createReadStream().pipe(video);\r\n            });\r\n        }\r\n\r\n        // loads the player\r\n        showPlayer();\r\n\r\n    </script>\r\n</body>\r\n</html>\r\n```\r\n\r\nI'm getting different errors on the client.add(..) call, on firefox and chrome:\r\n\r\nOn firefox  38.0 on Ubuntu, i get this on the console:\r\n\r\n\"TypeError: a.parsedTorrent.pieces is undefined webtorrent.min.js:2:930\"\r\n\r\nOn chrome 43.0.2357.125 on Ubuntu, i get this other error on the console:\r\n\r\n\"webtorrent.min.js:2 Uncaught TypeError: Cannot read property 'length' of undefined\"\r\n\r\nAs the  client.add(..) call fails, the video tag can't even load.\r\n"},"comment":{"url":"https://api.github.com/repos/feross/webtorrent/issues/comments/125043313","html_url":"https://github.com/feross/webtorrent/issues/376#issuecomment-125043313","issue_url":"https://api.github.com/repos/feross/webtorrent/issues/376","id":125043313,"user":{"login":"deamme","id":9392750,"avatar_url":"https://avatars.githubusercontent.com/u/9392750?v=3","gravatar_id":"","url":"https://api.github.com/users/deamme","html_url":"https://github.com/deamme","followers_url":"https://api.github.com/users/deamme/followers","following_url":"https://api.github.com/users/deamme/following{/other_user}","gists_url":"https://api.github.com/users/deamme/gists{/gist_id}","starred_url":"https://api.github.com/users/deamme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deamme/subscriptions","organizations_url":"https://api.github.com/users/deamme/orgs","repos_url":"https://api.github.com/users/deamme/repos","events_url":"https://api.github.com/users/deamme/events{/privacy}","received_events_url":"https://api.github.com/users/deamme/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T21:46:23Z","updated_at":"2015-07-26T21:46:23Z","body":"@feross Thank you!"}}