Media player is not working ("API Module is not found")

T Thierry Leloup 3 years 7 months ago
2 3 0

Hello,

I am new in Rhodes and am using version 5.0.25 on Mac OS Yosemite.

I have added "extensions: ["media player"]" in build.ml but when I try to use the Media Player module, I got a systematic "API Module is not found" when running in Rhosimulator.

Could any help me ?

Thanks,
Thierry

Please Register or Login to post a reply

3 Replies

T Thierry Leloup

I took a look to my ./public/api/rhoapi-modules.js and the Rho.Mediaplayer module is there :

// Module Rho.Mediaplayer(function ($, rho, rhoUtil) {
   'use strict';
   var moduleNS = 'Rho.Mediaplayer';
   var apiReq = rhoUtil.apiReqFor(moduleNS);
   // === Mediaplayer class definition ===   function Mediaplayer() {

So, why is it still a "API module is not found" error ???

I found getJSApiModule function (in rhodes/platform/shared/api_generator/js_helpers.cpp)  that should return non null value if the module is "known" (rhodes/js_helpers.cpp at master · rhomobile/rhodes · GitHub)

V Vladimir Musulainen

It needs to use
extensions: ["mediaplayer"]

Rhomobile | Mediaplayer

T Thierry Leloup

Hello Vladimir,

That's what I already have in my buid.yml file :

extensions: ["coreapi", "mediaplayer"]

and, still it does not work...

FYI, here are my compilation logs :
extyml /Users/thierry/.rvm/gems/ruby-2.1.5/gems/rhodes-5.0.2/lib/commonAPI/mediaplayer/ext.yml
add /Users/thierry/.rvm/gems/ruby-2.1.5/gems/rhodes-5.0.2/lib/commonAPI/mediaplayer/public/api/generated/Rho.Mediaplayer.js to extjsmodulefiles..

CONTACT
Can’t find what you’re looking for?