jsbindings/jsbindings.cpp
/**
 * @brief Callback invoked from JS to get the currentDRM property value
 *
 * @param[in] context       JS execution context
 * @param[in] thisObject    JSObject to search for the property
 * @param[in] propertyName  JSString containing the name of the property to get
 * @param[out] exception    Pointer to a JSValueRef in which to return an exception, if any
 *
 * @retval Property's value if object has the property, otherwise NULL
 */


@retval Property's value if object has the property, otherwise NULL
@retval Property ' s value if object has the property otherwise NULL
static JSValueRef AAMP_getProperty_CurrentDRM(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
{
	TRACELOG("[AAMP_JS] %s()", __FUNCTION__);
	AAMP_JS* pAAMP = (AAMP_JS*)JSObjectGetPrivate(thisObject);
	if (pAAMP == NULL)
	{
		ERROR("[AAMP_JS] %s() Error: JSObjectGetPrivate returned NULL!", __FUNCTION__);
		*exception = aamp_GetException(context, AAMPJS_MISSING_OBJECT, "Can only call AAMP.currentDRM on instances of AAMP");
		return JSValueMakeUndefined(context);
	}
	const char* drm = pAAMP->_aamp->GetCurrentDRM();
	return aamp_CStringToJSValue(context, drm);
}
static JSValueRef AAMP_getProperty_CurrentDRM ( JSContextRef context , JSObjectRef thisObject , JSStringRef propertyName , JSValueRef * exception ) { TRACELOG ( " " , __FUNCTION__ ) ; AAMP_JS * pAAMP = ( AAMP_JS * ) JSObjectGetPrivate ( thisObject ) ; if ( pAAMP == NULL ) { ERROR ( " " , __FUNCTION__ ) ; * exception = aamp_GetException ( context , AAMPJS_MISSING_OBJECT , " " ) ; return JSValueMakeUndefined ( context ) ; } const char * drm = pAAMP -> _aamp -> GetCurrentDRM ( ) ; return aamp_CStringToJSValue ( context , drm ) ; }
@brief Callback invoked from JS to get the currentDRM property value
 @param[in] context       JS execution context
 @param[in] thisObject    JSObject to search for the property
 @param[in] propertyName  JSString containing the name of the property to get
 @param[out] exception    Pointer to a JSValueRef in which to return an exception, if any
@brief Callback invoked from JS to get the currentDRM property value @param [ in ] context JS execution context @param [ in ] thisObject JSObject to search for the property @param [ in ] propertyName JSString containing the name of the property to get @param [ out ] exception Pointer to a JSValueRef in which to return an exception if any