fun setLayoutParams()

in app/src/main/java/com/amazon/ivs/optimizations/playerview/PlayerView.kt [190:197]


    fun setLayoutParams(surfaceView: SurfaceView, width: Int, height: Int) {
        val parent = surfaceView.parent as View
        val scaled: Size = scaleTo(parent, width, height)
        val layoutParams = surfaceView.layoutParams
        layoutParams.width = scaled.width
        layoutParams.height = scaled.height
        surfaceView.layoutParams = layoutParams
    }