Invention content
In order to solve the above-mentioned technical problem above-mentioned technical problem or is at least partly solved, this application provides one kind to broadcast
Put device control hidden method and device.
In view of this, in a first aspect, this application provides a kind of player control hidden method, for being broadcast in browser
The video playing interface put is controlled, the method includes:
When detecting that the requested page of user has video tab, obtain preset control and block script;
Determine player script corresponding with the video tab in the page;
Video playing interface corresponding with the video tab, institute are generated on the page according to the player script
It states and shows control on video playing interface;
Script is blocked according to the preset control, barrier bed, the position of the barrier bed are generated on the video playing interface
At the top of the control at the video playing interface.
Optionally, include control script in the player script,
The method further includes:
Determine the position of control script described in the player script;
The preset control is blocked into script and is added to position corresponding with the control script in the player script;
The preset control is set to block priority of the priority higher than the control script of script.
Optionally, it is described script is blocked on the video playing interface according to the preset control to generate barrier bed, it wraps
It includes:
It is searched and the relevant script of control in the player script;
When having multiple with the relevant script of control, choose the higher preset control of priority and block script;
It is generating video playing interface corresponding with the video tab simultaneously, life is rendered on the video playing interface
Into barrier bed.
Optionally, the method further includes:
Obtain the setting state that control in the browser blocks;
Judge whether the setting state is occlusion state;
When the setting state is occlusion state, execution is described to block script in the video according to the preset control
The step of barrier bed is generated on broadcast interface.
Second aspect, the application also provides a kind of player control hidden method, for the video played in browser
Broadcast interface is controlled, the method includes:
When detecting that the requested page of user has video tab, obtain preset control and block script;
Determine player script corresponding with the video tab in the page;Include control in the player script
Part script,
Determine the position of control script described in the player script;
The control script is deleted from the player script;
The preset control is blocked into script and is added to the corresponding position of the control script;
Video playing corresponding with the video tab is generated on the page according to player script described after modification
Interface does not show control on the video playing interface.
The third aspect, the application also provides a kind of player control concealing device, for the video played in browser
Broadcast interface is controlled, and described device includes:
Script acquiring unit, for when detecting that the requested page of user has video tab, obtaining preset control
Block script;
Determination unit, for determining player script corresponding with the video tab in the page;
Interface generation unit, it is corresponding with the video tab for being generated on the page according to the player script
Video playing interface, show control on the video playing interface;
Barrier bed generation unit generates screening for blocking script according to the preset control on the video playing interface
Barrier, the position of the barrier bed are located at the top of the control at the video playing interface.
Optionally, include control script in the player script,
Described device further includes:
Location determination subelement, for determining the position of control script described in the player script;
Script inject subelement, for by the preset control block script be added in the player script with it is described
The corresponding position of control script;
Priority sets subelement, and the priority for the preset control to be set to block script is higher than the control script
Priority.
Optionally, the barrier bed generation unit, including:
Script searches subelement, for being searched and the relevant script of control in the player script;
Script chooses subelement, when having multiple with the relevant script of control, chooses the higher preset control of priority and hides
Keep off script;
Subelement is rendered, for generating video playing interface corresponding with the video tab simultaneously, in the video
Generation barrier bed is rendered on broadcast interface.
Optionally, described device further includes:
State acquiring unit, for obtaining the setting state that control in the browser blocks;
Condition adjudgement unit, for judging whether the setting state is occlusion state;
The barrier bed generation unit is additionally operable to, when the setting state is occlusion state, perform described in the basis
Preset control block script on the video playing interface generate barrier bed the step of.
Fourth aspect, the application also provides a kind of player control concealing device, for the video played in browser
Broadcast interface is controlled, and described device includes:
Script acquiring unit, for when detecting that the requested page of user has video tab, obtaining preset control
Block script;
Script determination unit, for determining player script corresponding with the video tab in the page;It is described to broadcast
It puts and includes control script in device script,
Position determination unit, for determining the position of control script described in the player script;
Unit is deleted, for the control script to be deleted from the player script;
Unit is added in, the corresponding position of the control script is added to for the preset control to be blocked script;
Interface generation unit, for being generated on the page and the video mark according to player script described after modification
Corresponding video playing interface is signed, control is not shown on the video playing interface.
Above-mentioned technical proposal provided by the embodiments of the present application has the following advantages that compared with prior art:
This method provided in the embodiment of the present application when detecting that the requested page of user has video tab, obtains
Preset control is taken to block script;Determine player script corresponding with the video tab in the page;According to the broadcasting
Device script generates video playing interface corresponding with the video tab on the page, is shown on the video playing interface
There is control;Script is blocked according to the preset control, barrier bed, the position of the barrier bed are generated on the video playing interface
At the top of the control at the video playing interface.
This method in the application, can be in the page of browser when in broadcasting, some do not need to the video of user's operation
Before generating video playing interface, obtain the preset control write in advance and block script, then when rendering, utilize player foot
This generation player interface, and script is blocked on the video playing interface according to the preset control and generates barrier bed,
Can be so that the control on player be blocked, that is, player interface does not show control.
User in this way is when watching video, since the control in video playing interface is invisible, so just can not be to video
It is manipulated, and then is avoided due to mistaken touch control, and video playing is caused to interrupt or occur the problem of other mistakes so that
User experience effect improves.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present application are clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical solution in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is
The part of the embodiment of the application, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's all other embodiments obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of player control hidden method, and this method is used to regard to what is played in browser
Frequency broadcast interface is controlled.This method can be applied to intelligent terminal, such as:Mobile phone, tablet computer etc..
Fig. 1 is the flow diagram of player control hidden method provided by the embodiments of the present application.
As shown in Figure 1, this method may comprise steps of.
S101 when detecting that the requested page of user has video tab, obtains preset control and blocks script.
Preset control blocks script, is that the developer of browser is directed to the script that current browser writes in advance, this
The logic of a script is not show control on to video playing interface.
In the embodiment of the present application, preset control, which blocks script, can be previously implanted browser local, in addition, default control
Part blocks script and may be located in the remote server of browser, when user setting needs to block control namely
When unlatching control blocks function, just download obtains the preset control and blocks script from remote server.
S102 determines player script corresponding with the video tab in the page.
When the page for being loaded with video, the code in the code segment of the page has very much, wherein can include video mark
Label and player script corresponding with video tab, the effect of player script be when loading webpage, can be on webpage
Create player plays interface.
S103 generates video playing circle corresponding with the video tab on the page according to the player script
Face.
After the script for getting player, it is possible to video playing circle corresponding with video tab is generated on the page
Face.
Under normal conditions, the player script of different video website is all respectively to set, and pattern is all different, but in order to
Convenient for control, it is generally the case that control is all shown on the video playing interface, control can include:Broadcasting/pause control
Part, skip forward/back control, volume adjustment control, brightness regulation control and setting control etc., for number of site, control is also
It may include barrage control etc..
S104 blocks script on the video playing interface according to the preset control and generates barrier bed, described to block
The position of layer is located at the top of the control at the video playing interface.
After video playing interface is generated, script can be blocked according to the control write in advance on the video playing interface
Generate barrier bed.
This method provided in the embodiment of the present application when detecting that the requested page of user has video tab, obtains
Preset control is taken to block script;Determine player script corresponding with the video tab in the page;According to the broadcasting
Device script generates video playing interface corresponding with the video tab on the page, is shown on the video playing interface
There is control;Script is blocked according to the preset control, barrier bed, the position of the barrier bed are generated on the video playing interface
At the top of the control at the video playing interface.
This method in the application, can be in the page of browser when in broadcasting, some do not need to the video of user's operation
Before generating video playing interface, obtain the preset control write in advance and block script, then when rendering, utilize player foot
This generation player interface, and script is blocked on the video playing interface according to the preset control and generates barrier bed,
Can be so that the control on player be blocked, that is, player interface does not show control.
User in this way is when watching video, since the control in video playing interface is invisible, so just can not be to video
It is manipulated, and then is avoided due to mistaken touch control, and video playing is caused to interrupt or occur the problem of other mistakes so that
User experience effect improves.
In the application one embodiment, include control script in player script, this method can also include with
Lower step.
Determine the position of control script described in the player script.
The preset control is blocked into script and is added to position corresponding with the control script in the player script.
The preset control is set to block priority of the priority higher than the control script of script.
In the embodiment of the present application, preset control can be blocked to script to be injected into player script, and by setting
The mode of priority is put, when generating video playing interface to rendering, according to priority height, the preset control is only read and hides
Script is kept off, in this way, abovementioned steps S103 and step S104, can be carried out at the same time.
Therefore, on the basis of previous embodiment, abovementioned steps S104 may comprise steps of.
It is searched and the relevant script of control in the player script;
When having multiple with the relevant script of control, choose the higher preset control of priority and block script;
It is generating video playing interface corresponding with the video tab simultaneously, life is rendered on the video playing interface
Into barrier bed.
In another embodiment of the application, this method may also comprise the following steps:.
Obtain the setting state that control in the browser blocks;
Judge whether the setting state is occlusion state;
When the setting state is occlusion state, execution is described to block script in the video according to the preset control
The step of barrier bed is generated on broadcast interface.
In the setting interface of browser, there is control to block setting switch, and then in this embodiment it is possible to first obtain
When setting state is set as occlusion state by the selection of the setting state that control blocks, only user, abovementioned steps S101 is just carried out,
Script is blocked from locally or from remote server preset control is obtained.
The application also provides a kind of player control hidden method, for the video playing interface played in browser into
Row control, this method include the following steps:
S201 when detecting that the requested page of user has video tab, obtains preset control and blocks script;
S202 determines player script corresponding with the video tab in the page;It is wrapped in the player script
Containing control script,
S203 determines the position of control script described in the player script;
S204 deletes the control script from the player script;
The preset control is blocked script and is added to the corresponding position of the control script by S205;
S206 generates video corresponding with the video tab on the page according to player script described after modification
Broadcast interface does not show control on the video playing interface.
This method provided by the embodiments of the present application compared with embodiment illustrated in fig. 1, generates video playing interface in the page
Before, just the control script in player script is replaced in advance, original script control is replaced with preset control hides
Script is kept off, in this way while video playing interface is subsequently generated, directly control is blocked on video playing interface so that regard
Control is not shown on frequency broadcast interface.
The application also provides a kind of player control concealing device, for the video playing interface played in browser into
Row control, as shown in Fig. 2, the device includes:
Script acquiring unit 11, for when detecting that the requested page of user has video tab, obtaining default control
Part blocks script;
Determination unit 12, for determining player script corresponding with the video tab in the page;
Interface generation unit 13, for being generated on the page and the video tab pair according to the player script
The video playing interface answered shows control on the video playing interface;
Barrier bed generation unit 14 generates for blocking script according to the preset control on the video playing interface
Barrier bed, the position of the barrier bed are located at the top of the control at the video playing interface.
In the application one embodiment, include control script in the player script, described device further includes:
Location determination subelement, for determining the position of control script described in the player script;
Script inject subelement, for by the preset control block script be added in the player script with it is described
The corresponding position of control script;
Priority sets subelement, and the priority for the preset control to be set to block script is higher than the control script
Priority.
In the application one embodiment, the barrier bed generation unit, including:
Script searches subelement, for being searched and the relevant script of control in the player script;
Script chooses subelement, when having multiple with the relevant script of control, chooses the higher preset control of priority and hides
Keep off script;
Subelement is rendered, for generating video playing interface corresponding with the video tab simultaneously, in the video
Generation barrier bed is rendered on broadcast interface.
The application also provides a kind of player control concealing device, for the video playing interface played in browser into
Row control, the device include:
Script acquiring unit, for when detecting that the requested page of user has video tab, obtaining preset control
Block script;
Script determination unit, for determining player script corresponding with the video tab in the page;It is described to broadcast
It puts and includes control script in device script,
Position determination unit, for determining the position of control script described in the player script;
Unit is deleted, for the control script to be deleted from the player script;
Unit is added in, the corresponding position of the control script is added to for the preset control to be blocked script;
Interface generation unit, for being generated on the page and the video mark according to player script described after modification
Corresponding video playing interface is signed, control is not shown on the video playing interface.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit is realized can in the same or multiple software and or hardware during invention.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for device or
For system embodiment, since it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to method
The part explanation of embodiment.Apparatus and system embodiment described above is only schematical, wherein the conduct
The unit that separating component illustrates may or may not be it is physically separate, the component shown as unit can be or
Person may not be physical unit, you can be located at a place or can also be distributed in multiple network element.It can root
Factually border needs to select some or all of module therein realize the purpose of this embodiment scheme.Ordinary skill
Personnel are without creative efforts, you can to understand and implement.
It is understood that the present invention can be used in numerous general or special purpose computing system environments or configuration.Such as:It is a
People's computer, server computer, handheld device or portable device, laptop device, multicomputer system, based on microprocessor
The system of device, set top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer, including to take up an official post
Distributed computing environment of what system or equipment etc..
The present invention can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, group
Part, data structure etc..The present invention can also be put into practice in a distributed computing environment, in these distributed computing environment, by
Task is performed and connected remote processing devices by communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage device.
It should be noted that herein, the relational terms of such as " first " and " second " or the like are used merely to one
A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it
Between there are any actual relationship or orders.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Cover non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only include those
Element, but also including other elements that are not explicitly listed or further include as this process, method, article or set
Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
Also there are other identical elements in the process, method, article or apparatus that includes the element.
The above is only the specific embodiment of the present invention, is made skilled artisans appreciate that or realizing this hair
It is bright.A variety of modifications of these embodiments will be apparent to one skilled in the art, it is as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and apllied principle and features of novelty phase one herein
The most wide range caused.