RDK Documentation (Open Sourced RDK Components)
|
JavaScript bindings for AAMP_JSController. More...
#include <JavaScriptCore/JavaScript.h>
#include "jsbindings.h"
#include "jseventlistener.h"
#include "jsutils.h"
#include "priv_aamp.h"
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | AAMP_JSController |
Data structure of AAMP_JSController JS object. More... | |
Functions | |
void | aamp_LoadJSController (JSGlobalContextRef context) |
Loads AAMP_JSController JS object into JS execution context. More... | |
void | aamp_UnloadJSController (JSGlobalContextRef context) |
Removes the AAMP_JSController instance from JS context. More... | |
void | setAAMPPlayerInstance (PlayerInstanceAAMP *aamp, int sessionID) |
Set the instance of PlayerInstanceAAMP and session id. More... | |
void | unsetAAMPPlayerInstance (PlayerInstanceAAMP *aamp) |
Remove the PlayerInstanceAAMP stored earlier. More... | |
void | aamp_SetPageHttpHeaders (const char *headerJson) |
Sets the custom http headers from received json string. More... | |
void | aamp_ApplyPageHttpHeaders (PlayerInstanceAAMP *aampObject) |
applies the parsed custom http headers into the aamp More... | |
static JSValueRef | AAMPJSC_getProperty_closedCaptionEnabled (JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef *exception) |
Callback invoked from JS to get the CC enabled property. More... | |
static bool | AAMPJSC_setProperty_closedCaptionEnabled (JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef *exception) |
Callback invoked from JS to set the CC enabled property. More... | |
static JSValueRef | AAMPJSC_getProperty_aampSessionID (JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef *exception) |
Callback invoked from JS to get the session id property. More... | |
static JSValueRef | AAMPJSC_addEventListener (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) |
Callback invoked from JS to add an event listener. More... | |
static JSValueRef | AAMPJSC_removeEventListener (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) |
Callback from JS to remove an event listener. More... | |
static JSValueRef | AAMPJSC_setLicenseServerUrl (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) |
Callback from JS to set a license server URL. More... | |
void | AAMP_JSController_finalize (JSObjectRef thisObj) |
Callback invoked when an object of AAMP_JSController is finalized. More... | |
static JSObjectRef | AAMP_JSController_class_constructor (JSContextRef context, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) |
callback invoked when an AAMP_JSController is used along with 'new' More... | |
Variables | |
static std::map< std::string, std::string > | g_PageHttpHeaders |
AAMP_JSController * | _globalController = NULL |
Global AAMP_JSController object. | |
static const JSStaticValue | AAMP_JSController_static_values [] |
Array containing the AAMP_JSController's statically declared value properties. More... | |
static const JSStaticFunction | AAMP_JSController_static_methods [] |
Array containing the AAMP_JSController's statically declared functions. More... | |
static const JSClassDefinition | AAMP_JSController_class_def |
Structure contains properties and callbacks of AAMP_JSController object. More... | |
JavaScript bindings for AAMP_JSController.
Definition in file jscontroller-jsbindings.cpp.
void aamp_LoadJSController | ( | JSGlobalContextRef | context | ) |
Loads AAMP_JSController JS object into JS execution context.
[in] | context | JS execution context |
Definition at line 524 of file jscontroller-jsbindings.cpp.
void aamp_UnloadJSController | ( | JSGlobalContextRef | context | ) |
Removes the AAMP_JSController instance from JS context.
[in] | context | JS execution context |
Definition at line 556 of file jscontroller-jsbindings.cpp.
void setAAMPPlayerInstance | ( | PlayerInstanceAAMP * | aamp, |
int | sessionID | ||
) |
Set the instance of PlayerInstanceAAMP and session id.
[in] | aamp | instance of PlayerInstanceAAMP |
[in] | sessionID | session id |
Definition at line 77 of file jscontroller-jsbindings.cpp.
void unsetAAMPPlayerInstance | ( | PlayerInstanceAAMP * | aamp | ) |
Remove the PlayerInstanceAAMP stored earlier.
[in] | aamp | instance of PlayerInstanceAAMP to be removed |
Definition at line 109 of file jscontroller-jsbindings.cpp.
void aamp_SetPageHttpHeaders | ( | const char * | headerJson | ) |
Sets the custom http headers from received json string.
[in] | headerJson | http headers json in string format |
Definition at line 465 of file jscontroller-jsbindings.cpp.
void aamp_ApplyPageHttpHeaders | ( | PlayerInstanceAAMP * | aampObject | ) |
applies the parsed custom http headers into the aamp
[in] | aampObject | main aamp object |
Definition at line 511 of file jscontroller-jsbindings.cpp.
|
static |
Callback invoked from JS to get the CC enabled property.
[in] | context | JS execution context |
[in] | thisObject | JSObject to search for the property |
[in] | propertyName | JSString containing the name of the property to get |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
property's | value if object has the property, otherwise NULL |
Definition at line 142 of file jscontroller-jsbindings.cpp.
|
static |
Callback invoked from JS to set the CC enabled property.
[in] | context | JS exception context |
[in] | thisObject | JSObject on which to set the property's value |
[in] | propertyName | JSString containing the name of the property to set |
[in] | value | JSValue to use as the property's value |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
true | if the property was set, otherwise false |
Definition at line 168 of file jscontroller-jsbindings.cpp.
|
static |
Callback invoked from JS to get the session id property.
[in] | context | JS execution context |
[in] | thisObject | JSObject to search for the property |
[in] | propertyName | JSString containing the name of the property to get |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
property's | value if object has the property, otherwise NULL |
Definition at line 197 of file jscontroller-jsbindings.cpp.
|
static |
Callback invoked from JS to add an event listener.
[in] | context | JS execution context |
[in] | function | JSObject that is the function being called |
[in] | thisObject | JSObject that is the 'this' variable in the function's scope |
[in] | argumentCount | number of args |
[in] | arguments[] | JSValue array of args |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
JSValue | that is the function's return value |
Definition at line 240 of file jscontroller-jsbindings.cpp.
|
static |
Callback from JS to remove an event listener.
[in] | context | JS execution context |
[in] | function | JSObject that is the function being called |
[in] | thisObject | JSObject that is the 'this' variable in the function's scope |
[in] | argumentCount | number of args |
[in] | arguments[] | JSValue array of args |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
JSValue | that is the function's return value |
Definition at line 294 of file jscontroller-jsbindings.cpp.
|
static |
Callback from JS to set a license server URL.
[in] | context | JS execution context |
[in] | function | JSObject that is the function being called |
[in] | thisObject | JSObject that is the 'this' variable in the function's scope |
[in] | argumentCount | number of args |
[in] | arguments[] | JSValue array of args |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
JSValue | that is the function's return value |
Definition at line 350 of file jscontroller-jsbindings.cpp.
void AAMP_JSController_finalize | ( | JSObjectRef | thisObj | ) |
Callback invoked when an object of AAMP_JSController is finalized.
[in] | thisObj | JSObject being finalized |
Definition at line 399 of file jscontroller-jsbindings.cpp.
|
static |
callback invoked when an AAMP_JSController is used along with 'new'
[in] | context | JS execution context |
[in] | constructor | JSObject that is the constructor being called |
[in] | argumentCount | number of args |
[in] | arguments[] | JSValue array of args |
[out] | exception | pointer to a JSValueRef in which to return an exception, if any |
JSObject | that is the constructor's return value |
Definition at line 431 of file jscontroller-jsbindings.cpp.
|
static |
Array containing the AAMP_JSController's statically declared value properties.
Definition at line 222 of file jscontroller-jsbindings.cpp.
|
static |
Array containing the AAMP_JSController's statically declared functions.
Definition at line 386 of file jscontroller-jsbindings.cpp.
|
static |
Structure contains properties and callbacks of AAMP_JSController object.
Definition at line 440 of file jscontroller-jsbindings.cpp.