File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,16 @@ if (mModuleSettings.enablePlayer)
121
121
#ifdef ENABLE_AAMP_JSBINDINGS_DYNAMIC
122
122
void JavaScriptContext::loadAAMPJSBindingsLib ()
123
123
{
124
+ std::cout<<" Dynamic mode is enabled" <<std::endl;
124
125
if (nullptr == gAAMPJSBindings ->PlayerLibHandle )
125
126
{
126
127
static const char *aampJSBindingsLib = " libaampjsbindings.so" ;
128
+ static const char *jscLib = " libJavaScriptCore.so" ;
129
+ void *jscLibHandle = dlopen (jscLib, RTLD_NOW | RTLD_GLOBAL);
130
+ if (!jscLibHandle)
131
+ {
132
+ std::cout<<" dlopen error for jsc library " << dlerror () << std::endl;
133
+ }
127
134
void *aampJSBindingsLibHandle = dlopen (aampJSBindingsLib, RTLD_NOW | RTLD_GLOBAL);
128
135
if (aampJSBindingsLibHandle)
129
136
{
@@ -140,6 +147,8 @@ void JavaScriptContext::loadAAMPJSBindingsLib()
140
147
{
141
148
std::cout << " failed to load " << aampJSBindingsLib << " and error is " << dlerror ();
142
149
}
150
+
151
+ dlclose (jscLibHandle);
143
152
}
144
153
}
145
154
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ if (ENABLE_JSRUNTIME_PLAYER)
69
69
if (ENABLE_AAMP_JSBINDINGS_STATIC )
70
70
set (JSRUNTIME_ENGINE_LIBRARIES ${JSRUNTIME_ENGINE_LIBRARIES} -laamp -labr -lcjson -lsubtec -lmetrics -ldash -laampjsbindings )
71
71
endif (ENABLE_AAMP_JSBINDINGS_STATIC )
72
+ if (ENABLE_AAMP_JSBINDINGS_DYNAMIC )
73
+ set (JSRUNTIME_ENGINE_LIBRARIES ${JSRUNTIME_ENGINE_LIBRARIES} -lcjson )
74
+ endif (ENABLE_AAMP_JSBINDINGS_DYNAMIC )
72
75
if (NOT ENABLE_AAMP_JSBINDINGS )
73
76
set (JSRUNTIME_ENGINE_LIBRARIES ${JSRUNTIME_ENGINE_LIBRARIES} -laamp -labr -lcjson -lsubtec -lmetrics -ldash )
74
77
endif (NOT ENABLE_AAMP_JSBINDINGS )
You can’t perform that action at this time.
0 commit comments