CN103544067A - Method for interaction between flash plug-in of client and webpage script of server IE (internet explorer) - Google Patents

Method for interaction between flash plug-in of client and webpage script of server IE (internet explorer) Download PDF

Info

Publication number
CN103544067A
CN103544067A CN201310475791.9A CN201310475791A CN103544067A CN 103544067 A CN103544067 A CN 103544067A CN 201310475791 A CN201310475791 A CN 201310475791A CN 103544067 A CN103544067 A CN 103544067A
Authority
CN
China
Prior art keywords
plug
unit
function
client
flash
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310475791.9A
Other languages
Chinese (zh)
Other versions
CN103544067B (en
Inventor
张辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Centerm Information Co Ltd
Original Assignee
Fujian Centerm Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Centerm Information Co Ltd filed Critical Fujian Centerm Information Co Ltd
Priority to CN201310475791.9A priority Critical patent/CN103544067B/en
Publication of CN103544067A publication Critical patent/CN103544067A/en
Application granted granted Critical
Publication of CN103544067B publication Critical patent/CN103544067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for interaction between a flash plug-in of a client and a webpage script of a server IE (internet explorer). The method includes: defining a server BHO (browser helper object) plug-in in a server, and defining a redirection plug-in in the client; when the webpage script calls a function exported from a Flash object, calling a Call Function of the Flash plug-in of the client, intercepting the function through the server BHO plug-in at the moment, and transmitting function parameters to the redirection plug-in; executing the Call Function of the client Flash plug-in and returning a result to the server BHO plug-in through the redirection plug-in; when the client Flash plug-in calls the webpage script, packaging the Flash plug-in through the redirection plug-in, triggering the server BHO plug-in to call the webpage script on a webpage, and returning a result to the redirection plug-in to realize calling of the webpage script from the client to the server. By the method, bidirectional calling of the server webpage script and a client local Flash object method is realized, and the Flash object of the client can interact with JavaScript in the server webpage accurately.

Description

The mutual method of page script of the flash plug-in unit of client and service end IE browser
Technical field
The present invention relates to a kind of computer communication technology field, relate in particular to a kind of mutual method of flash plug-in unit of client and the page script of service end IE browser.
Background technology
In prior art, have a kind of method that the Flash video of playing in service end IE browser is redirected to client terminal playing under VDI environment, but the method only can be redirected part Flash video (only by the flashVars attribute of Flash object, can determine the video of download location).For the Flash video in some video website, during broadcasting, webpage Flash object (Flash video player) need to call JavaScript page script, or needs JavaScript page script to call the correctly broadcasting of function that Flash object is derived.For this type of video, if use aforesaid reorientation method, inevitable failure (because the script that now will call is not in client and in service end) during client Flash object reference JavaScript page script, also inevitable failure (because now Flash object has been redirected to client) when JavaScript page script calls Flash object derivative function simultaneously, thus video playback failure caused.
Summary of the invention
The technical problem to be solved in the present invention, be to provide a kind of flash plug-in unit of client and the page script of service end IE browser mutual method, realized two-way the calling of service end page script and client terminal local Flash object method, make the Flash object of client can be correctly with service end webpage in JavaScript script carry out alternately.
The present invention is achieved in that a kind of flash plug-in unit of client and the mutual method of the page script of service end IE browser, in service end, defines a service end BHO plug-in unit, in client definition one, is redirected plug-in unit;
Described service end BHO plug-in unit is used for: by the CallFunction function of Hook technical intercept client Flash plug-in unit, described CallFunction function, for providing to webpage the function of calling Flash object intrinsic function, obtains the function information of this function and passes to client; Described redirected plug-in unit is used for: the packing to client Flash plug-in unit, and pass-along message between client browser and Flash plug-in unit, intercepts Flash plug-in unit to page script call request simultaneously and is passed to service end BHO plug-in unit;
When page script calls the function of Flash object derivation, can call the CallFunction function of client Flash plug-in unit, now service end BHO plug-in unit is tackled this function, and function parameter is passed to described redirected plug-in unit; Be redirected plug-in unit and carry out the CallFunction function of client Flash plug-in unit and also pass result back described service end BHO plug-in unit, realize service end and call to the page script of client;
When client Flash plug-in unit invoking web page script, being redirected plug-in unit packs Flash plug-in unit, and trigger the page script on described service end BHO plug-in unit invoking web page, and and pass result back redirected plug-in unit, realize client and call to the page script of service end.
Tool of the present invention has the following advantages: service end page script of the present invention and client terminal local Flash object method can carry out two-way calling, so not only can determine that the video of download location is redirected to the flashVars attribute by Flash object, also can need to call JavaScript page script by webpage Flash object when playing, or the function that needs JavaScript page script to call Flash object to derive could be redirected by the correct video of playing; Thereby make Flash redirecting technique range of application expand all Flash videos.
Accompanying drawing explanation
Fig. 1 is the inventive method schematic flow sheet.
Embodiment
Refer to shown in Fig. 1, the mutual method of page script of the flash plug-in unit that the present invention is a kind of client and service end IE browser, defines a service end BHO plug-in unit in service end, in client definition one, is redirected plug-in unit;
Described service end BHO plug-in unit is used for: by the CallFunction function of Hook technical intercept client Flash plug-in unit, described CallFunction function, for providing to webpage the function (this CallFunction function is the function that Flash ActiveX plug-in unit is derived) of calling Flash object intrinsic function, obtains the function information of this function and passes to client; Described redirected plug-in unit is used for: the packing to client Flash plug-in unit, and pass-along message between client browser and Flash plug-in unit, intercepts Flash plug-in unit to page script call request simultaneously and is passed to service end BHO plug-in unit;
Running client browser also loads described redirected plug-in unit, and redirected plug-in unit reloads the Flash plug-in unit of client, when browser calls, be redirected the NP_Initialize function of plug-in unit (NP_Initialize function is NPAPI plug-in unit end standard derivative function, for the overall initialization of plug-in unit) and/or NP_GetEntryPoints function (NP_GetEntryPoints function is NPAPI plug-in unit end standard derivative function, be used for providing plug-in unit entrance function to called side, only at windows platform, exist) time, redirected plug-in unit calls the respective function of Flash plug-in unit again, and by the NPN_Evaluate function (function that NPN_Evaluate function is provided by browser of the red fox Firefox plug-in unit arranging in the redirected plug-in unit of evaluate function pointer sensing in NP_Initialize function, be used for carrying out appointment script), so do be for: when the NPAPI Flash plug-in unit invoking web page script, redirected plug-in unit can obtain the function information that will call, and passes to service end BHO plug-in unit.
When page script calls the function of Flash object derivation, can call the CallFunction function of client Flash plug-in unit, now service end BHO plug-in unit is tackled this function, and function parameter is passed to described redirected plug-in unit; Be redirected plug-in unit and carry out the CallFunction function of client Flash plug-in unit and also pass result back described service end BHO plug-in unit, realize service end and call to the page script of client;
When client Flash plug-in unit (supporting the Flash plug-in unit of the browser of NPAPI plug-in unit for Firefox etc.) invoking web page script, being redirected plug-in unit packs Flash plug-in unit, and trigger the page script on described service end BHO plug-in unit invoking web page, and pass result back redirected plug-in unit, realize client and call to the page script of service end.
Wherein, described when client Flash plug-in unit invoking web page script, being redirected plug-in unit packs Flash plug-in unit, and trigger the page script on described service end BHO plug-in unit invoking web page, and pass result back redirected plug-in unit, realizing client calls to the page script of service end, be specially: when client Flash plug-in unit invoking web page script, NPN_Evaluate function in redirected plug-in unit will be called, and (why NPN_Evaluate function can be called, due to above-mentioned, evaluate function pointer in NP_Initialize function to be pointed to and is redirected the NPN_Evaluate function arranging in plug-in unit), redirected plug-in unit passes to service end BHO plug-in unit by this function parameter, BHO plug-in unit is after receiving the parameter that redirected plug-in unit transmits, get_Document function by IWebBrowser2 interface (IWebBrowser2 interface realized by InternetExplorer example for controlling the interface of WebBrowser control) obtains IHTMLDocument2 type object, then the get_parentWindow function by IHTMLDocument2 interface (IHTMLDocument2 interface is for controlling the interface of html document) obtains IHTMLWindow2 type object, finally by the page script on execScript function (execScript function is used for the carrying out appointment script) invoking web page of IHTMLWindow2 interface (IHTMLWindow2 interface is for controlling the interface of HTML window object), and pass function return value back redirected plug-in unit, thereby realizing client calls to the page script of service end.
In a word, service end page script of the present invention and client terminal local Flash object method can carry out two-way calling, so not only can determine that the video of download location is redirected to the flashVars attribute by Flash object, also can need to call JavaScript page script by webpage Flash object when playing, or the function that needs JavaScript page script to call Flash object to derive could be redirected by the correct video of playing; Thereby make Flash redirecting technique range of application expand all Flash videos.
The foregoing is only preferred embodiment of the present invention, all equalizations of doing according to the present patent application the scope of the claims change and modify, and all should belong to covering scope of the present invention.

Claims (3)

1. the mutual method of the page script of the flash plug-in unit of client and service end IE browser, is characterized in that: in service end, define a service end BHO plug-in unit, in client definition one, be redirected plug-in unit;
Described service end BHO plug-in unit is used for: by the CallFunction function of Hook technical intercept client Flash plug-in unit, described CallFunction function, for providing to webpage the function of calling Flash object intrinsic function, obtains the function information of this function and passes to client; Described redirected plug-in unit is used for: the packing to client Flash plug-in unit, and pass-along message between client browser and Flash plug-in unit, intercepts Flash plug-in unit to page script call request simultaneously and is passed to service end BHO plug-in unit;
When page script calls the function of Flash object derivation, can call the CallFunction function of client Flash plug-in unit, now service end BHO plug-in unit is tackled this function, and function parameter is passed to described redirected plug-in unit; Be redirected plug-in unit and carry out the CallFunction function of client Flash plug-in unit and also pass result back described service end BHO plug-in unit, realize service end and call to the page script of client;
When client Flash plug-in unit invoking web page script, being redirected plug-in unit packs Flash plug-in unit, and trigger the page script on described service end BHO plug-in unit invoking web page, and and pass result back redirected plug-in unit, realize client and call to the page script of service end.
2. the mutual method of the page script of the flash plug-in unit of client according to claim 1 and service end IE browser, is characterized in that:
Call the function or client Flash plug-in unit invoking web page script of Flash object derivation at execution page script before, also further comprise: running client browser also loads described redirected plug-in unit, and redirected plug-in unit reloads the Flash plug-in unit of client; When calling, browser is redirected the overall initialization NP_Initialize function of plug-in unit and/or when the NP_GetEntryPoints function of plug-in unit entrance function to called side is provided, redirected plug-in unit calls the respective function of Flash plug-in unit again, and evaluate function pointer in NP_Initialize function point to is redirected the red fox Firefox plug-in unit that arranges in plug-in unit for carrying out the NPN_Evaluate function of script.
3. the mutual method of the page script of the flash plug-in unit of client according to claim 2 and service end IE browser, is characterized in that:
Described when client Flash plug-in unit invoking web page script, being redirected plug-in unit packs Flash plug-in unit, and trigger the page script on described service end BHO plug-in unit invoking web page, and pass result back redirected plug-in unit, realizing client calls to the page script of service end, be specially: when client Flash plug-in unit invoking web page script, the NPN_Evaluate function being redirected in plug-in unit will be called, and redirected plug-in unit passes to service end BHO plug-in unit by this function parameter, BHO plug-in unit is after receiving the parameter that redirected plug-in unit transmits, by obtaining IHTMLDocument2 type object for controlling the get_Document function of the IWebBrowser2 interface of IE browser WebBrowser control, then by obtaining IHTMLWindow2 type object for controlling the get_parentWindow function of the IHTMLDocument2 interface of html document, finally by for control HTML window object IHTMLWindow2 interface for carrying out the page script on the execScript function call webpage of script, and pass function return value back redirected plug-in unit, thereby realizing client calls to the page script of service end.
CN201310475791.9A 2013-10-12 2013-10-12 The method that the flash plug-in unit of client is mutual with the page script of service end IE browser Active CN103544067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310475791.9A CN103544067B (en) 2013-10-12 2013-10-12 The method that the flash plug-in unit of client is mutual with the page script of service end IE browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310475791.9A CN103544067B (en) 2013-10-12 2013-10-12 The method that the flash plug-in unit of client is mutual with the page script of service end IE browser

Publications (2)

Publication Number Publication Date
CN103544067A true CN103544067A (en) 2014-01-29
CN103544067B CN103544067B (en) 2016-08-24

Family

ID=49967542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310475791.9A Active CN103544067B (en) 2013-10-12 2013-10-12 The method that the flash plug-in unit of client is mutual with the page script of service end IE browser

Country Status (1)

Country Link
CN (1) CN103544067B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204883A (en) * 2014-06-26 2015-12-30 优视科技有限公司 Plug-in loading processing method and device
CN106874408A (en) * 2017-01-19 2017-06-20 杭州云灵科技有限公司 A kind of html information input methods for supporting various browser kernels
CN107818020A (en) * 2016-09-12 2018-03-20 平安科技(深圳)有限公司 Parameter transfer method and device
CN110134450A (en) * 2018-02-08 2019-08-16 中兴通讯股份有限公司 A kind of video reorientation method, device and computer readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230334108A1 (en) * 2022-04-14 2023-10-19 Robert Lewis Michaels, Jr. Method and System for Virtualization of On-Line Navigation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014479A1 (en) * 2001-07-12 2003-01-16 Shafron Thomas Joshua Method and system for enabling a script on a first computer to communicate and exchange data with a script on a second computer over a network
CN1991827A (en) * 2005-12-30 2007-07-04 腾讯科技(深圳)有限公司 Method and system for webpage development
US20110185298A1 (en) * 2001-05-08 2011-07-28 Sondre Skatter Method and apparatus for a distributable globe graphical object
CN102436507A (en) * 2011-12-28 2012-05-02 奇智软件(北京)有限公司 Method and device for browsing web pages
CN102761603A (en) * 2012-06-07 2012-10-31 福建升腾资讯有限公司 Webpage flash video redirection method in VDI environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110185298A1 (en) * 2001-05-08 2011-07-28 Sondre Skatter Method and apparatus for a distributable globe graphical object
US20030014479A1 (en) * 2001-07-12 2003-01-16 Shafron Thomas Joshua Method and system for enabling a script on a first computer to communicate and exchange data with a script on a second computer over a network
CN1991827A (en) * 2005-12-30 2007-07-04 腾讯科技(深圳)有限公司 Method and system for webpage development
CN102436507A (en) * 2011-12-28 2012-05-02 奇智软件(北京)有限公司 Method and device for browsing web pages
CN102761603A (en) * 2012-06-07 2012-10-31 福建升腾资讯有限公司 Webpage flash video redirection method in VDI environment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204883A (en) * 2014-06-26 2015-12-30 优视科技有限公司 Plug-in loading processing method and device
CN105204883B (en) * 2014-06-26 2019-03-15 优视科技有限公司 A kind of plug-in unit loading processing method and device
CN107818020A (en) * 2016-09-12 2018-03-20 平安科技(深圳)有限公司 Parameter transfer method and device
CN106874408A (en) * 2017-01-19 2017-06-20 杭州云灵科技有限公司 A kind of html information input methods for supporting various browser kernels
CN110134450A (en) * 2018-02-08 2019-08-16 中兴通讯股份有限公司 A kind of video reorientation method, device and computer readable storage medium
CN110134450B (en) * 2018-02-08 2021-08-10 中兴通讯股份有限公司 Video redirection method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN103544067B (en) 2016-08-24

Similar Documents

Publication Publication Date Title
CN103544067A (en) Method for interaction between flash plug-in of client and webpage script of server IE (internet explorer)
CN104767775B (en) Web application information push method and system
US20140310392A1 (en) Method and apparatus for processing composite web transactions
KR101720071B1 (en) Webpages with onboard hardware functions
CN102739663A (en) Detection method and scanning engine of web pages
CN104301443A (en) Method and system for calling end capacity ports on web page
CN102624891B (en) Method for switching kernel of browser and corresponding browser
CN103207863B (en) Page cross-domain alternation method and terminal
CN105472035A (en) File transmission method and device
CN103970760B (en) A kind of web-page requests processing method and processing device
CN105794152B (en) The system and method and device of the interaction based on web are carried out with building automatic
CN103533428A (en) Method for releasing intelligent terminal webpage video to television for broadcasting and intelligent terminal
CN103997452A (en) Information sharing method and apparatus among multiple platforms
CN103309660A (en) Mobile application cross-platform development method
CN107124430B (en) Page hijacking monitoring method, device, system and storage medium
CN104834588B (en) The method and apparatus for detecting resident formula cross site scripting loophole
CN104954894A (en) Video traffic guiding method and device as well as electronic equipment
CN106487662B (en) Information sharing method and device
CN103607454B (en) The method that android system browser arranges privately owned proxy server
CN105677688B (en) Page data loading method and system
US20140245124A1 (en) System and method thereof for browser agnostic extension models
CN107231271A (en) A kind of detection method and device of shared verification
CN105142143A (en) Verification method and system thereof
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
US9348932B2 (en) Method and apparatus for redirecting webpage requests to appropriate equivalents

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant