MobWebrtc.VideoView (mob_webrtc v0.1.0)

Copy Markdown View Source

The native view a remote video track is shown in: a decoded H264 picture, scaled to fit. Place it with MobWebrtc.video_view/1 and feed it with MobWebrtc.Video, both naming the same :id.

iOS draws into an AVSampleBufferDisplayLayer from a VideoToolbox decoder; Android into a SurfaceView a MediaCodec decoder renders to. Only the view id and size ride the render tree; frames go to the decoder through mob_webrtc_video_nif, keyed by the same id.

Native registration key (module name, dots → underscores): "MobWebrtc_VideoView".

Summary

Functions

handle_event(event, payload, socket)

Callback implementation for Mob.Component.handle_event/3.

handle_info(message, socket)

Callback implementation for Mob.Component.handle_info/2.

terminate(reason, socket)

Callback implementation for Mob.Component.terminate/2.