fromDevice
Opens a webcam or video device
Return
a ready-to-play video player on success
Parameters
a machine-specific device name
which streams should be opened and played
optional frame rate (in Hz)
optional image width
optional image height
optional video player configuration
optional FFmpeg name of the pixel format of an uncompressed mode, like nv12
optional FFmpeg name of the codec of a compressed mode, like mjpeg. macOS does not select codecs.
Opens a webcam or video device in deviceMode, a mode from listDeviceModes. The device delivers images of the size and in the pixel format or codec of the mode, at the highest frame rate of the mode.
Return
a ready-to-play video player on success
Parameters
a machine-specific device name
which streams should be opened and played
optional video player configuration