Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 878 Bytes

File metadata and controls

24 lines (14 loc) · 878 Bytes

Publish Image Capture

R5Stream.getStreamImage allows the user to capture a screenshot of the stream at any time.

Example Code

Running the example

Touch the screen at any time while streaming to popup a temporary overlay containing the UIImage that is returned from the Red5 Pro SDK.

Using getStreamImage

R5Stream.getStreamImage returns a UIImage containing a screenshot of the current stream. The image dimensions match the incoming stream dimensions, and contain RGB data. Once streaming, simply call:

uiv!.image = self.publishStream?.getStreamImage();

PublishStreamImageTest.swift #56

The UIImage can be saved to disk, displayed with a UIImageView, or processed in any way that is needed.