CN107172500A - Method and device for playing videos in webpage - Google Patents
Method and device for playing videos in webpage Download PDFInfo
- Publication number
- CN107172500A CN107172500A CN201710492292.9A CN201710492292A CN107172500A CN 107172500 A CN107172500 A CN 107172500A CN 201710492292 A CN201710492292 A CN 201710492292A CN 107172500 A CN107172500 A CN 107172500A
- Authority
- CN
- China
- Prior art keywords
- video
- video control
- webpage
- display area
- area
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4782—Web browsing, e.g. WebTV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/835—Generation of protective data, e.g. certificates
- H04N21/8355—Generation of protective data, e.g. certificates involving usage data, e.g. number of copies or viewings allowed
- H04N21/83555—Generation of protective data, e.g. certificates involving usage data, e.g. number of copies or viewings allowed using a structured language for describing usage rules of the content, e.g. REL
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8543—Content authoring using a description language, e.g. Multimedia and Hypermedia information coding Expert Group [MHEG], eXtensible Markup Language [XML]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- User Interface Of Digital Computer (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method and a device for playing videos in a webpage, wherein the method comprises the following steps: when the positioning type of the video control in the webpage is fixed relative to the webpage, judging whether the video area of the video control is completely displayed on the terminal display area or not according to the position information of the video control on the terminal display area; if not, the positioning type and the display layer attribute are stored, the positioning type of the video control is modified to be fixed relative to the terminal display area, the display layer attribute of the video control is modified to be displayed on the uppermost layer, the position information of the video control is modified to be preset position information, and the preset position information is the position information of the video area of the video control when the video area is positioned at the top of the terminal display area, so that the suspension play of the video control is realized, the video play is kept smooth and is not paused when the normal play state and the suspension play state are switched, the video play effect is improved, and the watching experience of a terminal user is better.
Description
Technical field
The present invention relates to video broadcasting method and device in web browser technical field, more particularly to a kind of webpage.
Background technology
At present, the terminal device such as mobile phone etc generally all has video playback capability, and user can be by terminal device
The video player of installation plays video.In a browser, in order to meet user while watching video and browsed web content
Demand, can provide the function that video suspends broadcasting.
Implementation is played in current video suspension mainly two classes, and a class is to reuse original video playback control;It is another
Class is to replicate a video playback control.The scheme for reusing original video playback control is mainly:Stop playing video, from current
Video is removed in view framework, carry video recovers to play video to different mount points again.But in such scheme,
It is difficult to keep video playback smooth when between normal playing status and suspension broadcast state switching, video playback has pause, influences
Video display effect, influences the viewing experience of terminal user.
The content of the invention
It is contemplated that at least solving one of technical problem in correlation technique to a certain extent.
Therefore, first purpose of the present invention is to propose video broadcasting method in a kind of webpage, for solving existing skill
The problem of video web page result of broadcast is poor in art.
Second object of the present invention is to propose video play device in a kind of webpage.
Third object of the present invention is to propose video play device in another webpage.
Fourth object of the present invention is to propose a kind of non-transitorycomputer readable storage medium.
The 5th purpose of the present invention is to propose a kind of computer program product.
For up to above-mentioned purpose, first aspect present invention embodiment proposes video broadcasting method in a kind of webpage, including:
Obtain the positioning properties and display layer bit attribute of video control in the webpage shown in terminal, the positioning properties
Including:The positional information of align_type and the video control on terminal display area;
When the align_type is that relative webpage is fixed, according to position of the video control on terminal display area
Information, judges whether the video area of the video control is all shown on the terminal display area;
If the video area of the video control is not shown in all on the terminal display area, to the positioning class
Type and the display layer bit attribute are stored;
The align_type of the video control is revised as into relative termination viewing area to fix, by the aobvious of the video control
Show that a layer bit attribute is revised as the superiors and shown, the positional information of the video control is revised as preset position information, it is described pre-
If positional information is located at positional information when at the top of terminal display area for the video area of the video control.
Video broadcasting method in the webpage of the embodiment of the present invention, by webpage the align_type of video control be relative
When webpage is fixed, according to positional information of the video control on terminal display area, judge video control video area whether
All it is shown on terminal display area;If the video area of video control is not shown on terminal display area all, right
Align_type and display layer bit attribute are stored, and the align_type of video control is revised as into relative termination viewing area
It is fixed, the display layer bit attribute of video control is revised as the superiors and shown, the positional information of video control is revised as presetting
Positional information, preset position information is located at positional information when at the top of terminal display area for the video area of video control, from
And realize that the suspension of video control is played, and video playback is kept when switching between normal playing status and suspension broadcast state
Smoothness, does not pause, and improves video display effect, and the viewing experience of terminal user is preferable.
For up to above-mentioned purpose, second aspect of the present invention embodiment proposes video play device in a kind of webpage, including:
The positioning properties of video control and display layer position in first acquisition module, the webpage shown for obtaining in terminal
Attribute, the positioning properties include:The positional information of align_type and the video control on terminal display area;
First judge module, for when the align_type is that relative webpage is fixed, according to the video control at end
The positional information on viewing area is held, judges whether the video area of the video control is all shown in the terminal viewing area
On domain;
Memory module, for not being shown in the terminal display area all in the video area of the video control
When, the align_type and the display layer bit attribute are stored;
First processing module, is fixed for the align_type of the video control to be revised as into relative termination viewing area,
The display layer bit attribute of the video control is revised as into the superiors to show, the positional information of the video control is revised as pre-
If positional information, the preset position information is located at position when at the top of terminal display area for the video area of the video control
Confidence ceases.
Video play device in the webpage of the embodiment of the present invention, by webpage the align_type of video control be relative
When webpage is fixed, according to positional information of the video control on terminal display area, judge video control video area whether
All it is shown on terminal display area;If the video area of video control is not shown on terminal display area all, right
Align_type and display layer bit attribute are stored, and the align_type of video control is revised as into relative termination viewing area
It is fixed, the display layer bit attribute of video control is revised as the superiors and shown, the positional information of video control is revised as presetting
Positional information, preset position information is located at positional information when at the top of terminal display area for the video area of video control, from
And realize that the suspension of video control is played, and video playback is kept when switching between normal playing status and suspension broadcast state
Smoothness, does not pause, and improves video display effect, and the viewing experience of terminal user is preferable.
For up to above-mentioned purpose, third aspect present invention embodiment proposes video play device in another webpage, including
Memory, processor and storage are on a memory and the computer program that can run on a processor, it is characterised in that the place
Reason device realizes video broadcasting method in webpage as described above when performing described program.
To achieve these goals, fourth aspect present invention embodiment proposes a kind of computer-readable storage of non-transitory
Medium, when the instruction in the storage medium is executed by processor, realizes method as described above.
For up to above-mentioned purpose, fifth aspect present invention embodiment proposes a kind of computer program product, calculated when described
When instruction processing unit in machine program product is performed, video broadcasting method in a kind of webpage is performed, methods described includes:
Obtain the positioning properties and display layer bit attribute of video control in the webpage shown in terminal, the positioning properties
Including:The positional information of align_type and the video control on terminal display area;
When the align_type is that relative webpage is fixed, according to position of the video control on terminal display area
Information, judges whether the video area of the video control is all shown on the terminal display area;
If the video area of the video control is not shown in all on the terminal display area, to the positioning class
Type and the display layer bit attribute are stored;
The align_type of the video control is revised as into relative termination viewing area to fix, by the aobvious of the video control
Show that a layer bit attribute is revised as the superiors and shown, the positional information of the video control is revised as preset position information, it is described pre-
If positional information is located at positional information when at the top of terminal display area for the video area of the video control.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and be readily appreciated that, wherein:
Fig. 1 is the schematic flow sheet of video broadcasting method in a kind of webpage provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of video broadcasting method in another webpage provided in an embodiment of the present invention;
Fig. 3 is the structural representation of video play device in a kind of webpage provided in an embodiment of the present invention;
Fig. 4 is the structural representation of video play device in another webpage provided in an embodiment of the present invention;
Fig. 5 is the structural representation of video play device in another webpage provided in an embodiment of the present invention;
Fig. 6 is the structural representation of video play device in another webpage provided in an embodiment of the present invention.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to for explaining the present invention, and be not considered as limiting the invention.
Below with reference to the accompanying drawings video broadcasting method and device in the webpage of the embodiment of the present invention are described.
Fig. 1 is the schematic flow sheet of video broadcasting method in a kind of webpage provided in an embodiment of the present invention.As shown in figure 1,
Video broadcasting method comprises the following steps in the webpage:
S101, the positioning properties and display layer bit attribute for obtaining video control in the webpage shown in terminal, positioning category
Property includes:The positional information of align_type and video control on terminal display area.
The executive agent of video broadcasting method is video play device in webpage in the webpage that the present invention is provided, and is regarded in webpage
Frequency playing device is specifically as follows the browser installed on the client, or the corresponding background server of browser etc..Terminal
Such as can be mobile phone, PAD, computer.Browser for example can be, IE browser, Google's browser, apple browser,
Opera browser etc..
In the present embodiment, the align_type of video control can be:Fixed with respect to webpage or relative termination viewing area
It is fixed etc..Wherein, the align_type of video control can use the position attributes of corresponding HTML5 Video elements in webpage
To represent, the video control in webpage in corresponding HTML5 Video element representation webpages, position attributes belong to for positioning
Property.The display layer bit attribute of video control can be with the z-index attributes of corresponding HTML5 Video elements in webpage come table
Show.
It should be noted that when the video control in webpage is multiple, corresponding HTML5 Video elements one in webpage
As represent main video control in webpage, such as playing the acute control of movie or television.Modification positioning class is needed in the present invention
The video control of type and display layer bit attribute is generally the main video control in webpage.If desired align_type and display layer are changed
The video control of bit attribute is not the main video control in webpage, then as needed can also repair the main video control in webpage
It is changed to the video control.
In the present embodiment, positional information of the video control on terminal display area can typically use the video of video control
The coordinate at four angles in region is indicated.When the align_type of video control is that relative webpage is fixed, if browser is received
When webpage rolling instruction to terminal user etc. needs to stir the instruction of the current display position of webpage or mobile webpage, browser
Change the current display area of webpage, and change positional information of the video control on terminal display area, so that video control
Moved with the movement of webpage.
S102, when align_type is that relative webpage is fixed, believed according to position of the video control on terminal display area
Breath, judges whether the video area of video control is all shown on terminal display area.
In this step, video play device can specifically perform procedure below in webpage:It is relative webpage in align_type
When fixed, the positional information of terminal display area is obtained;By positional information and terminal of the video control on terminal display area
The positional information of viewing area is compared, and judges whether the video area of video control is all shown in terminal display area
On.It should be noted that terminal display area is specifically as follows viewing area of the webpage in terminal.
In the present embodiment, the positional information of terminal display area can use the positional information at four angles of terminal display area
It is indicated, positional information of the video control on terminal display area can also use the positional information at four angles of video control
It is indicated, the positional information of the positional information at four angles of video control and four angles of terminal display area is compared
It is right, it is possible to determine whether the video area of video control is all shown on terminal display area.
If the video area of S103, video control is not shown on terminal display area all, to align_type and
Display layer bit attribute is stored.
S104, the align_type of video control is revised as relative termination viewing area fixed, by the display of video control
Layer bit attribute is revised as the superiors and shown, the positional information of video control is revised as into preset position information, preset position information
For video control video area be located at terminal display area at the top of when positional information.
In the present embodiment, specifically, video play device specifically can be by corresponding HTML5 Video in webpage in webpage
The position attributes of element are changed to fixed from static, and set z-index attributes so that Video elements are suspended in webpage
Upper strata.Wherein, static represents that align_type is that relative webpage is fixed;Fixed represents that align_type is relative termination viewing area
Domain is fixed.
Video broadcasting method in the webpage of the embodiment of the present invention, by webpage the align_type of video control be relative
When webpage is fixed, according to positional information of the video control on terminal display area, judge video control video area whether
All it is shown on terminal display area;If the video area of video control is not shown on terminal display area all, right
Align_type and display layer bit attribute are stored, and the align_type of video control is revised as into relative termination viewing area
It is fixed, the display layer bit attribute of video control is revised as the superiors and shown, the positional information of video control is revised as presetting
Positional information, preset position information is located at positional information when at the top of terminal display area for the video area of video control, from
And realize that the suspension of video control is played, and video playback is kept when switching between normal playing status and suspension broadcast state
Smoothness, does not pause, and improves video display effect, and the viewing experience of terminal user is preferable.
Fig. 2 is the schematic flow sheet of video broadcasting method in another webpage provided in an embodiment of the present invention, such as Fig. 2 institutes
Show, on the basis of embodiment illustrated in fig. 1, after step 104, can also include:
S105, the current display position for obtaining webpage.
Wherein, the current display position of webpage is the position for the part web page area being currently displayed on terminal display area
Information.
S106, the current display position according to webpage, calculate and estimate position when video control is fixed with respect to webpage.
Wherein, estimation position of the video control on terminal display area when position is fixed for video control with respect to webpage is estimated
Put.Specifically, according to the current display position of webpage, the video control that can be calculated under relative webpage fixing situation is located at eventually
Which position of viewing area is held, is in terminal display area, or outside terminal display area.
Position is estimated when S107, webpage fixation relative according to video control, judges to be located at the video control for estimating position
Video area whether be all shown on terminal display area.
If S108, the video area for the video control for estimating position are all shown on terminal display area, by video
The align_type and display layer bit attribute of control are revised as corresponding storage value, and by video control on terminal display area
Positional information be revised as estimating the positional information of position.
If in addition, the video area for estimating the video control of position is not shown on terminal display area all, not entering
Row operation.
Video broadcasting method in the webpage of the embodiment of the present invention, by webpage the align_type of video control be relative
When webpage is fixed, according to positional information of the video control on terminal display area, judge video control video area whether
All it is shown on terminal display area;If the video area of video control is not shown on terminal display area all, right
Align_type and display layer bit attribute are stored, and the align_type of video control is revised as into relative termination viewing area
It is fixed, the display layer bit attribute of video control is revised as the superiors and shown, the positional information of video control is revised as presetting
Positional information, preset position information is located at positional information when at the top of terminal display area for the video area of video control;So
Calculate in real time afterwards and estimate position when video control is fixed with respect to webpage, in the video area positioned at the video control for estimating position
All when being shown in terminal display area, recover the original setting of align_type and display layer bit attribute, and by video control
Positional information on terminal display area is revised as estimating the positional information of position, so as to realize that the suspension of video control is broadcast
Video playback keeps smooth when putting, and switching between normal playing status and suspension broadcast state, does not pause, improves and regard
Frequency result of broadcast, the viewing experience of terminal user is preferable.
Fig. 3 is the structural representation of video play device in a kind of webpage provided in an embodiment of the present invention.As shown in figure 3,
Including:First acquisition module 31, the first judge module 32, memory module 33 and first processing module 34.
Wherein, in the first acquisition module 31, the webpage shown for obtaining in terminal the positioning properties of video control and
Display layer bit attribute, the positioning properties include:The position of align_type and the video control on terminal display area
Information;
First judge module 32, for when the align_type is that relative webpage is fixed, being existed according to the video control
Positional information on terminal display area, judges whether the video area of the video control is all shown in the terminal and shows
On region;
Memory module 33, for not being shown in the terminal display area all in the video area of the video control
When, the align_type and the display layer bit attribute are stored;
First processing module 34, consolidates for the align_type of the video control to be revised as into relative termination viewing area
It is fixed, the display layer bit attribute of the video control is revised as the superiors and shown, the positional information of the video control is changed
For preset position information, when the preset position information is located at the top of terminal display area for the video area of the video control
Positional information.
Video play device is specifically as follows the browser installed on the client in the webpage that the present invention is provided, or clear
Corresponding background server of device of looking at etc..Terminal is such as can be mobile phone, PAD, computer.Browser for example can be that IE is clear
Look at device, Google's browser, apple browser, opera browser etc..
In the present embodiment, the align_type of video control can be:Fixed with respect to webpage or relative termination viewing area
It is fixed etc..Wherein, the align_type of video control can use the position attributes of corresponding HTML5 Video elements in webpage
To represent, the video control in webpage in corresponding HTML5 Video element representation webpages, position attributes belong to for positioning
Property.The display layer bit attribute of video control can be with the z-index attributes of corresponding HTML5 Video elements in webpage come table
Show.
It should be noted that when the video control in webpage is multiple, corresponding HTML5 Video elements one in webpage
As represent main video control in webpage, such as playing the acute control of movie or television.Modification positioning class is needed in the present invention
The video control of type and display layer bit attribute is generally the main video control in webpage.If desired align_type and display layer are changed
The video control of bit attribute is not the main video control in webpage, then as needed can also repair the main video control in webpage
It is changed to the video control.
In the present embodiment, positional information of the video control on terminal display area can typically use the video of video control
The coordinate at four angles in region is indicated.When the align_type of video control is that relative webpage is fixed, if browser is received
When webpage rolling instruction to terminal user etc. needs to stir the instruction of the current display position of webpage or mobile webpage, browser
Change the current display area of webpage, and change positional information of the video control on terminal display area, so that video control
Moved with the movement of webpage.
Video play device in the webpage of the embodiment of the present invention, by webpage the align_type of video control be relative
When webpage is fixed, according to positional information of the video control on terminal display area, judge video control video area whether
All it is shown on terminal display area;If the video area of video control is not shown on terminal display area all, right
Align_type and display layer bit attribute are stored, and the align_type of video control is revised as into relative termination viewing area
It is fixed, the display layer bit attribute of video control is revised as the superiors and shown, the positional information of video control is revised as presetting
Positional information, preset position information is located at positional information when at the top of terminal display area for the video area of video control, from
And realize that the suspension of video control is played, and video playback is kept when switching between normal playing status and suspension broadcast state
Smoothness, does not pause, and improves video display effect, and the viewing experience of terminal user is preferable.
Further, with reference to Fig. 4 is referred to, on the basis of embodiment illustrated in fig. 3, described device can also include:The
Two acquisition modules 35, computing module 36, the second judge module 37 and Second processing module 38.
Wherein, the second acquisition module 35, the current display position for obtaining the webpage;
Computing module 36, for the current display position according to the webpage, calculates the video control solid with respect to webpage
Position is estimated in timing;
Second judge module 37, estimating position during for being fixed according to the video control with respect to webpage, judging to be located at
Whether the video area of the video control for estimating position is all shown on the terminal display area;
Second processing module 38, for being all shown in the end in the video area of the video control for estimating position
When holding on viewing area, the align_type of the video control and display layer bit attribute are revised as corresponding storage value, and
Positional information of the video control on terminal display area is revised as the positional information for estimating position.
Wherein, the current display position of webpage is the position for the part web page area being currently displayed on terminal display area
Information.Estimate estimated location of the video control on terminal display area when position is fixed for video control with respect to webpage.Specifically
Ground, according to the current display position of webpage, the video control that can be calculated under relative webpage fixing situation is shown positioned at terminal
Which position in region, is in terminal display area, or outside terminal display area.
Video play device in the webpage of the embodiment of the present invention, by webpage the align_type of video control be relative
When webpage is fixed, according to positional information of the video control on terminal display area, judge video control video area whether
All it is shown on terminal display area;If the video area of video control is not shown on terminal display area all, right
Align_type and display layer bit attribute are stored, and the align_type of video control is revised as into relative termination viewing area
It is fixed, the display layer bit attribute of video control is revised as the superiors and shown, the positional information of video control is revised as presetting
Positional information, preset position information is located at positional information when at the top of terminal display area for the video area of video control;So
Calculate in real time afterwards and estimate position when video control is fixed with respect to webpage, in the video area positioned at the video control for estimating position
All when being shown in terminal display area, recover the original setting of align_type and display layer bit attribute, and by video control
Positional information on terminal display area is revised as estimating the positional information of position, so as to realize that the suspension of video control is broadcast
Video playback keeps smooth when putting, and switching between normal playing status and suspension broadcast state, does not pause, improves and regard
Frequency result of broadcast, the viewing experience of terminal user is preferable.
Further, with reference to Fig. 5 is referred to, on the basis of embodiment illustrated in fig. 3, first judge module 32 includes:
Acquiring unit 321 and comparing unit 322.
Wherein, acquiring unit 321, for when the align_type is that relative webpage is fixed, obtaining terminal display area
Positional information;
Comparing unit 322, for positional information of the video control on terminal display area to be shown with the terminal
Show that the positional information in region is compared, judge whether the video area of the video control is all shown in the terminal and shows
On region.
It is further to note that the concrete function description of each module may be referred to shown in Fig. 1 to Fig. 2 in above-described embodiment
Embodiment, is no longer described in detail herein.
Fig. 6 is the structural representation of video play device in another webpage provided in an embodiment of the present invention.In the webpage
Video play device includes:
Memory 1001, processor 1002 and it is stored in the calculating that can be run on memory 1001 and on processor 1002
Machine program.
Processor 1002 realizes video broadcasting method in the webpage provided in above-described embodiment when performing described program.
Further, video play device also includes in webpage:
Communication interface 1003, for the communication between memory 1001 and processor 1002.
Memory 1001, for depositing the computer program that can be run on processor 1002.
Memory 1001 may include high-speed RAM memory, it is also possible to also including nonvolatile memory (non-
Volatile memory), for example, at least one magnetic disk storage.
Processor 1002, video broadcasting method in webpage described in above-described embodiment is realized for performing during described program.
If memory 1001, processor 1002 and the independent realization of communication interface 1003, communication interface 1003, memory
1001 and processor 1002 can be connected with each other by bus and complete mutual communication.The bus can be industrial standard
Architecture (Industry Standard Architecture, referred to as ISA) bus, external equipment interconnection
(Peripheral Component, referred to as PCI) bus or extended industry-standard architecture (Extended Industry
Standard Architecture, referred to as EISA) bus etc..The bus can be divided into address bus, data/address bus, control
Bus processed etc..For ease of representing, only represented in Fig. 6 with a thick line, it is not intended that only one bus or a type of
Bus.
Optionally, on implementing, if memory 1001, processor 1002 and communication interface 1003, are integrated in one
Realized on block chip, then memory 1001, processor 1002 and communication interface 1003 can complete mutual by internal interface
Communication.
Processor 1002 is probably a central processing unit (Central Processing Unit, referred to as CPU), or
Person is specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), or quilt
It is configured to implement one or more integrated circuits of the embodiment of the present invention.
The present embodiment also provides a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, its
It is characterised by, the program realizes video broadcasting method in webpage as described above when being executed by processor.
The present embodiment also provides a kind of computer program product, when the instruction processing unit in the computer program product is held
During row, video broadcasting method in a kind of webpage is performed, methods described includes:
Obtain the positioning properties and display layer bit attribute of video control in the webpage shown in terminal, the positioning properties
Including:The positional information of align_type and the video control on terminal display area;
When the align_type is that relative webpage is fixed, according to position of the video control on terminal display area
Information, judges whether the video area of the video control is all shown on the terminal display area;
If the video area of the video control is not shown in all on the terminal display area, to the positioning class
Type and the display layer bit attribute are stored;
The align_type of the video control is revised as into relative termination viewing area to fix, by the aobvious of the video control
Show that a layer bit attribute is revised as the superiors and shown, the positional information of the video control is revised as preset position information, it is described pre-
If positional information is located at positional information when at the top of terminal display area for the video area of the video control.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means to combine specific features, structure, material or the spy that the embodiment or example are described
Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not
Identical embodiment or example must be directed to.Moreover, specific features, structure, material or the feature of description can be with office
Combined in an appropriate manner in one or more embodiments or example.In addition, in the case of not conflicting, the skill of this area
Art personnel can be tied the not be the same as Example or the feature of example and non-be the same as Example or example described in this specification
Close and combine.
In addition, term " first ", " second " are only used for describing purpose, and it is not intended that indicating or implying relative importance
Or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can express or
Implicitly include at least one this feature.In the description of the invention, " multiple " are meant that at least two, such as two, three
It is individual etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include
Module, fragment or the portion of the code of one or more executable instructions for the step of realizing custom logic function or process
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not be by shown or discussion suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
Represent in flow charts or logic and/or step described otherwise above herein, for example, being considered use
In the order list for the executable instruction for realizing logic function, it may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction
The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass
Defeated program is for instruction execution system, device or equipment or the dress for combining these instruction execution systems, device or equipment and using
Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wirings
Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, can even is that can be in the paper of printing described program thereon or other are suitable for computer-readable medium
Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realized.Such as, if realized with hardware with another embodiment, following skill well known in the art can be used
Any one of art or their combination are realized:With the logic gates for realizing logic function to data-signal from
Scattered logic circuit, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can be compiled
Journey gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing module, can also
That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The integrated module is such as
Fruit is realized using in the form of software function module and as independent production marketing or in use, can also be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although having been shown and retouching above
Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the present invention
System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention
Type.
Claims (10)
1. video broadcasting method in a kind of webpage, it is characterised in that including:
Obtain the positioning properties and display layer bit attribute of video control in the webpage shown in terminal, the positioning properties bag
Include:The positional information of align_type and the video control on terminal display area;
When the align_type is that relative webpage is fixed, believed according to position of the video control on terminal display area
Breath, judges whether the video area of the video control is all shown on the terminal display area;
If the video area of the video control is not shown in all on the terminal display area, to the align_type with
And the display layer bit attribute is stored;
The align_type of the video control is revised as into relative termination viewing area to fix, by the display layer of the video control
Bit attribute is revised as the superiors and shown, the positional information of the video control is revised as into preset position information, the default position
Confidence breath is located at positional information when at the top of terminal display area for the video area of the video control.
2. according to the method described in claim 1, it is characterised in that the align_type by the video control is revised as phase
Terminal display area is fixed, the display layer bit attribute of the video control is revised as into the superiors shows, by the video control
The positional information of part is revised as after preset position information, in addition to:
Obtain the current display position of the webpage;
According to the current display position of the webpage, calculate and estimate position when the video control is fixed with respect to webpage;
Position is estimated when being fixed according to the video control with respect to webpage, judges to be located at the video control for estimating position
Whether video area is all shown on the terminal display area;
If the video area of the video control for estimating position is all shown on the terminal display area, regarded described
The align_type and display layer bit attribute of frequency control are revised as corresponding storage value, and the video control is shown in terminal
Positional information on region is revised as the positional information for estimating position.
3. according to the method described in claim 1, it is characterised in that described when the align_type is that relative webpage is fixed,
According to positional information of the video control on terminal display area, whether all the video area of the video control is judged
It is shown on the terminal display area, including:
When the align_type is that relative webpage is fixed, the positional information of terminal display area is obtained;
Positional information of the video control on terminal display area and the positional information of the terminal display area are carried out
Compare, judge whether the video area of the video control is all shown on the terminal display area.
4. according to the method described in claim 1, it is characterised in that the terminal display area is the webpage in terminal
Viewing area.
5. video play device in a kind of webpage, it is characterised in that including:
The positioning properties of video control and display layer position category in first acquisition module, the webpage shown for obtaining in terminal
Property, the positioning properties include:The positional information of align_type and the video control on terminal display area;
First judge module, it is aobvious in terminal according to the video control for when the align_type is that relative webpage is fixed
Show the positional information on region, judge whether the video area of the video control is all shown in the terminal display area
On;
Memory module is right during for not being shown in all on the terminal display area in the video area of the video control
The align_type and the display layer bit attribute are stored;
First processing module, is fixed for the align_type of the video control to be revised as into relative termination viewing area, by institute
The display layer bit attribute for stating video control is revised as the superiors and shown, the positional information of the video control is revised as into default position
Confidence ceases, and the preset position information is located at position letter when at the top of terminal display area for the video area of the video control
Breath.
6. device according to claim 5, it is characterised in that also include:
Second acquisition module, the current display position for obtaining the webpage;
Computing module, for the current display position according to the webpage, is calculated when the video control is fixed with respect to webpage
Estimate position;
Second judge module, estimating position during for being fixed according to the video control with respect to webpage, judging positioned at described pre-
Whether the video area for estimating the video control of position is all shown on the terminal display area;
Second processing module, shows for being all shown in the terminal in the video area of the video control for estimating position
When on region, the align_type of the video control and display layer bit attribute are revised as corresponding storage value, and will be described
Positional information of the video control on terminal display area is revised as the positional information for estimating position.
7. device according to claim 5, it is characterised in that first judge module includes:
Acquiring unit, for when the align_type is that relative webpage is fixed, obtaining the positional information of terminal display area;
Comparing unit, for by positional information of the video control on terminal display area and the terminal display area
Positional information is compared, and judges whether the video area of the video control is all shown on the terminal display area.
8. video play device in a kind of webpage, it is characterised in that including:
Memory, processor and storage are on a memory and the computer program that can run on a processor, it is characterised in that institute
Video broadcasting method in the webpage as described in any in claim 1-4 is realized when stating computing device described program.
9. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, it is characterised in that the program quilt
Video broadcasting method in the webpage as described in any in claim 1-4 is realized during computing device.
10. a kind of computer program product, when the instruction processing unit in the computer program product is performed, performs a kind of net
Video broadcasting method in page, methods described includes:
Obtain the positioning properties and display layer bit attribute of video control in the webpage shown in terminal, the positioning properties bag
Include:The positional information of align_type and the video control on terminal display area;
When the align_type is that relative webpage is fixed, believed according to position of the video control on terminal display area
Breath, judges whether the video area of the video control is all shown on the terminal display area;
If the video area of the video control is not shown in all on the terminal display area, to the align_type with
And the display layer bit attribute is stored;
The align_type of the video control is revised as into relative termination viewing area to fix, by the display layer of the video control
Bit attribute is revised as the superiors and shown, the positional information of the video control is revised as into preset position information, the default position
Confidence breath is located at positional information when at the top of terminal display area for the video area of the video control.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710492292.9A CN107172500B (en) | 2017-06-26 | 2017-06-26 | Method and device for playing videos in webpage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710492292.9A CN107172500B (en) | 2017-06-26 | 2017-06-26 | Method and device for playing videos in webpage |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107172500A true CN107172500A (en) | 2017-09-15 |
CN107172500B CN107172500B (en) | 2020-06-26 |
Family
ID=59826490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710492292.9A Active CN107172500B (en) | 2017-06-26 | 2017-06-26 | Method and device for playing videos in webpage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107172500B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100262618A1 (en) * | 2009-04-14 | 2010-10-14 | Disney Enterprises, Inc. | System and method for real-time media presentation using metadata clips |
CN102968509A (en) * | 2012-12-17 | 2013-03-13 | 腾讯科技(深圳)有限公司 | Method and device for multimedia playing in browser |
CN103631867A (en) * | 2013-11-01 | 2014-03-12 | 北京奇虎科技有限公司 | Webpage display method and browser |
WO2014184216A1 (en) * | 2013-05-17 | 2014-11-20 | Here Global B.V. | Method and apparatus for generating context-based functional icons |
US20140365911A1 (en) * | 2008-08-25 | 2014-12-11 | Nintendo Of America Inc. | Internet browser |
CN104268252A (en) * | 2014-09-30 | 2015-01-07 | 北京奇虎科技有限公司 | Playing method and device of video elements in web page |
CN104268250A (en) * | 2014-09-30 | 2015-01-07 | 北京奇虎科技有限公司 | Playing method and device of video elements in web page |
WO2016036988A1 (en) * | 2014-09-04 | 2016-03-10 | Home Box Office, Inc. | Styling system |
CN105512124A (en) * | 2014-09-23 | 2016-04-20 | 腾讯科技(深圳)有限公司 | Method and device for realizing suspension of text editor in webpage |
CN105554553A (en) * | 2015-12-15 | 2016-05-04 | 腾讯科技(深圳)有限公司 | Method and device for playing video through floating window |
-
2017
- 2017-06-26 CN CN201710492292.9A patent/CN107172500B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140365911A1 (en) * | 2008-08-25 | 2014-12-11 | Nintendo Of America Inc. | Internet browser |
US20100262618A1 (en) * | 2009-04-14 | 2010-10-14 | Disney Enterprises, Inc. | System and method for real-time media presentation using metadata clips |
CN102968509A (en) * | 2012-12-17 | 2013-03-13 | 腾讯科技(深圳)有限公司 | Method and device for multimedia playing in browser |
US20150278174A1 (en) * | 2012-12-17 | 2015-10-01 | Tencent Technology (Shenzhen) Co., Ltd. | Method and apparatus for playing multimedia in browser |
WO2014184216A1 (en) * | 2013-05-17 | 2014-11-20 | Here Global B.V. | Method and apparatus for generating context-based functional icons |
CN103631867A (en) * | 2013-11-01 | 2014-03-12 | 北京奇虎科技有限公司 | Webpage display method and browser |
WO2016036988A1 (en) * | 2014-09-04 | 2016-03-10 | Home Box Office, Inc. | Styling system |
CN105512124A (en) * | 2014-09-23 | 2016-04-20 | 腾讯科技(深圳)有限公司 | Method and device for realizing suspension of text editor in webpage |
CN104268252A (en) * | 2014-09-30 | 2015-01-07 | 北京奇虎科技有限公司 | Playing method and device of video elements in web page |
CN104268250A (en) * | 2014-09-30 | 2015-01-07 | 北京奇虎科技有限公司 | Playing method and device of video elements in web page |
CN105554553A (en) * | 2015-12-15 | 2016-05-04 | 腾讯科技(深圳)有限公司 | Method and device for playing video through floating window |
Also Published As
Publication number | Publication date |
---|---|
CN107172500B (en) | 2020-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107181976B (en) | Bullet screen display method and electronic equipment | |
CN104183227B (en) | The display processing method and device of application program | |
CN107562636A (en) | Method and device for testing starting time of application software | |
WO2019218384A1 (en) | Display processing method and device, storage medium and electronic terminal | |
US20140125757A1 (en) | Method of providing information-of-users' interest when video call is made, and electronic apparatus thereof | |
CN107657011A (en) | Video contents search method, apparatus and its equipment | |
CN107451066A (en) | Interim card treating method and apparatus, storage medium, terminal | |
CN106791953A (en) | Many player control methods, server and client | |
CN109144652A (en) | A kind of view display methods, device, electronic equipment and storage medium | |
CN106507200A (en) | Video-frequency playing content insertion method and system | |
CN109120867A (en) | Image synthesizing method and device | |
CN107317853A (en) | Method, device and system for displaying dynamic effect of message popup window | |
CN107864384A (en) | Redirect the method and device that internet video plays on cloud desktop | |
CN107220063A (en) | Dynamic wallpaper generation method and device | |
US10739944B1 (en) | System and method for generating user interface data to provide indicators associated with content | |
CN107645684A (en) | A kind of barrage adjusting method, device and storage medium | |
CN108668161A (en) | Method of video image processing, computer installation and computer readable storage medium | |
CN113286196B (en) | Vehicle-mounted video playing system and video split-screen display method and device | |
CN105898445A (en) | Advertising method and device | |
CN109857964A (en) | A kind of heating power drawing drawing method, device, storage medium and the processor of page operation | |
CN104994429B (en) | A kind of method and device playing video | |
CN107679180A (en) | Data display method and device | |
CN108874674A (en) | page debugging method and device | |
CN110365918A (en) | A kind of information source switching method and equipment | |
KR101703321B1 (en) | Method and apparatus for providing contents complex |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |