{"action":"created","issue":{"url":"https://api.github.com/repos/collab-project/videojs-record/issues/157","repository_url":"https://api.github.com/repos/collab-project/videojs-record","labels_url":"https://api.github.com/repos/collab-project/videojs-record/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/collab-project/videojs-record/issues/157/comments","events_url":"https://api.github.com/repos/collab-project/videojs-record/issues/157/events","html_url":"https://github.com/collab-project/videojs-record/issues/157","id":241231400,"node_id":"MDU6SXNzdWUyNDEyMzE0MDA=","number":157,"title":"Turning off the device between recordings","user":{"login":"alsar","id":1380676,"node_id":"MDQ6VXNlcjEzODA2NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1380676?v=4","gravatar_id":"","url":"https://api.github.com/users/alsar","html_url":"https://github.com/alsar","followers_url":"https://api.github.com/users/alsar/followers","following_url":"https://api.github.com/users/alsar/following{/other_user}","gists_url":"https://api.github.com/users/alsar/gists{/gist_id}","starred_url":"https://api.github.com/users/alsar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alsar/subscriptions","organizations_url":"https://api.github.com/users/alsar/orgs","repos_url":"https://api.github.com/users/alsar/repos","events_url":"https://api.github.com/users/alsar/events{/privacy}","received_events_url":"https://api.github.com/users/alsar/received_events","type":"User","site_admin":false},"labels":[{"id":155613002,"node_id":"MDU6TGFiZWwxNTU2MTMwMDI=","url":"https://api.github.com/repos/collab-project/videojs-record/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-07-07T11:03:45Z","updated_at":"2018-08-01T22:03:01Z","closed_at":null,"author_association":"COLLABORATOR","body":"I want to be able to turn off the camera when the user has pressed the stop button (for privacy reasons).\r\nI know, there is a `stopDevice` method and it works as advertised. It turns off the recording device. So I can call this method after the user clicks the stop button.\r\nBut the problem is that if I stop the device and the user clicks record again the recorder stops working. I get an error: ` DOMException [InvalidStateError: \"An attempt was made to use an object that is not, or is no longer, usable\"\r\ncode: 11\r\nnsresult: 0x8053000b`\r\n\r\nI understand that the MediaRecorder gets destroyed after the device is turned off. But is it possible to reinitialize the recorder somehow? \r\nI also tried manually calling `getDevice` but it results in all kinds of strange behaviors (not being able to stop the new recording, no play button...).\r\n\r\nSo is it possible turn the device off and on again somehow between recordings?\r\n"},"comment":{"url":"https://api.github.com/repos/collab-project/videojs-record/issues/comments/409739662","html_url":"https://github.com/collab-project/videojs-record/issues/157#issuecomment-409739662","issue_url":"https://api.github.com/repos/collab-project/videojs-record/issues/157","id":409739662,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTczOTY2Mg==","user":{"login":"thijstriemstra","id":305679,"node_id":"MDQ6VXNlcjMwNTY3OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/305679?v=4","gravatar_id":"","url":"https://api.github.com/users/thijstriemstra","html_url":"https://github.com/thijstriemstra","followers_url":"https://api.github.com/users/thijstriemstra/followers","following_url":"https://api.github.com/users/thijstriemstra/following{/other_user}","gists_url":"https://api.github.com/users/thijstriemstra/gists{/gist_id}","starred_url":"https://api.github.com/users/thijstriemstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thijstriemstra/subscriptions","organizations_url":"https://api.github.com/users/thijstriemstra/orgs","repos_url":"https://api.github.com/users/thijstriemstra/repos","events_url":"https://api.github.com/users/thijstriemstra/events{/privacy}","received_events_url":"https://api.github.com/users/thijstriemstra/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T22:03:01Z","updated_at":"2018-08-01T22:03:01Z","author_association":"MEMBER","body":"I'm thinking of adding a new option:\r\n\r\n`autoMuteDevice`: turn off the camera and the camera's light when video recording stops, and turns the camera and light on when you resume recording.\r\n\r\nIt basically toggles `stream.getAudioTracks()[0].enabled` and `stream.getVideoTracks()[0].enabled` after pressing record and stop.\r\n\r\nStill need to test though."}}
{"actor":{"display_login":"thijstriemstra"}}