Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn Off Devices via javascript? #12

Closed
v3ss0n opened this issue Sep 25, 2015 · 16 comments
Closed

Turn Off Devices via javascript? #12

v3ss0n opened this issue Sep 25, 2015 · 16 comments

Comments

@v3ss0n
Copy link

v3ss0n commented Sep 25, 2015

vjsplayer.recorder.stop() only stop recording , so need another function for turning off camera .
I don't want users to think that i am spying for NSA 😝

@thijstriemstra
Copy link
Member

Sounds good, I'll add something like stopAll and/or stopDevice.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 28, 2015

stopDevice sounds good.

@thijstriemstra
Copy link
Member

Added stopDevice, let me know if it works and I'll put out a new release.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 29, 2015

Thanks , it is working. But i just upgraded to chrome 45 and getting depreciation Notices abobout MediaStream.stop()
found work arounds. But i think we need to support both ways as Chrome45 is relatively new and may not upgraded for everyone yet.
https://developers.google.com/web/updates/2015/07/mediastream-deprecations

@v3ss0n
Copy link
Author

v3ss0n commented Sep 29, 2015

During audio-only mode :

When i tried to stop and requestDevice , it just play the pre-recorded audio , didn't try to request device actually.

Might be a bug.

to test:

//during AUDIO_ONLY
vjsrec.player().recorder.stopDevice();
vjsrec.player().recorder.getDevice();

@thijstriemstra
Copy link
Member

Yeah, stop and get are not working as expected yet. I added a fix for the deprecation warnings, could you check what happens with an older version of Chrome?

@thijstriemstra
Copy link
Member

Because it turns out 4e07112 broke the Chrome check so a 0.9.1 should be released asap.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 29, 2015

I have no older version remained , just did os upgrade. I will check after downloading.

thijstriemstra added a commit that referenced this issue Sep 30, 2015
@thijstriemstra
Copy link
Member

It was also a little wonky in modes other than audio-only, should be better now. Now going to look at the audio-only issue.

@thijstriemstra
Copy link
Member

Tested with Chromium 32 on OSX and seems the fix for deprecation works there as well so releasing 0.9.1 now, but still need to fix the audio-only issue.

@v3ss0n
Copy link
Author

v3ss0n commented Oct 4, 2015

this.getUserMedia(
this.mediaType,
this.onDeviceReady.bind(this),
this.onDeviceError.bind(this));                              

I tried replacing that in audio only . works partially , except it request media device two times and then fail to turnoff device.

@thijstriemstra
Copy link
Member

yeah i saw your PR but unfortunately the problem is a little further down the chain I think (in videojs-wavesurfer and/or wavesurfer.js microphone plugin).

thijstriemstra added a commit that referenced this issue Oct 4, 2015
@thijstriemstra
Copy link
Member

I think I have fixed it with 2efca39 but it also requires some changes in the wavesurfer.js microphone plugin that I'll open a pull request for. Once that wavesurfer change is released I can roll a new release I suppose.

@thijstriemstra
Copy link
Member

Did some more fixes (as well as in videojs-wavesurfer and wavesurfer.js), should be better when the microphone PR is merged: katspaugh/wavesurfer.js#542.

@thijstriemstra
Copy link
Member

If you upgrade to the latest wavesurfer.js (1.0.44) and microphone plugin, videojs-wavesurfer (0.9.9) and videojs-record 0.9.2 audio-only mode should work correctly. Please open a new ticket if there are new problems.

@v3ss0n
Copy link
Author

v3ss0n commented Oct 6, 2015

Thanks alot . Testing tonight.
On Oct 6, 2015 3:25 PM, "Thijs Triemstra" notifications@github.com wrote:

Closed #12 #12.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants