Getting a snapshot image of a video

The following code captures and displays a static image of the Publisher video:

The following code captures and displays a static image of a Subscriber video: