{"action":"created","issue":{"url":"https://api.github.com/repos/Temasys/SkylinkJS/issues/264","repository_url":"https://api.github.com/repos/Temasys/SkylinkJS","labels_url":"https://api.github.com/repos/Temasys/SkylinkJS/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/Temasys/SkylinkJS/issues/264/comments","events_url":"https://api.github.com/repos/Temasys/SkylinkJS/issues/264/events","html_url":"https://github.com/Temasys/SkylinkJS/issues/264","id":182032566,"number":264,"title":"0.6.15: extra streamEnded when doing sendStream on a running stream","user":{"login":"JanNorden","id":5070043,"avatar_url":"https://avatars.githubusercontent.com/u/5070043?v=3","gravatar_id":"","url":"https://api.github.com/users/JanNorden","html_url":"https://github.com/JanNorden","followers_url":"https://api.github.com/users/JanNorden/followers","following_url":"https://api.github.com/users/JanNorden/following{/other_user}","gists_url":"https://api.github.com/users/JanNorden/gists{/gist_id}","starred_url":"https://api.github.com/users/JanNorden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanNorden/subscriptions","organizations_url":"https://api.github.com/users/JanNorden/orgs","repos_url":"https://api.github.com/users/JanNorden/repos","events_url":"https://api.github.com/users/JanNorden/events{/privacy}","received_events_url":"https://api.github.com/users/JanNorden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-10-10T14:42:20Z","updated_at":"2016-10-10T14:54:26Z","closed_at":null,"body":"If you do a sendStream() on a running stream you will get the event sequence:\r\n\r\nstreamEnded\r\nincomingStream\r\nstreamEnded\r\n\r\nThe following example illustrates the problem (press the sendStream button twice, the first time the webcam will be shown, the second time it won't, the events are shown in the console log).\r\n\r\nChanging the script tag in index.html to 0.6.14 shows that this was not the case in 0.6.14\r\n\r\nBTW, it would be nice if you have a free key that would work for the jsfiddle domain, then examples could be posted there.\r\n"},"comment":{"url":"https://api.github.com/repos/Temasys/SkylinkJS/issues/comments/252645726","html_url":"https://github.com/Temasys/SkylinkJS/issues/264#issuecomment-252645726","issue_url":"https://api.github.com/repos/Temasys/SkylinkJS/issues/264","id":252645726,"user":{"login":"letchoo","id":4675614,"avatar_url":"https://avatars.githubusercontent.com/u/4675614?v=3","gravatar_id":"","url":"https://api.github.com/users/letchoo","html_url":"https://github.com/letchoo","followers_url":"https://api.github.com/users/letchoo/followers","following_url":"https://api.github.com/users/letchoo/following{/other_user}","gists_url":"https://api.github.com/users/letchoo/gists{/gist_id}","starred_url":"https://api.github.com/users/letchoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letchoo/subscriptions","organizations_url":"https://api.github.com/users/letchoo/orgs","repos_url":"https://api.github.com/users/letchoo/repos","events_url":"https://api.github.com/users/letchoo/events{/privacy}","received_events_url":"https://api.github.com/users/letchoo/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T14:54:26Z","updated_at":"2016-10-10T14:54:26Z","body":"Could you do the following to your code?\r\n\r\n```\r\nvar skylink = new Skylink();\r\n\r\n// Set log level\r\nskylink.setLogLevel(skylink.LOG_LEVEL.DEBUG);\r\n\r\n// Check if \"mediaAccessSuccess\" is triggered\r\nskylink.on('mediaAccessSuccess', function (stream) {\r\n  console.log(\"Stream retrieved\", stream.id);\r\n});\r\n\r\n// Check if \"mediaAccessStopped\" is triggered\r\nskylink.on('mediaAccessStopped', function (stream) {\r\n  console.log(\"Stream stopped\", stream.id);\r\n});\r\n\r\nskylink.on('incomingStream', function(_peerId, stream) {\r\nconsole.log(\"Stream sent\", stream.id);\r\nvar vid = document.getElementById('myvideo');\r\nattachMediaStream(vid, stream);\r\nvid.style.display = 'block';\r\nconsole.log('incomingStream');\r\n});\r\n\r\nskylink.on('streamEnded', function(_peerId, _peerInfo, _isSelf, _isScreensharing, streamId) {\r\nconsole.log(\"Stream that has ended\", streamId);\r\nconsole.log('streamEnded');\r\nvar vid = document.getElementById('myvideo');\r\nvid.style.display = 'none';\r\n});\r\n\r\nskylink.init({\r\napiKey: '3540d10d-1355-4bc8-9152-665c661f2879'\r\n}, () => { skylink.joinRoom(\r\n'room1', {\r\naudio: false,\r\nvideo: false\r\n});});\r\n\r\nfunction sendStream() {\r\nskylink.sendStream({\r\naudio: {mute: true},\r\nvideo: {resolution: {height: 240, width: 320 }}\r\n}, () => {})\r\n}\r\n```"}}
{"actor":{"display_login":"letchoo"}}