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)
121121#ifdef ENABLE_AAMP_JSBINDINGS_DYNAMIC
122122void JavaScriptContext::loadAAMPJSBindingsLib ()
123123{
124+ std::cout<<" Dynamic mode is enabled" <<std::endl;
124125 if (nullptr == gAAMPJSBindings ->PlayerLibHandle )
125126 {
126127 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+ }
127134 void *aampJSBindingsLibHandle = dlopen (aampJSBindingsLib, RTLD_NOW | RTLD_GLOBAL);
128135 if (aampJSBindingsLibHandle)
129136 {
@@ -140,6 +147,8 @@ void JavaScriptContext::loadAAMPJSBindingsLib()
140147 {
141148 std::cout << " failed to load " << aampJSBindingsLib << " and error is " << dlerror ();
142149 }
150+
151+ dlclose (jscLibHandle);
143152 }
144153}
145154
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ if (ENABLE_JSRUNTIME_PLAYER)
6969 if (ENABLE_AAMP_JSBINDINGS_STATIC)
7070 set (JSRUNTIME_ENGINE_LIBRARIES ${JSRUNTIME_ENGINE_LIBRARIES} -laamp -labr -lcjson -lsubtec -lmetrics -ldash -laampjsbindings)
7171 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)
7275 if (NOT ENABLE_AAMP_JSBINDINGS)
7376 set (JSRUNTIME_ENGINE_LIBRARIES ${JSRUNTIME_ENGINE_LIBRARIES} -laamp -labr -lcjson -lsubtec -lmetrics -ldash)
7477 endif (NOT ENABLE_AAMP_JSBINDINGS)
You can’t perform that action at this time.
0 commit comments