Make use of camera in device and live stream

I want to live stream a video captured from mobile using p5.js.
This is possible? any ideas how to implement? I checked the sample tutorials which opens the front webcam and it can be displayed on canvas. But incase i want to develop the same in an hybrid mobile app is it possible?