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

CameraDetectionResult.NO_PERMISSION not triggered #7

Open
ghost opened this issue Oct 31, 2012 · 8 comments
Open

CameraDetectionResult.NO_PERMISSION not triggered #7

ghost opened this issue Oct 31, 2012 · 8 comments

Comments

@ghost
Copy link

ghost commented Oct 31, 2012

When I have remembered permissions and they are false and I reload the webpage, the CameraDetectionResult.NO_PERMISSION isn't triggered!

@cataclysmicrewind
Copy link
Owner

could you go here: http://www.cataclysmicrewind.com/cameradetection/multitest.html
and try running CameraDetection under the situation you describe.

also, if you could list your operating system and flash player version. i'm using an 11.3 player on windows 7 and it works for me.

@ghost ghost closed this as completed Oct 31, 2012
@cataclysmicrewind
Copy link
Owner

i see, i was dispatching the wrong event type. thanks for finding this. I will pull later this evening.

@cataclysmicrewind
Copy link
Owner

i had thought of that.

since i override addEventListener to attach directly to mediaPermissions, it can be dispatched twice.

maybe i should modify the override so you can only listen to DIALOG_STATUS through mediapermissions, because that was the main reason i wanted to do that anyway.

i think knowing when it opens and closes is crucial to UI.

@cataclysmicrewind
Copy link
Owner

later this evening. likely by 2200 EST

@cataclysmicrewind
Copy link
Owner

i was able to reproduce. don't know what's wrong yet.
i will also look at my examples and make sure they are updated.

i am vacationing tomorrow so i'll have time to work on it. hopefully i'll update soon.

thanks for informing me of the bug

@cataclysmicrewind
Copy link
Owner

there seems to be a few problems affecting this. all of them are related to the fact that in the MultiTest swf i am trying to reuse the same CameraDetection instance. i have slapped a fix together locally but it is not complete.

yes the dispose method has some influence on this happening. i have been mulling over adding a reset function but i need to look at more of the edge cases to determine what is the most effective way of making sure this gets fixed.

thanks for reporting!

@cataclysmicrewind
Copy link
Owner

sorry i have been absent.

to fix the scenario you described, simply instantiate a new CameraDetection() object.

this problem lies outside of the original scope of the utility which was to get access to a camera that actually works. as such it was designed to shut down when it is done.

the scenario you gave is an edge case at best (could be more common though) and to handle this case properly i imagine some kind of non-stop monitor of permissions. this is a much larger problem to solve and i don't really want to do it unless people specifically ask for it.

@cataclysmicrewind
Copy link
Owner

i will fix the test.swf to handle this properly.

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

No branches or pull requests

1 participant