GNOME Bugzilla – Bug 350305
Add support for Real javascript
Last modified: 2010-04-07 12:36:37 UTC
From bug 171019: <snip> I still cannot get the site above to play, though; it spews a constant stream of JavaScript error: http://www.bbc.co.uk/radio/aod/networks/fivelive/live.shtml?listen, line 393: document.RP.GetPlayState is not a function messages on console. It looks like the totem plugin would need to implement the realplayer plugin's JS interface (from nsIHXPlayer.idl in the helix player source)?
Writing the JS interface is rather easy, we just need to write an IDL file for it. What's more work is making the plugin/viewer communication bidirectional so the JS interface can report accurate information (e.g. play state) back to the web site's JS.
The idea of using dbus was to make that easy. It shouldn't be hard... (Actually, I thought dbus made this as easy as possible...).
Created attachment 80804 [details] [review] totem-real-scripting.patch Full idl for RealOne scripting.
The helix player has a bunch more methods, http://www.google.com/codesearch?hl=en&q=show:Kk1Oa744WjM:Y_I-RLHqpm4:RVsymzGkFRw&sa=N&ct=rd&cs_p=https://helixcommunity.org/download.php/487/helixplayer1.0-beta-source.tar.bz2&cs_f=player_all-bingo-beta-20040615/player/app/plugin/nsIHXPlayer.idl
With some clever sed-fu, I came up with 78 functions that the Helix IDL has that we don't. But a number of those were removed: http://service.real.com/help/library/guides/extend/htmfiles/appe_com.htm Those are missing: EnableMessageBox GetEnableContextMenu GetEnableDoubleSize GetEnableFullScreen GetEnableMessageBox GetEnableOriginalSize GetIsPlus GetLastErrorRMACodeString GetNoLogo GetPreferedLanguageID GetPreferedLanguageString GetUserCountryID SetEnableContextMenu SetEnableDoubleSize SetEnableFullScreen SetEnableMessageBox SetEnableOriginalSize SetNoLogo They seem to be "Real Player" API, not specific "embedded API", and some are documented at: http://service.real.com/help/library/guides/extend/htmfiles/appa_met.htm Those aren't documented at all: EnableMessageBox GetEnableMessageBox GetLastErrorRMACodeString SetEnableMessageBox A couple of methods are typo'd in the docs/the IDL: GetPreferedLanguageID GetPreferedLanguageString I added both variants for those.
Created attachment 80839 [details] [review] totem-real-scripting-2.patch
I'd say it'd be safe to just add all of them, unimplemented, so scripts don't get unexpected exceptions...
Created attachment 81291 [details] [review] stubs
Created attachment 81296 [details] [review] complete stubs
Which functions are missing from the IDL then? Just the ones that are undocumented?
The undocumented and deprecated ones. My stubs have stubs for everything that the helix player defines; I've #if 0'd out the ones that are currently missing from your idl.
2007-01-29 Bastien Nocera <hadess@hadess.net> * browser-plugin/idl/totemIComplexPlayer.idl: update IDL file to include all the documented and non-deprecated functions from Real Player and Helix Player * browser-plugin/totemComplexPlugin.cpp: * browser-plugin/totemComplexPlugin.h: Patch from Christian Persch <chpe@svn.gnome.org> to add stubs for those functions We still need to add a few functions to the IDL, and then uncomment them from the stubs. Non-stub work would also be needed...
We removed the crappy RealAudio support in 2.29.2.