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

Some p5 functions are not defined. eg. createCapture. #1

Open
dwjohnston opened this issue Jan 2, 2019 · 1 comment
Open

Some p5 functions are not defined. eg. createCapture. #1

dwjohnston opened this issue Jan 2, 2019 · 1 comment

Comments

@dwjohnston
Copy link

Most functions seem to work - but not createCapure:

See:

export function setup() {
  createCanvas(windowWidth, windowHeight)
  background(52)

  stroke(255);

  //capture = createCapture(VIDEO); //createCapture is not defined

}
var y = 100;

export function draw() {
  background(52)

  background(0);   // Set the background to black
  y = y - 1;
  if (y < 0) {
    y = height;
  }
  line(0, y, width, y);

}

There is a note in the definition file that say:

 *   Security note: A new browser security 
 *   specification requires that getUserMedia, which is 
 *   behind createCapture(), only works when you're 
 *   running the code locally, or on HTTPS. Learn more 
 *   here and here.

However , I am running it locally - so it should be fine.

@dwjohnston
Copy link
Author

Ok - I see the issue is that createCapture is a part of p5.dom - any suggestions for including it?

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