/    Sign up×
Community /Pin to ProfileBookmark

javascript – calling native "c" functions

Hi all,
I am posting this query to this forum, because i am not able to get a more appropriate place, Please redirect me if you find a correct place.

I am working on Video On Demand appliation, in which the pages are designed using javascript. This script is calling some APIs which is available in windows mediaplayer 9 services.

For example,

this.pl = document.getElementById(“pcMediaPlayer”);
this.pl.play();

Now I want to port the java script APIs to my custom linux platform. I am having certain APIs which are in “c” language,
which can play, pause or stop the media. Can I call these APIs from a
javascript. I think, since javascipt is executed
in the client side, any native functions cannot be caled easily. What is the alternate way of doing it.

I never worked on any scripting language before :-).
If you feel that I am entirely wrong, please feel free to advice me with a more appropriate solution

regards
durai

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@baconbuttyDec 01.2004 — Some brief thoughts:-

C

I think you can only call C API's in IE if they are packaged up as an ActiveX control. You would access them through new ActiveXObject. see Microsoft's web site: http://msdn.microsoft.com

In Mozilla, again the API's would need to be packaged up as an XPCOM interface, and accessed through the XPCONNECT technology. See http://www.xulplanet.com

Java

In IE you can also access Java applets.

In Mozilla you can access Java applets and Java classes.
×

Success!

Help @leo_rajp spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...