package xyz.nuark.liblinphone_flutter.views

import android.content.Context
import android.graphics.Color
import android.view.TextureView
import android.view.View
import io.flutter.plugin.platform.PlatformView
import org.linphone.mediastream.video.capture.CaptureTextureView

internal class LocalView(context: Context, id: Int, creationParams: Map<String?, Any?>?) : PlatformView {
    private val textureView: CaptureTextureView

    override fun getView(): View {
        return textureView
    }

    override fun dispose() {
        textureView.surfaceTexture?.release()
    }

    init {
        textureView = CaptureTextureView(context)
        textureView.id = id
    }
}