patchGnash - The GNU Flash player - Patches: patch #6821, Start of scriptable plugin support.

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6821: Start of scriptable plugin support.

Submitter:  Shuho Chou <rintarouchou>
Submitted:  Thu 30 Apr 2009 06:56:22 PM UTC
   
 
Category:  plugin Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  rsavoye Open/Closed:  Closed

Jump to the original submission

Mon 26 Jul 2010 01:46:17 PM UTC, comment #7: 

This patch has long been replaced by real code in trunk. :-) That task is https://savannah.gnu.org/task/?5919. At this point, scriptable support for Gnash works.

Rob Savoye <rsavoye>
Group administrator
Wed 14 Jul 2010 04:59:34 PM UTC, comment #6: 
Shuho Chou <rintarouchou>
Sat 01 May 2010 12:28:27 AM UTC, comment #5: 

This should be the reason why you get the segmentation fault before.

This is my bad. Sorry.. :P

Shuho Chou <rintarouchou>
Fri 30 Apr 2010 11:56:50 PM UTC, comment #4: 

What a great job!!!

For the compatibility of browsers which doesn't support scritpable plugin, it's better to check the NPAPI version before calling createobject().

In plugin.cpp:

if (NPNFuncs.version >= 14) // since NPAPI start to support scriptability in 14.
_scriptObject = (GnashPluginScriptObject *)NPNFuncs.createobject(_instance, GnashPluginScriptObject::marshalGetNPClass());

Shuho Chou <rintarouchou>
Sat 10 Apr 2010 06:50:37 PM UTC, comment #3: 

I created a simple protocol for the plugin to communicate with the standalone gnash, and implemented the client side of the required methods as mentioned in the spec. Currently Gnash doesn't do anything right now to handle the requests, that's next.

To test this I added optional code to allow the plugin to open a raw network connection to a server on localhost, I use Netcat (nc -v -k -l 1111), so I could make sure the command requests were formatted correctly. As it's currently an ASCII protocol, I can also use nc to send test responses back to make sure the plugin correctly parses them, and passes them to JavaScript. Along with this, I greatly enhanced your original test case.

Rob Savoye <rsavoye>
Group administrator
Thu 08 Apr 2010 11:08:48 PM UTC, comment #2: 

For some strange reason, I tried this patch again, as we've updated the version of the Mozilla SDK files recently. After applying the patch by hand, I then got it working much more fully, including working properties and methods being called from JavaScript. I also expanded your test case.

Right now all the properties and methods have to live in the plugin itself, there is no data transferred between the standalone Gnash and the plugin yet. However with these changes, it's much closer to actually being able to do that.

Anyway, the expanded variation of this is checked in as of  revno #12140.

Rob Savoye <rsavoye>
Group administrator
Mon 25 May 2009 01:11:51 PM UTC, comment #1: 

This looks very useful, but apparently Gnash needs to support multiple Player instances first, which may take a while.

Benjamin Wolsey <bwy>
Group Member
Thu 30 Apr 2009 06:56:22 PM UTC, original submission:  

A small patch to support scriptable plugin.


Test page:

plugin/scriptable-test.html

JavaScript can get embed[0].version now.


Todo:

The methods listed in the following URL should be supported.

http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html

Shuho Chou <rintarouchou>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #18064:  start-of-scriptable-plugin.diff added by rintarouchou (9KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rsavoye (Posted a comment)
  • -email is unavailable- added by bwy (Posted a comment)
  • -email is unavailable- added by rintarouchou (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-26 rsavoye StatusIn Progress Done
        Open/ClosedOpen Closed
    2010-04-10 rsavoye Assigned toNone rsavoye
    2010-04-08 rsavoye StatusPostponed In Progress
    2009-05-25 bwy StatusNone Postponed
    2009-04-30 rintarouchou Attached File- Added start-of-scriptable-plugin.diff, #18064

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code