CN112312220B - Webpage video playing method and device - Google Patents
Webpage video playing method and device Download PDFInfo
- Publication number
- CN112312220B CN112312220B CN201910680781.6A CN201910680781A CN112312220B CN 112312220 B CN112312220 B CN 112312220B CN 201910680781 A CN201910680781 A CN 201910680781A CN 112312220 B CN112312220 B CN 112312220B
- Authority
- CN
- China
- Prior art keywords
- video
- playing
- webpage
- self
- video player
- 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.)
- Active
Links
Images
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/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- 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/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
-
- 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/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method and a device for playing a webpage video, wherein the method comprises the following steps: when the webpage video player which is default to the system pops up, acquiring a video rendering layer of the webpage video player which is default to the system; acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a system default webpage video player; combining a video rendering layer of a webpage video player which is default by a system with a self-defined video playing control layer to obtain a self-defined webpage video player; and playing the video content based on the self-defined webpage video player. The invention realizes that the situation that the third-party browser on the IOS system cannot play or plays wrongly when playing the video on the webpage, supports the embedded playing of the video in the webpage, simultaneously can bring better interactive experience to the user, and meets the technical effect of the playing operation requirement of the user.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for playing a webpage video.
Background
A web video player (i.e., a player for playing video content on a web page) in the IOS system is not open to the outside, and a developer cannot modify a default web video player of the IOS system through an API (Application Program Interface) of the IOS system, and can only use the modified web video player directly.
Currently, when a third-party browser on an IOS system plays a video on a web page, there are two main methods:
first, the default web video player of the IOS system is used directly.
However, the default design of the web video player of the IOS system is relatively simple (generally, only one play/pause button, one full screen/non-full screen button, and one progress bar), so that it is difficult to meet the actual requirements of the user, and the operation experience of the user is not good.
Secondly, a scheme of a 'self-defined webpage video player' is adopted instead of a default webpage video player of the IOS system, and specifically, the scheme includes that: the webpage video player is designed independently, when the video on the webpage needs to be played, all behaviors of the webpage video player which is defaulted by an IOS system are shielded, a video playing address in the webpage is obtained by using JS (JavaScript, Java script language), and then the video is played by the independently designed webpage video player based on the video playing address.
However, due to the fact that the number of video websites is large and websites are frequently updated, JS scripts for acquiring video playing addresses in webpages have failures or compatibility problems for some websites, and therefore the video addresses of webpages may not be acquired or acquired incorrectly, and the situations that the videos cannot be played or are played incorrectly occur. Moreover, since the browser is faced with websites all over the world, if the browser is adapted to each website with problems one by one, the adaptation workload is very large, and some specific adaptation schemes may fail at any time along with the revision and update of the websites. Moreover, the scheme can only support full-screen video playing or fixed-position small-window playing and does not support video embedded playing in a webpage.
Disclosure of Invention
The embodiment of the invention provides a method and a device for playing a webpage video, and solves the technical problems that when a third-party browser on an IOS system plays a video on a webpage, the situation that the video cannot be played or the video is played wrongly easily occurs, embedded playing of the video in the webpage is not supported, or the playing operation requirements of a user are difficult to meet in the prior art. The situation that the third-party browser on the IOS system cannot play or play the video on the webpage in an error mode is achieved, embedded playing of the video in the webpage is supported, meanwhile, better interactive experience can be brought to the user, and therefore the technical effect of the playing operation requirements of the user is met.
In a first aspect, the present invention provides the following technical solutions through an embodiment of the present invention:
a webpage video playing method comprises the following steps:
when a system default webpage video player pops up, acquiring a video rendering layer of the system default webpage video player, wherein the video rendering layer is used for playing video content on a webpage;
acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a default webpage video player of the system, and is used for interacting with a user;
combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain a self-defined webpage video player;
and playing the video content based on the self-defined webpage video player.
Preferably, the system is embodied as an IOS system.
Preferably, before the acquiring the video rendering layer of the system default webpage video player when the system default webpage video player is detected to pop up, the method further includes:
and monitoring the pop-up event of the default webpage video player of the system.
Preferably, the obtaining of the customized video playing control layer includes:
creating a self-defined playing control;
and generating the customized video playing control layer based on the customized playing control.
Preferably, the combining the video rendering layer of the default web video player of the system and the customized video playing control layer includes:
embedding a video rendering layer of a system default webpage video player into the self-defined video playing control layer, wherein the self-defined video playing control layer is positioned above the video rendering layer of the system default webpage video player;
and hiding other view layers of the default webpage video player of the system except the video rendering layer.
Preferably, the playing the video content based on the customized web page video player includes:
acquiring the control operation of a user through the self-defined video playing control layer;
generating a control instruction corresponding to the control operation based on the control operation;
and sending the control instruction to a video playing control layer of the default webpage video player of the system, so that the default video playing control layer of the system executes the control instruction.
Based on the same inventive concept, in a second aspect, the invention provides the following technical solutions through an embodiment of the invention:
a webpage video playing device comprises:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a video rendering layer of a system default webpage video player when the system default webpage video player pops up, and the video rendering layer is used for playing video content on a webpage;
the second acquisition module is used for acquiring a self-defined video playing control layer, the self-defined video playing control layer does not belong to the default webpage video player of the system, and the self-defined video playing control layer is used for interacting with a user;
the combination module is used for combining the video rendering layer of the system default webpage video player with the self-defined video playing control layer to obtain a self-defined webpage video player;
and the playing module is used for playing the video content based on the self-defined webpage video player.
Preferably, the system is embodied as an IOS system.
Preferably, the apparatus for playing a web video further includes:
the monitoring module is used for allowing any behavior of the system default webpage video player before the video rendering layer of the system default webpage video player is acquired when the system default webpage video player is detected to pop up, and simultaneously monitoring the pop-up event of the system default webpage video player.
Preferably, the second obtaining module is specifically configured to:
creating a self-defined playing control; and generating the customized video playing control layer based on the customized playing control.
Preferably, the combination module is specifically configured to:
embedding a video rendering layer of a system default webpage video player into the self-defined video playing control layer, wherein the self-defined video playing control layer is positioned above the video rendering layer of the system default webpage video player; and hiding other view layers of the default webpage video player of the system except the video rendering layer.
Preferably, the playing module is specifically configured to:
acquiring the control operation of a user through the self-defined video playing control layer; generating a control instruction corresponding to the control operation based on the control operation; and sending the control instruction to a video playing control layer of the default webpage video player of the system, so that the default video playing control layer of the system executes the control instruction.
Based on the same inventive concept, in a third aspect, the invention provides the following technical solutions through an embodiment of the invention:
a device for playing a web video, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement any of the method steps of the first aspect.
Based on the same inventive concept, in a fourth aspect, the invention provides the following technical solutions through an embodiment of the invention:
a computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out any of the method steps of the first aspect described above.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
in the embodiment of the invention, a method for playing a webpage video is disclosed, which comprises the following steps: when a system default webpage video player pops up, acquiring a video rendering layer of the system default webpage video player, wherein the video rendering layer is used for playing video content on a webpage; acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a default webpage video player of the system, and is used for interacting with a user; combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain a self-defined webpage video player; and playing the video content based on the self-defined webpage video player. The video rendering layer of the web page video player with the default system and the self-defined video playing control layer are combined to obtain the self-defined web page video player, wherein the video rendering layer of the web page video player with the default system has good compatibility with various video websites, the situation of incapability of playing or playing errors rarely occurs, and the video embedded playing in the web page is supported, and the self-defined video playing control layer can be freely designed by a developer according to the needs, has good user interaction capacity, can meet the playing operation requirements of users, and is combined with the video rendering layer and the self-defined video playing control layer, so the technical problems that the situation of incapability of playing or playing errors easily occurs and the video embedded playing in the web page is not supported when a third-party browser on an IOS system plays videos on the web page in the prior art, or the playing operation requirements of the users are difficult to meet are solved, the situation that the third-party browser on the IOS system cannot play or play the video on the webpage in an error mode is achieved, embedded playing of the video in the webpage is supported, meanwhile, better interactive experience can be brought to the user, and therefore the technical effect of the playing operation requirements of the user is met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a method for playing a web video according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a customized web video player according to an embodiment of the present invention;
fig. 3 is a structural diagram of a device for playing a web video according to an embodiment of the present invention;
fig. 4 is a structural diagram of a device for playing a web video according to an embodiment of the present invention;
fig. 5 is a structural diagram of a device for playing a web video as a server according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for playing a webpage video, and solves the technical problems that when a third-party browser on an IOS system plays a webpage video, the situation that the webpage cannot be played or the webpage cannot be played wrongly easily occurs, embedded playing of the video in the webpage is not supported, or the playing operation requirements of a user are difficult to meet in the prior art. The method and the device have the advantages that the situation that the third-party browser on the IOS cannot play or play the video on the webpage wrongly when playing the video on the webpage is achieved, embedded playing of the video in the webpage is supported, meanwhile, better interactive experience can be brought to the user, and accordingly the technical effect of the playing operation requirements of the user is met.
In order to solve the technical problems, the embodiment of the invention has the following general idea:
a webpage video playing method comprises the following steps: when a system default webpage video player pops up, acquiring a video rendering layer of the system default webpage video player, wherein the video rendering layer is used for playing video content on a webpage; acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a default webpage video player of the system, and is used for interacting with a user; combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain a self-defined webpage video player; and playing the video content based on the self-defined webpage video player.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Example one
The embodiment provides a method for playing a webpage video, which is applied to electronic equipment, wherein an operating system is installed on the electronic equipment, and at least one third-party browser is also installed in the operating system.
For example, the operating system may be the IOS system developed by apple Inc.; correspondingly, the electronic device can be a device provided with an IOS system (such as an iphone, an ipad, an iPod touch and the like); the third-party browser refers to any browser (such as a dog search browser) except the browser (such as a safari browser) of the IOS system.
The above is merely an example, and in a specific implementation process, the electronic device may also be another electronic device, the operating system may also be another operating system, and the third-party browser may also be another browser. Here, the electronic device, the operating system, and the third-party browser are not particularly limited. For example, the operating system may also be: android systems, or windows systems (e.g., windows10 and its successors), or Huanyang systems, and so on. If these operating systems later experience similar problems as IOS, the method of this embodiment may also be used.
In a specific implementation process, a system default webpage video player is provided in the IOS system, the webpage video player is used for playing video content on a webpage, the system default webpage video player at least comprises a video rendering layer and a video control layer, wherein the video rendering layer is used for rendering and playing the video content, and the video control layer is used for interacting with a user.
However, the video control layer of the default web video player of the IOS system has a simpler design and fewer functions (generally, only one play/pause button, one button for switching full screen/non-full screen, and one progress bar), and is difficult to meet the actual requirements of the user, resulting in poor operation experience of the user.
In a specific implementation process, the program code corresponding to the method may be integrated in a third-party browser, that is, an execution subject of the method is the third-party browser.
Further, as shown in fig. 1, the method for playing the web page video includes:
step S101: and when the default webpage video player pops up, acquiring a video rendering layer of the default webpage video player, wherein the video rendering layer is used for playing the video content on the webpage.
As an alternative embodiment, before step S101, the method further includes:
and monitoring the pop-up event of the default webpage video player of the system.
In the implementation process, any behavior of the system default webpage video player is allowed (namely, any behavior of the system default webpage video player is not blocked), and meanwhile, the pop-up event of the system default webpage video player is monitored.
For example, when a user views a video on a web page using a third-party browser, the user typically triggers a play control on the web page, and the default web page video player pops up (i.e., a pop-up event occurs). At this time, the default web video player of the system already starts to operate, but in this embodiment, only the video rendering layer of the default web video player of the system needs to be acquired.
Step S102: and acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a system default webpage video player, and the self-defined video playing control layer is used for interacting with a user.
In a specific implementation process, a customized play control can be created first, and then a customized video play control layer is generated based on the customized play control.
For example, a plurality of play controls are provided in the customized video play control layer for the user to operate, and the user can realize functions of play/pause, fast forward, fast backward, previous set, next set, volume adjustment, brightness adjustment, pop-up screen opening/closing, full screen/non-full screen play switching, and the like through the controls. Wherein, the non-full screen playing is the video embedded playing in the webpage. These playing controls may be customized by the developer according to actual requirements, or customized according to the wishes of the developer, and this embodiment is not specifically limited.
Optionally, the customized video playback control layer may also support gesture operations of the user, and the user may implement the above functions through gestures, for example, volume adjustment, brightness adjustment, and the like.
Step S103: and combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain the self-defined webpage video player.
In a specific implementation process, as shown in fig. 2, when the combination is performed, the video rendering layer of the system-default web video player may be embedded into the customized video playing control layer, where the customized video playing control layer is located above the video rendering layer of the system-default web video player, so as to obtain the customized web video player.
In this embodiment, a novel customized web video player is actually provided, and is formed by combining a video rendering layer of a system-default web video player and a customized video playing control layer.
The video rendering layer of the default webpage video player of the system has good compatibility with a video website, the situation that the video cannot be played or the playing is wrong rarely occurs, and the embedded playing of the video in the webpage is supported. Therefore, the video rendering layer of the webpage video player which is default by the system is adopted for video rendering, the compatibility of the self-defined webpage video player can be improved, and meanwhile, the free switching between video embedded playing and full-screen playing in the webpage is supported.
Compared with the prior art, the scheme that the JS script is adopted to obtain the video playing address in the webpage and the video content in the video playing address is played through the customized webpage video player is adopted.
Compared with the default video control layer of the webpage video player, the user-defined video playing control layer has more playing controls, and can bring better interactive experience to the user, so that the playing operation requirement of the user is met.
In this embodiment, the video rendering layer of the system-default web video player and the customized video playing control layer are combined to obtain the customized web video player, so that the technical problems that when a third-party browser on the IOS system plays a video on a web page in the prior art, the situation that playing cannot be performed or playing errors easily occur, embedded playing of the video in the web page is not supported, or the playing operation requirements of a user are difficult to meet are solved. The situation that the third-party browser on the IOS system cannot play or play the video on the webpage in an error mode is achieved, embedded playing of the video in the webpage is supported, meanwhile, better interactive experience can be brought to the user, and therefore the technical effect of the playing operation requirements of the user is met.
Further, after the video rendering layer of the system default webpage video player is embedded into the self-defined video playing control layer, other view layers except the video rendering layer in the system default webpage video player can be hidden.
In a specific implementation process, other views (including a video playing control layer of the system default webpage video player) in the system default webpage video player can be completely hidden, and at this time, a user can only see a customized webpage video player composed of the video rendering layer of the system default webpage video player and the customized video playing control layer. Therefore, the user can not be interfered by other views of the default webpage video player, the video rendering layer and the self-defined video playing control layer of the default webpage video player are the complete webpage video player, the user does not have any discordant feeling, the normal video watching of the user is not influenced, and the user experience is better.
Step S104: and playing the video content based on the self-defined webpage video player.
As an alternative embodiment, step S104 includes:
acquiring control operation of a user through a self-defined video playing control layer; generating a control instruction corresponding to the control operation based on the control operation; and sending the control instruction to a video playing control layer of a default webpage video player of the system so as to enable the default video playing control layer of the system to execute the control instruction.
For example, as described above, a plurality of play controls are provided in the customized video play control layer for user operation, and the user can implement functions of play/pause, fast forward, fast reverse, previous set, next set, volume adjustment, brightness adjustment, pop-up screen opening/closing, full screen/non-full screen play switching, and the like through the controls. When a specific function is realized, a control instruction needs to be sent to a video playing control layer of the web video player defaulted by the system, and the video playing control layer defaulted by the system executes the control instruction, so that the corresponding function is realized.
For example, when the user triggers the fast forward control, a fast forward instruction is generated and sent to the video playing control layer of the default webpage video player of the system, so that the default video playing control layer of the system executes the fast forward instruction, thereby realizing video fast forward.
As an alternative embodiment, after step S104, the method further includes:
when the closing operation of the user is detected, the closing operation is used for closing the self-defined webpage video player, the self-defined video playing control layer is closed, meanwhile, a closing instruction is generated, and the closing instruction is sent to the video playing control layer of the system default webpage video player, so that the system default video playing control layer executes the closing instruction, and the system default webpage video player is closed. At this time, the customized video playing control layer and the video rendering layer of the default web video player of the system are both closed, which means that the customized web video player is closed.
The technical scheme in the embodiment of the invention at least has the following technical effects or advantages:
in the embodiment of the invention, a method for playing a webpage video is disclosed, which comprises the following steps: when a system default webpage video player pops up, acquiring a video rendering layer of the system default webpage video player, wherein the video rendering layer is used for playing video content on a webpage; acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a default webpage video player of the system, and is used for interacting with a user; combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain a self-defined webpage video player; and playing the video content based on the self-defined webpage video player. Because the video rendering layer of the default webpage video player of the system and the self-defined video playing control layer are combined to obtain the self-defined webpage video player, wherein, the video rendering layer of the default webpage video player of the system has good compatibility with various video websites, rarely has the situation of incapability of playing or playing errors, and supports the embedded playing of the video in the webpage, the self-defined video playing control layer can be freely designed by a developer according to the requirement, has good user interaction capacity, can meet the playing operation requirement of a user, and combines the two, thereby solving the problem that when a third-party browser on the IOS system plays a video on a webpage in the prior art, the technical problems that the condition that the playing cannot be performed or the playing is wrong easily occurs, the embedded playing of the video in the webpage is not supported, or the playing operation requirements of users are difficult to meet exist. The method and the device have the advantages that the situation that the third-party browser on the IOS cannot play or play the video on the webpage wrongly when playing the video on the webpage is achieved, embedded playing of the video in the webpage is supported, meanwhile, better interactive experience can be brought to the user, and accordingly the technical effect of the playing operation requirements of the user is met.
Example two
Based on the same inventive concept, as shown in fig. 3, the present embodiment provides a device 200 for playing a web video, including:
a first obtaining module 201, configured to obtain a video rendering layer of a system-default webpage video player when the system-default webpage video player pops up, where the video rendering layer is used to play video content on a webpage;
a second obtaining module 202, configured to obtain a customized video playing control layer, where the customized video playing control layer does not belong to a default webpage video player of the system, and the customized video playing control layer is used for interacting with a user;
the combination module 203 is configured to combine the video rendering layer of the system-default web video player with the customized video playing control layer to obtain a customized web video player;
and the playing module 204 is configured to play the video content based on the customized web video player.
As an alternative embodiment, the system is embodied as an IOS system.
As an alternative embodiment, the apparatus 200 for playing a web video further includes:
the monitoring module is used for allowing any behavior of the system default webpage video player before the video rendering layer of the system default webpage video player is acquired when the system default webpage video player is detected to pop up, and simultaneously monitoring the pop-up event of the system default webpage video player.
As an optional embodiment, the second obtaining module 202 is specifically configured to:
creating a self-defined playing control; and generating the customized video playing control layer based on the customized playing control.
As an alternative embodiment, the combining module 203 is specifically configured to:
embedding a video rendering layer of a system default webpage video player into the self-defined video playing control layer, wherein the self-defined video playing control layer is positioned above the video rendering layer of the system default webpage video player; and hiding other view layers of the default webpage video player of the system except the video rendering layer.
As an optional embodiment, the playing module 204 is specifically configured to:
acquiring the control operation of a user through the self-defined video playing control layer; generating a control instruction corresponding to the control operation based on the control operation; and sending the control instruction to a video playing control layer of the default webpage video player of the system, so that the default video playing control layer of the system executes the control instruction.
Since the playing device of the web video introduced in this embodiment is a device used for implementing the playing method of the web video in the first embodiment of the present invention, based on the playing method of the web video introduced in the first embodiment of the present invention, a person skilled in the art can understand the specific implementation manner of the playing device of the web video in this embodiment and various variations thereof, so that a detailed description of how the playing device of the web video implements the method in the embodiment of the present invention is not given here. As long as the device adopted by the method for playing the web video in the embodiment of the present invention is implemented by those skilled in the art, the present invention is within the intended scope of the present invention.
The technical scheme in the embodiment of the invention at least has the following technical effects or advantages:
in the embodiment of the invention, a device for playing a webpage video is disclosed, which comprises: the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a video rendering layer of a system default webpage video player when the system default webpage video player pops up, and the video rendering layer is used for playing video content on a webpage; the second acquisition module is used for acquiring a self-defined video playing control layer, the self-defined video playing control layer does not belong to the default webpage video player of the system, and the self-defined video playing control layer is used for interacting with a user; the combination module is used for combining the video rendering layer of the system default webpage video player with the self-defined video playing control layer to obtain a self-defined webpage video player; and the playing module is used for playing the video content based on the self-defined webpage video player. Because the video rendering layer of the default webpage video player of the system and the self-defined video playing control layer are combined to obtain the self-defined webpage video player, wherein, the video rendering layer of the default webpage video player of the system has good compatibility with various video websites, rarely has the situation of incapability of playing or playing errors, and supports the embedded playing of the video in the webpage, the self-defined video playing control layer can be freely designed by a developer according to the requirement, has good user interaction capacity, can meet the playing operation requirement of a user, and combines the two, thereby solving the problem that when a third-party browser on the IOS system plays a video on a webpage in the prior art, the technical problems that the condition that the playing cannot be performed or the playing is wrong easily occurs, the embedded playing of the video in the webpage is not supported, or the playing operation requirements of users are difficult to meet exist. The situation that the third-party browser on the IOS system cannot play or play the video on the webpage in an error mode is achieved, embedded playing of the video in the webpage is supported, meanwhile, better interactive experience can be brought to the user, and therefore the technical effect of the playing operation requirements of the user is met.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram illustrating a device for playing a web video according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile and non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions, when executed by a processor of a device 800, enable the device 800 to perform a method of playing a web video, comprising: when a system default webpage video player pops up, acquiring a video rendering layer of the system default webpage video player, wherein the video rendering layer is used for playing video content on a webpage; acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a default webpage video player of the system, and is used for interacting with a user; combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain a self-defined webpage video player; and playing the video content based on the self-defined webpage video player.
Fig. 5 is a structural diagram of a device for playing a web video as a server according to an embodiment of the present invention. The server 1900 may vary widely by configuration or performance and may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is defined only by the appended claims, which are not intended to limit the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for playing a webpage video is characterized by comprising the following steps:
when a system default webpage video player pops up, acquiring a video rendering layer of the system default webpage video player, wherein the video rendering layer is used for playing video content on a webpage; the system is specifically an IOS system;
acquiring a self-defined video playing control layer, wherein the self-defined video playing control layer does not belong to a default webpage video player of the system, and is used for interacting with a user;
combining the video rendering layer of the default webpage video player of the system with the self-defined video playing control layer to obtain a self-defined webpage video player;
playing the video content based on the self-defined webpage video player;
the combining the video rendering layer of the default webpage video player of the system and the customized video playing control layer comprises:
embedding a video rendering layer of the system default webpage video player into the self-defined video playing control layer, wherein the self-defined video playing control layer is positioned above the video rendering layer of the system default webpage video player;
and hiding other view layers except the video rendering layer in the default webpage video player of the system.
2. The method for playing the web video according to claim 1, wherein before acquiring the video rendering layer of the system default web video player when the system default web video player pops up, the method further comprises:
and monitoring the pop-up event of the default webpage video player of the system.
3. The method for playing the webpage video according to claim 1, wherein the obtaining of the customized video playing control layer comprises:
creating a self-defined play control;
and generating the customized video playing control layer based on the customized playing control.
4. The method for playing the web video according to any one of claims 1 to 3, wherein the playing the video content based on the customized web video player comprises:
acquiring the control operation of a user through the self-defined video playing control layer;
generating a control instruction corresponding to the control operation based on the control operation;
and sending the control instruction to a video playing control layer of the default webpage video player of the system, so that the default video playing control layer of the system executes the control instruction.
5. A device for playing a web video, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a video rendering layer of a system default webpage video player when the system default webpage video player pops up, and the video rendering layer is used for playing video content on a webpage; the system is specifically an IOS system;
the second acquisition module is used for acquiring a self-defined video playing control layer, the self-defined video playing control layer does not belong to the default webpage video player of the system, and the self-defined video playing control layer is used for interacting with a user;
the combination module is used for combining the video rendering layer of the system default webpage video player with the self-defined video playing control layer to obtain a self-defined webpage video player; the combination module is further configured to:
embedding a video rendering layer of the system default webpage video player into the self-defined video playing control layer, wherein the self-defined video playing control layer is positioned above the video rendering layer of the system default webpage video player; hiding other view layers except the video rendering layer in the system default webpage video player;
and the playing module is used for playing the video content based on the self-defined webpage video player.
6. The apparatus for playing a web video according to claim 5, further comprising:
the monitoring module is used for allowing any behavior of the system default webpage video player before the video rendering layer of the system default webpage video player is acquired when the system default webpage video player pops up, and simultaneously monitoring the popping event of the system default webpage video player.
7. The device for playing the web video according to claim 5, wherein the second obtaining module is specifically configured to:
creating a self-defined playing control; and generating the customized video playing control layer based on the customized playing control.
8. The device for playing the web video according to any one of claims 5 to 7, wherein the playing module is specifically configured to:
acquiring the control operation of a user through the self-defined video playing control layer; generating a control instruction corresponding to the control operation based on the control operation; and sending the control instruction to a video playing control layer of the default webpage video player of the system, so that the default video playing control layer of the system executes the control instruction.
9. A device for playing a web video, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the method steps of any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the method steps of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910680781.6A CN112312220B (en) | 2019-07-26 | 2019-07-26 | Webpage video playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910680781.6A CN112312220B (en) | 2019-07-26 | 2019-07-26 | Webpage video playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112312220A CN112312220A (en) | 2021-02-02 |
CN112312220B true CN112312220B (en) | 2022-06-14 |
Family
ID=74329635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910680781.6A Active CN112312220B (en) | 2019-07-26 | 2019-07-26 | Webpage video playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112312220B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104918119A (en) * | 2014-03-11 | 2015-09-16 | 腾讯科技(深圳)有限公司 | Video processing method based on iOS browser, and video processing apparatus based on iOS browser |
CN108021307A (en) * | 2017-12-28 | 2018-05-11 | 深圳豪客互联网有限公司 | A kind of player control changes method and device |
CN109286834A (en) * | 2017-07-19 | 2019-01-29 | 腾讯科技(深圳)有限公司 | Method for processing video frequency, device and server |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2760176A1 (en) * | 2013-01-23 | 2014-07-30 | Vodafone Holding GmbH | Flash video enabler for iOS devices |
WO2014152820A1 (en) * | 2013-03-14 | 2014-09-25 | Vdopia Inc. | Systems and methods for layering content |
-
2019
- 2019-07-26 CN CN201910680781.6A patent/CN112312220B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104918119A (en) * | 2014-03-11 | 2015-09-16 | 腾讯科技(深圳)有限公司 | Video processing method based on iOS browser, and video processing apparatus based on iOS browser |
CN109286834A (en) * | 2017-07-19 | 2019-01-29 | 腾讯科技(深圳)有限公司 | Method for processing video frequency, device and server |
CN108021307A (en) * | 2017-12-28 | 2018-05-11 | 深圳豪客互联网有限公司 | A kind of player control changes method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112312220A (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107153541B (en) | Browsing interaction processing method and device | |
US20210405952A1 (en) | Screen projection method, screen projection device, and storage medium | |
CN111314768A (en) | Screen projection method, screen projection device, electronic equipment and computer readable storage medium | |
CN107908351B (en) | Application interface display method and device and storage medium | |
EP3182716A1 (en) | Method and device for video display | |
CN106412706B (en) | Control method, device and its equipment of video playing | |
CN113542886B (en) | Video playing method and device for playing video | |
CN105786507B (en) | Display interface switching method and device | |
CN106033397B (en) | Memory buffer area adjusting method, device and terminal | |
JP6134870B2 (en) | Description Information Display Method, Description Information Display Device, Electronic Device, Program, and Recording Medium | |
CN107562349B (en) | Method and device for executing processing | |
CN109451341B (en) | Video playing method, video playing device, electronic equipment and storage medium | |
RU2666626C1 (en) | Playback state controlling method and device | |
CN110147191B (en) | Method and device for controlling window and storage medium | |
CN107147936B (en) | Display control method and device for barrage | |
CN110968364A (en) | Method and device for adding shortcut plug-in and intelligent equipment | |
CN114071243A (en) | Video playing method and device, electronic equipment and storage medium | |
CN107729098B (en) | User interface display method and device | |
CN105094539A (en) | Display method and device of reference information | |
US20220256230A1 (en) | Method and apparatus for video playing | |
JP6130978B2 (en) | Image deletion method, image deletion apparatus, program, and recording medium | |
CN106527938A (en) | Method and device for operating application program | |
CN108829473B (en) | Event response method, device and storage medium | |
CN104837020B (en) | The method and apparatus for playing video | |
CN112312220B (en) | Webpage video playing method and device |
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 |