add mediaReady method
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8744 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
830a8493de
commit
6798cd2b5f
|
@ -2000,6 +2000,15 @@ static JSBool session_ready(JSContext * cx, JSObject * obj, uintN argc, jsval *
|
|||
return JS_TRUE;
|
||||
}
|
||||
|
||||
static JSBool session_media_ready(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
|
||||
{
|
||||
struct js_session *jss = JS_GetPrivate(cx, obj);
|
||||
|
||||
*rval = BOOLEAN_TO_JSVAL((jss && jss->session && switch_channel_media_ready(switch_core_session_get_channel(jss->session))) ? JS_TRUE : JS_FALSE);
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
||||
static JSBool session_answered(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
|
||||
{
|
||||
|
@ -2472,6 +2481,7 @@ static JSFunctionSpec session_methods[] = {
|
|||
{"generateXmlCdr", session_cdr, 0},
|
||||
{"ready", session_ready, 0},
|
||||
{"answered", session_answered, 0},
|
||||
{"mediaReady", session_media_ready, 0},
|
||||
{"waitForAnswer", session_wait_for_answer, 0},
|
||||
{"waitForMedia", session_wait_for_media, 0},
|
||||
{"getEvent", session_get_event, 0},
|
||||
|
|
Loading…
Reference in New Issue