VideoTextureView

class VideoTextureView(viewContext: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : FrameLayout, MediaTrackSink

Renders a MediaStreamTrack from a local or remote participant.

In most cases, VideoView should be used instead of VideoTextureView. Internally, VideoTextureView renders to an Android TextureView. This integrates well with the Android UI hierarchy, but is more resource intensive, and interruptions to the UI thread could cause stuttering in the video.

Constructors

Link copied to clipboard
fun VideoTextureView(viewContext: Context, attrs: AttributeSet?, defStyleAttr: Int)
Link copied to clipboard
fun VideoTextureView(viewContext: Context, attrs: AttributeSet?)
Link copied to clipboard
fun VideoTextureView(viewContext: Context)
Link copied to clipboard
fun VideoTextureView(viewContext: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface Listener
Link copied to clipboard
enum VideoScaleMode : Enum<VideoTextureView.VideoScaleMode>

Functions

Link copied to clipboard
fun setListener(listener: VideoTextureView.Listener)

Sets a listener to be notified when events occur.

Properties

Link copied to clipboard
var mirrorHorizontally: Boolean = false

When true, flips rendering in the X axis.

Link copied to clipboard
open override var track: MediaStreamTrack? = null
Link copied to clipboard
var videoScaleMode: VideoTextureView.VideoScaleMode