package com.humand.demo.modules.IncomingCallMessagingService.common

import org.json.JSONObject

fun String?.hasVideoEnabled(): Boolean {
    if (this.isNullOrBlank()) {
        return false
    }

    return try {
        JSONObject(this).optBoolean("cameraEnabled", false)
    } catch (_: Exception) {
        false
    }
}
