CN110730384A - Webpage control method and device, terminal equipment and computer storage medium - Google Patents

Webpage control method and device, terminal equipment and computer storage medium Download PDF

Info

Publication number
CN110730384A
CN110730384A CN201810786521.2A CN201810786521A CN110730384A CN 110730384 A CN110730384 A CN 110730384A CN 201810786521 A CN201810786521 A CN 201810786521A CN 110730384 A CN110730384 A CN 110730384A
Authority
CN
China
Prior art keywords
tab page
page
tab
video
browser
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810786521.2A
Other languages
Chinese (zh)
Other versions
CN110730384B (en
Inventor
段宽军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201810786521.2A priority Critical patent/CN110730384B/en
Publication of CN110730384A publication Critical patent/CN110730384A/en
Application granted granted Critical
Publication of CN110730384B publication Critical patent/CN110730384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/439Processing of audio elementary streams
    • H04N21/4396Processing of audio elementary streams by muting the audio signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV

Abstract

The embodiment of the invention discloses a webpage control method, a webpage control device, terminal equipment and a computer storage medium, which are used for reducing the processing pressure of a CPU (central processing unit) of the equipment and improving the processing capacity of a browser. The method comprises the following steps: when the condition that the first label page exits the activation state is monitored, whether the first label page comprises a video playing object and/or an audio playing object is confirmed; and when the first tab page is confirmed to comprise the video playing object and/or the audio playing object, the confirmed playing object is paused, so that once the tab page in the browser is not in an activated state, the video or the audio in the tab page can not be played, and the video or the audio in at most one tab page can be played, therefore, the CPU of the device does not need to perform corresponding processing on other unplayed videos or audios, and the processing pressure of the CPU of the device is reduced.

Description

Webpage control method and device, terminal equipment and computer storage medium
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for controlling a web page, a terminal device, and a computer storage medium.
Background
Currently, a browser can support simultaneous opening of multiple pages, for example, a user can open multiple video pages to be viewed, buffer multiple videos, and switch to the corresponding page when the user wants to view which video.
However, when a plurality of video webpages or live webpages are opened simultaneously, the browser needs to process the plurality of video webpages or live webpages simultaneously, the Processing pressure of a Central Processing Unit (CPU) of the device is high, and for some devices with poor configuration, the Processing pressure of the CPU is quite high, so that video playing is blocked, and even the device has no response, and the user experience is poor.
Disclosure of Invention
The embodiment of the invention provides a webpage control method, a webpage control device, terminal equipment and a computer storage medium, which are used for reducing the processing pressure of a CPU (central processing unit) of the equipment and improving the processing capacity of a browser.
In a first aspect, an embodiment of the present invention provides a method for controlling a web page, where the method includes:
when the condition that the first tab page exits the activated state is monitored, whether a video playing object and/or an audio playing object is included in the first tab page is confirmed; and are
And when the first label page comprises a video playing object and/or an audio playing object, carrying out pause operation on the confirmed playing object.
In the embodiment of the invention, when the first tab page exits the activation state and the first tab page is confirmed to include the video playing object and/or the audio playing object, the confirmed object is paused, so that once the tab page in the browser is not in the activation state, the video or the audio in the tab page can not be played, and the video or the audio in at most one tab page can be played, therefore, the device CPU does not need to perform corresponding processing on other unplayed videos or audios, thereby reducing the processing pressure of the device CPU and the probability of video playing jamming. On the other hand, the process that the browser needs to synchronously process is correspondingly reduced, the processing capacity of the browser is improved, and in terms of sound effect, because the video or the audio in at most one label page in the browser is played, the situations that a plurality of videos or audios are played simultaneously and the sound is noisy cannot occur, so that a more comfortable audio-visual environment is provided for a user.
Optionally, after the pause operation is performed on the confirmed playing object, the method further includes:
and when the condition that the first label page reenters the activated state is monitored, continuing playing the playing object which is paused before.
In the embodiment of the invention, when the first label page is monitored to enter the activated state again, the video or audio which is paused before is automatically played continuously, and the operation of a user is not required to be manually performed, so that the method and the device are more convenient and quicker.
Optionally, before confirming whether the first tab page includes a video playing object and/or an audio playing object when it is monitored that the first tab page exits the active state, the method further includes:
and monitoring whether the current first tab page in the browser exits the activated state.
Optionally, the monitoring whether the current first tab page in the browser exits the active state includes:
monitoring a value of a current tab page in a tab page manager included in the browser, wherein the value of the current tab page is used for indicating the tab page in an active state in the browser;
and determining whether the current first tab page in the browser exits the activation state or not according to the value of the current tab page.
Optionally, determining whether the current first tab page in the browser exits the active state according to the value of the current tab page includes:
when the value of the current tab page is determined to be changed from a first value to a second value, determining that the first tab page exits the activation state, wherein when the value of the current tab page is the first value, the current tab page is used for indicating that the currently activated tab page is a first tab page, and when the value of the current tab page is the second value, the current tab page is used for indicating that the currently activated tab page is a second tab page different from the first tab page; alternatively, the first and second electrodes may be,
and when the value of the current label page is determined to be changed from the second value to the first value, determining that the first label page enters an activated state.
Optionally, the monitoring whether the current first tab page in the browser exits the active state includes:
monitoring window information of an operating system in equipment for installing the browser;
and determining whether the current first tab page of the browser exits the activated state or not according to the monitored window message.
Optionally, determining whether the current first tab page of the browser exits the active state according to the monitored window message includes:
when the monitored window message indicates that window minimization operation is performed on the browser, determining that the first tab page exits the activated state; alternatively, the first and second electrodes may be,
and when the monitored window message indicates that window maximization operation or window restoration operation is performed on the browser, determining that the first tab page enters an activated state.
Optionally, the determining whether the first tab page includes a video playing object and/or an audio playing object includes:
confirming whether a video-tag and/or an audio-tag is included in the first tab page; alternatively, the first and second electrodes may be,
and confirming whether the first label page comprises an object label carrying an identity label indicating a video playing object and/or an object label carrying an identity label indicating an audio playing object.
Optionally, the performing a pause operation on the confirmed playing object includes:
and calling a pause interface of the confirmed playing object to pause the confirmed playing object.
Optionally, the resuming the playing of the playing object that was paused before playing includes:
and calling a resume play interface or a play interface of the paused play object to continue playing the paused play object.
Optionally, when it is determined that the first tab page includes the video playing object, performing a pause operation on the determined playing object includes:
confirming the type of a video clip currently being played in the video playing object, wherein the type comprises an advertisement and a feature film;
when the type of the video clip currently being played is confirmed to be the advertisement, the advertisement is played in a mute mode, and when the advertisement playing is finished, the feature film after the advertisement playing is finished is paused.
In the embodiment of the invention, if the video clip in the first label page is the advertisement, the advertisement is muted and played and then the feature film is paused, so that when the user switches to the first label page again, the user can directly watch the feature film without waiting for the completion of the advertisement playing, the time of the user is saved, and the use experience of the user is improved.
Optionally, the method further includes:
and displaying an operable state icon on a tab bar of the first tab page, wherein the state icon is used for indicating the current state of the video and/or audio in the first tab page, and the state of the video and/or audio in the first tab page can be switched after the state icon is operated.
In the embodiment of the invention, the status icon can be displayed on the tab bar of the first tab page, so that a user can check the status of the video or audio in the first tab page through the status icon, and when the first tab page is hidden, the user can directly operate the video or audio in the first tab page without switching to the first tab page, thereby being more convenient and faster.
In a second aspect, an embodiment of the present invention further provides a web page control apparatus, where the apparatus includes:
the confirming unit is used for confirming whether the first label page comprises a video playing object and/or an audio playing object when the monitoring unit monitors that the first label page exits the activated state;
and the execution unit is used for carrying out pause operation on the confirmed playing object when the confirmation unit confirms that the first label page comprises the video playing object and/or the audio playing object.
Optionally, the execution unit is further configured to:
and when the condition that the first label page reenters the activated state is monitored, continuing playing the playing object which is paused before.
Optionally, the apparatus further includes a monitoring unit;
the monitoring unit is used for monitoring whether the current first tab page in the browser exits the activation state.
Optionally, the monitoring unit is specifically configured to:
monitoring a value of a current tab page in a tab page manager included in the browser, wherein the value of the current tab page is used for indicating the tab page in an active state in the browser;
and determining whether the current first tab page in the browser exits the activation state or not according to the value of the current tab page.
Optionally, the monitoring unit is specifically configured to:
when the value of the current tab page is determined to be changed from a first value to a second value, determining that the first tab page exits the activation state, wherein when the value of the current tab page is the first value, the current tab page is used for indicating that the currently activated tab page is a first tab page, and when the value of the current tab page is the second value, the current tab page is used for indicating that the currently activated tab page is a second tab page different from the first tab page; alternatively, the first and second electrodes may be,
and when the value of the current label page is determined to be changed from the second value to the first value, determining that the first label page enters an activated state.
Optionally, the monitoring unit is specifically configured to:
monitoring window information of an operating system in equipment for installing the browser;
and determining whether the current first tab page of the browser exits the activated state or not according to the monitored window message.
Optionally, the monitoring unit is specifically configured to:
when the monitored window message indicates that window minimization operation is performed on the browser, determining that the first tab page exits the activated state; alternatively, the first and second electrodes may be,
and when the monitored window message indicates that window maximization operation or window restoration operation is performed on the browser, determining that the first tab page enters an activated state.
Optionally, the confirming unit is specifically configured to:
confirming whether a video-tag and/or an audio-tag is included in the first tab page; alternatively, the first and second electrodes may be,
and confirming whether the first label page comprises an object label carrying an identity label indicating a video playing object and/or an object label carrying an identity label indicating an audio playing object.
Optionally, the execution unit is specifically configured to:
and calling a pause interface of the confirmed playing object to pause the confirmed playing object.
Optionally, the execution unit is specifically configured to:
and calling a resume play interface or a play interface of the paused play object to continue playing the paused play object.
Optionally, the execution unit is specifically configured to:
confirming the type of a video clip currently being played in the video playing object, wherein the type comprises an advertisement and a feature film;
when the type of the video clip currently being played is confirmed to be the advertisement, the advertisement is played in a mute mode, and when the advertisement playing is finished, the feature film after the advertisement playing is finished is paused.
Optionally, the execution unit is further configured to:
and displaying an operable state icon on a tab bar of the first tab page, wherein the state icon is used for indicating the current state of the video and/or audio in the first tab page, and the state of the video and/or audio in the first tab page can be switched after the state icon is operated.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
In a fourth aspect, the present invention also provides a computer storage medium storing computer-executable instructions for causing a computer to perform the method according to the first aspect.
In the embodiment of the invention, when the tab page in the browser is not in the activated state, the video or the audio in the tab page can not be played, so that only the video or the audio in one tab page is played at most, and therefore, the CPU of the device does not need to perform corresponding processing on other unplayed videos or audios, thereby reducing the processing pressure of the CPU of the device and reducing the probability of video playing jamming. On the other hand, as only the video or audio in one tab page is played at most in the browser, the situations that a plurality of videos or audios are played simultaneously and the sound is noisy are avoided, so that a more comfortable audio-visual environment is provided for the user. Moreover, when the paused tab page is in the activated state again, the user does not need to manually play the tab page, but continues to play the video or audio in the tab page, so that the method is more convenient and faster.
Furthermore, in the embodiment of the present invention, when the currently played video segment is an advertisement, the advertisement can be muted and played until the advertisement is played, and the feature film is paused, so that when the user switches to the first tab page again, the user can directly watch the feature film without waiting for the completion of the advertisement playing, thereby saving the time of the user and improving the user experience.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a diagram of a browser window according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario of an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a web page control method according to an embodiment of the present invention;
FIG. 4a is a diagram illustrating an operation of a first tab page exiting an active state according to an embodiment of the present invention;
FIG. 4b is a diagram illustrating another operation of the first tab page exiting the active state according to the embodiment of the present invention;
fig. 5 is a schematic view of a display interface of a control interface provided by a video playing object according to an embodiment of the present invention;
FIG. 6 is a flow chart illustrating pausing a video including an advertisement according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a display interface for pausing a video including an advertisement in accordance with an embodiment of the present invention;
FIG. 8 is a diagram illustrating the display of status icons on a tab bar of a tab page in accordance with an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a web page control device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The embodiments and features of the embodiments of the present invention may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document generally indicates that the preceding and following related objects are in an "or" relationship unless otherwise specified.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present invention, some key terms used in the embodiments of the present invention are explained first:
the browser: or web browser, refers to a piece of software that can display the contents of a web server or a file system's standard universal Markup Language (HTML) files and let the user interact with them. The browser may be used to display text, images and other information retrieved from the server.
Window (window): embodiments of the present invention generally refer to a browser window in which a plurality of tab pages (tabs) may be opened. Referring to fig. 1, when a browser is opened, the portion of the browser occupied in the display screen of the device is a window of the browser.
And (4) label page: or called a web page, one page in a browser window is called a tab page, one tab page may include a plurality of documents, each document is obtained from a server, and an image, an animation, a video, a sound, or streaming media may be embedded in the tab page.
And (4) a label bar: and the summary information of the hidden tab pages is displayed. In order to know the tab pages opened in the browser and to switch the tab pages, the tab bar of each tab page is usually displayed in the browser, and the title (title) of the tab page is displayed on the tab bar, and the content of the title is usually the abstract of the tab page, so that the user can conveniently correspond the tab bar and the tab page. For example, as shown in fig. 1, two tab pages are opened, and there are two corresponding tab fields, and a title of each tab page is displayed in the tab fields, for example, a search web page of hundred degrees in the current tab page in fig. 1, and "you know" is displayed in the title corresponding to the search web page of "hundred degrees", so that the user can conveniently know that the tab page is specifically the tab page and the main content in the tab page.
An active state: when a tab page is displayed at the forefront on the display unit, the state of the tab page is the activated state.
In a specific practical process, the inventor of the present invention finds that, in the prior art, because a certain time is required for buffering when watching a video, a user usually likes to open a plurality of video webpages in a browser and buffer the video webpages simultaneously, but as a plurality of video webpages are played simultaneously, on one hand, sound is very noisy, which provides a poor audiovisual effect for the user, and on the other hand, a device CPU needs to process the playing of a plurality of video webpages simultaneously, so that the processing pressure of the device CPU is high, and particularly for some devices with low configuration, a jam phenomenon often occurs, and even a situation that a program does not respond may occur, which affects the use experience of the user.
In view of this, an embodiment of the present invention provides a method for controlling a web page, in which when a first tab page exits an active state and when it is determined that the first tab page includes a video playing object and/or an audio playing object, a pause operation is performed on the determined object, so that once the tab page in a browser is not in the active state, none of video or audio in the tab page is played, and thus at most only video or audio in one tab page is played, and therefore, a device CPU does not need to perform corresponding processing on other unplayed video or audio, so as to reduce processing pressure of the device CPU and improve processing capability of the browser. On the other hand, as only the video or audio in one tab page is played at most in the browser, the situations that a plurality of videos or audios are played simultaneously and the sound is noisy are avoided, so that a more comfortable audio-visual environment is provided for the user.
Further, in the method provided by the embodiment of the present invention, when the video segment played in the tab page is an advertisement, the advertisement can be muted until the end of the playing, and the positive is paused. Therefore, when the user switches to the first tab page again, the user can directly watch the feature film without waiting for the completion of the advertisement playing, so that the time of the user is saved, and the use experience of the user is improved.
Furthermore, in the method provided by the embodiment of the present invention, an audio or video status icon may be displayed on the tab bar of the tab page, and the user may know the video or audio status in the tab page through the status icon and may operate the status icon, thereby conveniently and quickly switching the video or audio status.
Fig. 2 is a schematic view of an application scenario of the embodiment of the present invention, where the scenario includes a terminal device 101 and a server 102.
The terminal device 101 is any intelligent electronic device capable of installing and running a browser, for example, the terminal device 101 may be a smart phone, a tablet computer (PAD), a notebook computer, a desktop computer, or the like. The terminal device 101 may communicate with the server 102 via a network, which may be, for example, a mobile operator network or a Wireless Local Area Network (WLAN), etc.
The server 102 is a background server for supporting the browser application, and the server 102 may be one server, or may be a server cluster or a cloud computing center formed by a plurality of servers.
After the user installs the browser in the terminal device 102, the user may browse a plurality of web pages through the browser, for example, the user may open a plurality of video web pages or audio web pages in the browser, and at this time, the web pages in the browser may be controlled by the web page control method provided in the embodiment of the present invention. Specifically, the browser may be a browser carried by the terminal device, such as an ie (internet explorer) browser; alternatively, the browser may also be a downloaded browser provided by a third party, for example, a QQ browser, and of course, the browser may also be other possible browsers, which is not limited in this embodiment of the present invention.
Of course, the web page control method provided in the embodiment of the present invention is not limited to be used in the application scenario shown in fig. 2, and may also be used in other possible application scenarios, which is not limited in the embodiment of the present invention.
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.
Referring to fig. 3, an embodiment of the present invention provides a web page control method, which may be applied to the application scenario shown in fig. 2. The flow of the method is described below.
Step 201: and opening a first tab page in the browser based on the operation of the user.
In the embodiment of the present invention, after the user opens the browser, a plurality of tab pages may be opened in the browser, and the first tab page may be any one of the tab pages. One browser window can only display one tab page usually, other non-displayed tab pages are hidden, and the first tab page can be a currently displayed page in the browser.
Step 202: and monitoring whether the current first tab page in the browser exits the activated state.
In the embodiment of the present invention, when the status of a tab page is an active status, the tab page is usually displayed at the forefront end of the display unit, and accordingly, if a tab page is not displayed at the forefront end of the display unit, it can also be said that the user does not need to view the content of the tab page, so that the video or audio in the tab page can be paused. Therefore, whether the current first tab page in the browser exits the activated state needs to be monitored, so that whether corresponding operation needs to be performed on the tab page can be determined.
And if the first label page is always in the state of exiting the activation, continuously monitoring the first label page.
Step 203: when the result of step 202 is yes, it is determined whether a video playing object and/or an audio playing object is included in the first tab page.
Specifically, in the browser, the exiting of the active state of the first tab page currently may generally include two cases, and when any one of the following cases is monitored, it may be determined that the first tab page exits the active state.
First mode
In the embodiment of the present invention, when the current tab page of the browser is switched from the first tab page to the second tab page different from the first tab page, that is, the current display interface is changed to the display interface of the second tab page, and the display interface of the first tab page is hidden, at this time, the first tab page is not displayed at the forefront end of the display unit, that is, exits from the active state, and then it is possible to monitor whether switching between tab pages occurs in the browser, so as to achieve the purpose of monitoring whether the current first tab page exits from the active state.
As shown in fig. 4a, the user may open multiple video webpages in the browser, i.e. two tab pages, i.e. "gourmet god 54 th set" and "if, love 27 th set" opened in the Tencent video website as shown in fig. 4a, the first tab page may be a tab page titled "if, love 27 th set", and the second tab page may be a tab page titled "gourmet god 54 th set". When the video in the tab page with the current title of 'if, love god set 27' is not viewed, the user can switch to the tab page with the title of 'lovely wife god set 54' to view the video therein.
Specifically, when the terminal device is connected to the mouse, the user may move the mouse cursor to the title of "spouse food god 54 th set", and click to switch the current tab page of the browser to the tab page of "spouse food god 54 th set", which is specifically illustrated in fig. 4a as an example; or, if the terminal device is a device supporting touch operation, the user may click the title of the '54 th set of spouse food spirit' through a finger or other object capable of being identified by the touch display screen, so as to switch the current tab page of the browser to the tab page with the title of the '54 th set of spouse food spirit'; or when the terminal device is connected with the keyboard, the user can switch the current tab page of the browser to the tab page with the title of 'lovely wife god 54 th set' by switching the shortcut key.
If the user switches the current tab page of the browser to the second tab page through any one of the switching modes or other possible switching modes, the first tab page can be caused to exit the activation state.
In the embodiment of the present invention, when the terminal device receives an operation of a user, for example, an operation performed by the user on a tab bar of the second tab page through a mouse, or an operation performed by the user on clicking the tab bar of the second tab page through a finger, is performed by capturing an action of the user through a background operating system of the terminal device, the background operating system may send a position of the user operation and a specific action to the browser through an interface between the browser and the background operating system, and the browser may execute a corresponding instruction according to the position of the user operation and the specific action. Or, when the user performs the instruction operation through the keyboard, the background operating system can also obtain the operation instruction of the user through the data interface between the keyboard and the terminal device, and send the operation instruction to the application program corresponding to the currently activated window, that is, the browser, so that the browser can execute the corresponding action according to the operation instruction.
For the browser itself, a TAB manager is included in the browser for managing TAB pages. Following the example in fig. 4a, when there are two TAB pages, the TAB manager would mark the two TAB pages, for example, the TAB page labeled "spouse god 54 th set" as 1, and the TAB page labeled "if 27 th set" as 2, and set the variable parameter "current TAB", the value of the current TAB page being used to indicate the TAB page in the browser that is active, for example, when the value of "current TAB page" is 2, i.e., the TAB page labeled 2 is characterized as being active, i.e., the situation shown in fig. 4 a.
Therefore, the value of the current tab page in the tab page manager can be monitored, and whether the current first tab page in the browser exits the activation state or not is determined according to the value of the current tab page. Specifically, when it is determined that the value of the current tab page changes from a first value to a second value, it may be determined that the first tab page exits the active state, where when the value of the current tab page is the first value, the current tab page is used to indicate that the currently activated tab page is the first tab page, and when the value of the current tab page is the second value, the current tab page is used to indicate that the currently activated tab page is a second tab page different from the first tab page. For example, by following the above example, if the browser receives an operation for switching the current tab to the tab with the title "spouse food god 54 th set", the value of the "current tab" is updated to 1, that is, the value of the obtained current tab is changed from 2 to 1, then it can be determined that the tab with the title "if, love 27 th set" exits the active state, and the tab with the title 1, that is, the tab with the title "spouse food god 54 th set" enters the active state.
The TAB page currently in the active state may be directly acquired from the TAB manager. The TAB manager may be polled to obtain a value of a "current TAB", and the currently obtained value may be compared with a last obtained value to determine whether the value of the "current TAB" changes, and if the value of the "current TAB" changes, it may be determined that the first TAB exits the active state.
Of course, the second tab page may be a tab page newly created in the browser, in addition to a tab page already opened in the browser. The user can open a new tab page in the browser through a new tab page function provided by the browser, so that the first tab page is also hidden, and the first tab page exits from the activated state.
Second mode
In the embodiment of the invention, when the window minimization operation is performed on the browser, the display interface of the browser is hidden, correspondingly, the display interface of the first tab page is hidden, and at this time, the first tab page is not displayed at the forefront end of the display unit, that is, the first tab page exits from the activated state, so that the purpose of monitoring whether the current first tab page exits from the activated state or not can be achieved by monitoring whether the window minimization operation is performed on the browser.
As shown in fig. 4b, in the upper right corner of the browser, a plurality of operable buttons are displayed, in turn a minimize button, a maximize button, and a close button. The minimization button is used for minimizing the window of the browser, namely the window of the browser is not displayed substantially on the display unit, but the window at the next layer of the window of the browser is displayed, for example, when only one application program, namely the browser, is played in the terminal device, the minimization operation is performed on the browser, namely, the desktop of the terminal device is displayed; the maximization button is used for maximizing the window of the browser, and the maximization refers to that the window of the browser occupies the whole display area of the whole display unit or the whole area which can be used for displaying by an application program; the close button is used to close the browser.
Specifically, when the terminal device is connected to the mouse, the user may move the mouse cursor to the minimize button and click to minimize the window of the browser, which is specifically illustrated in fig. 4 b; or, if the terminal device is a device supporting touch operation, the user may click the minimization button through a finger or other object capable of being recognized by the touch display screen to minimize the window of the browser; or, when the terminal device is connected to the keyboard, the user may minimize the window by switching the shortcut key browser, where the switching shortcut key may be a combination key of "Alt + Tab", for example.
In the terminal device, the background operating system usually has a window message notification mechanism, and may monitor whether the browser window is minimized by monitoring the window message of the background operating system, and further determine whether the current first tab page of the browser exits the active state, which is specifically described below with the Windows operating system as an example.
In the Windows operating system, when the SIZE of a window changes, the window is notified through a WM _ SIZE message, wherein the WM _ SIZE message includes a message parameter for indicating a specific operation performed on the window, and the message parameter is a mapping table between the value of the message parameter and the operation, as shown in the following table:
value of message parameter Means for characterizing
SIZE_MINIMIZED Window minimization
SIZE_MAXIMIZED Window maximization
SIZE_RESTORED Window restoration
When the window of the browser is displayed at the front end on the display unit, a WM _ SIZE message aiming at the window of the browser is monitored from a background operating system, and when the carried message parameter is SIZE _ MINIMIZED, the window of the browser can be determined to be MINIMIZED; alternatively, after the window of the browser is hidden, and the WM _ SIZE message for the window of the browser is monitored from the background operating system, when the value of the carried message parameter is SIZE _ MAXMIZED, it may be determined that the window of the browser is maximized, or when the value of the carried message parameter is SIZE _ RESTORED, it may be determined that the window of the browser is RESTORED to the last state of the window of the browser.
The browser may then receive a WM _ SIZE message from the operating system, and if the value of the message parameter in the WM _ SIZE message indicates that the browser's window is minimized, it may be determined that the current first tab page exits the active state.
In the embodiment of the present invention, when it is determined that the first tab page exits the active state, since there is no problem that sound is noisy for a tab page that is not playing video or audio, or there is no problem that CPU processing pressure is caused by processing playing video or audio, it is not necessary to perform subsequent processing on a tab page that is not playing video or audio, and it is necessary to determine whether the first tab page includes a video playing object and/or an audio playing object. The video playing object is used for playing video in the label page, and the audio playing object is used for playing audio in the label page.
Since the types of browsers may include a browser supporting the HTML5 tab and a browser not supporting the HTML5 tab, a process of confirming whether the video playback object and/or the audio playback object is included in the first tab page will be described below for different types of browsers.
Specifically, for a browser that does not support the HTML5 tab, it may be determined whether the first tab page includes an object tab carrying an Identity (ID) indicating a video playing object, and it may be determined whether the first tab page includes the video playing object, and it may be determined whether the first tab page includes an object tab carrying an ID indicating an audio playing object. For a browser which does not support the HTML5 tag, the video or the video is usually played through an ActvieX control embedded based on the object tag, for example, the ActvieX control may be a FLASH plug-in or a Media Player (Media Player).
Illustratively, the following is a piece of source code for playing a video in a browser that does not support the HTML5 tab.
<html>
<body>
<object width="420"height="360"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src"value="movie.mp4"/>
<param name="controller"value="true"/>
</object>
</body>
Wherein "clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC 6B" is the ID of Media Player, the format of the played video file is "mp 4", and in combination with the above source code including "object" tag, it can be determined that the played Media file is a video file in mp4 format, that is, it means that the video playing object is included in the tag page. Since MediaPlayer can play audio in addition to video, Media Player can also be an object of audio playback.
Specifically, for a browser supporting an HTML5 tag, it is possible to confirm whether a video playback object is included in the first tab page by confirming whether the first tab page includes an audio playback object, and it is also possible to confirm whether the first tab page includes an audio playback object by confirming whether the first tab page includes an audio tag.
Illustratively, the following is a piece of source code for playing a video in a browser that supports HTML5 tags.
< video width ═ 320 ═ height ═ 240 ═ controls preload ═ auto >
It can be seen that the source code includes a "</video >" tag, that is, the tag page includes a video playing object.
In the embodiment of the present invention, if it is determined that the first tab page does not include the video playing object and the audio playing object, the monitoring process for the first tab page is ended without performing any processing on the first tab page.
Step 204: when the result of step 203 is yes, a Pause (Pause) operation is performed on the confirmed playback object.
In the embodiment of the present invention, if it is determined that the first tab page includes the video playing object and/or the audio playing object, in order to avoid increasing the pressure of the CPU and avoiding the noise influence on the user when playing the video or audio in the first tab page in the activated state, the determined playing object may be paused.
Specifically, in order to control the video played in the video playing object, the video playing object usually provides a control interface to the outside, for example, the video playing object may provide a pause function interface, a resume play function interface, a play function interface, and a mute function interface. The pause function interface is used for pause control of the video played in the video playing object, the resume play function interface is used for resuming playing of the paused video in the video playing object, the play function interface is used for enabling the video in the video playing object to start playing through the play function interface when the video playing object is not started to play after being loaded, and the mute function interface is used for mute control of the video played in the video playing object.
One expression of the control interface provided by the video playing object is a control button displayed in the video playing interface, as shown in fig. 5, when the video is playing, the control button provided by the video playing interface is a pause button, and a user can operate the pause button to pause the video, and accordingly, an icon at the position of the pause button is changed correspondingly, that is, changed to a resume playing button.
In the embodiment of the invention, when the first tab page is confirmed to comprise the video playing object, the effect of automatically pausing the video played in the video playing object can be realized by calling the pause function interface provided by the video playing object, and a user does not need to manually click the pause button displayed on the video playing interface, so that the operation of the user is reduced, and the method is more intelligent. Wherein after pausing the video of the first tabbed panel, the pause button on the first tabbed panel may likewise be changed to a resume play button.
Similarly, the audio playing object may also provide the control interface, and the description of the control interface provided by the audio playing object refers to the description of the video playing object, which is not described herein again.
In the embodiment of the present invention, the pause processing on the playing object may be performed only by pausing the video or audio being played in the playing object, and the playing object may further continue to interact with the server.
For example, if the first tab page exits the active state when the first tab page has not been completely loaded, the first tab page may further continue to communicate with the server, and further the first tab page may further continue to be loaded, so that when the user switches back to the first tab page again, the first tab page may already be a page that is completely loaded, rather than being suspended in the loaded state before the switch. Or some video websites can provide the function of continuing to cache videos after pausing, after the first tab page exits from the active state, the video caching can be continued due to the interaction between the first tab page and the server, when the user switches to the first tab page again, the videos or audios in the tab page are cached completely or mostly, and then the user can watch the cached videos smoothly.
Step 205: and monitoring whether the first label page enters the activated state again.
In the embodiment of the present invention, after the first tab page exits from the active state, the first tab page may further enter the active state again, so that after the first tab page exits from the active state, whether the first tab page enters the active state again may be monitored continuously.
The manner in which the first tab page reenters the activated state may also include the following two manners, corresponding to the manner in which the first tab page exits the activated state.
Specifically, the user may switch from the second TAB page in the browser to the first TAB page, and then the browser acquires that the value of the current TAB page in the TAB manager changes from the second value to the first value, and then the browser may determine that the first TAB page enters the active state again.
Following the example shown in fig. 4a, after switching to the tab page with the tab column "spouse god 54 th set", the user may also switch back to the tab page with the tab column "if love 27 th set", and after switching, the value of the current tab page changes from 1 to 2, and then it may be determined that the tab page is marked as 2, that is, the tab page with the tab column "if love 27 th set" also enters the active state again. For the switching manner, the detailed description has been already made in the embodiment portion corresponding to fig. 4a, and therefore, redundant description is not repeated here.
Specifically, the user may also switch from a display interface outside the browser to a window of the browser, thereby causing the first tab page to enter the active state again.
When the operating system of the terminal equipment is a Windows operating system, a user can restore a browser window by clicking an icon of a browser on a taskbar; or, when the terminal device is connected to the keyboard, the user may restore the browser window by using a shortcut key. After the user performs the operation, the browser may listen to the window message, and the value of the message parameter in the window message indicates that the window of the browser is restored, then it may be determined that the first tab page enters the active state again. Following the example shown in fig. 4b, after the user minimizes the browser window, the browser window may be restored, and after the browser window is restored, the current tab in the browser, that is, the tab with the tab column "if, love 27 th album", enters the active state again.
Step 206: when the result of step 205 is yes, the play object previously paused is resumed.
In the embodiment of the present invention, if the first tab page enters the active state again, which can indicate that the user wishes to view the video or audio in the first tab page, the paused video or audio in the first tab page may be played continuously.
Specifically, when the playing object included in the first tab page is a video playing object, a playback resuming function interface or a playback function interface provided by the video playing object may be called to enable the video in the first tab page to continue playing. Similarly, when the playing object included in the first tab page is an audio playing object, a playback resuming function interface or a playback function interface provided by the audio playing object may be called to enable the audio in the first tab page to continue playing.
In the embodiment of the present invention, after the first tab page enters the active state again and the video in the first tab page is played, step 202 is further executed, that is, whether the first tab page exits the active state again is monitored continuously.
Referring to fig. 6, in order to reduce the waiting time caused by the advertisement when the user watches the video, in the embodiment of the present invention, when the first tab page exits the active state and confirms that the video playing object is included in the first tab page, the pausing the confirmed playing object may further include:
step 501: and confirming the type of the video clip currently playing in the video playing object.
The types of the video clips played in the video playing object may include advertisements and prints, generally speaking, the advertisements are played before the prints, and the playing of the advertisements delays the time for the user to watch the prints, if the advertisement duration is long, the user needs to wait for a long time, which is obviously not favorable for the user experience, so that when the first tab page exits the activated state and confirms that the first tab page includes the video playing object, the type of the video clip currently played in the video playing object may also be confirmed, thereby performing corresponding operations.
Here, the URL addresses of the video clips currently being played are different from the URL addresses of the advertisements currently being played when the video playing object plays the advertisement and the feature film, so that the types of the video clips currently being played can be determined by the URL addresses of the video clips currently being played. Specifically, after the URL address of the currently played video clip is obtained, the URL address may be matched with a preset URL address library. The preset URL address library may be a URL address library of an advertisement, or may also be a URL address library of a feature, and here, the preset URL address library may be a URL address library of an advertisement as an example.
After matching the URL address with the URL address library of the advertisement, if the matching is successful, the currently played video clip is indicated as the advertisement, otherwise, the currently played video clip is indicated as the feature film.
Step 502: and if the type of the video clip currently being played is confirmed to be a feature film, performing pause operation on the video clip currently being played.
Step 503: and if the type of the video clip currently being played is determined to be the advertisement, pausing the feature film after the advertisement is played in a mute mode.
As shown in fig. 7, in the embodiment of the present invention, if it is determined that the type of the video segment currently being played is an advertisement, the advertisement may be muted until the advertisement is played. After the advertisement is played, the video playing object can play the feature film, the URL address of the corresponding playing resource can be changed accordingly, the fact that the advertisement is played completely can be confirmed according to the change of the URL address, and then the feature film part is paused later is achieved.
In the embodiment of the present invention, in order to facilitate the user to know the status of the video or audio in the tab page, a status icon may be displayed on a tab bar of each tab page including the video or audio, and the status icon may be used to indicate the status of the video or audio in the tab page. Referring to fig. 8, which is a schematic diagram of several status icons, fig. 8 shows status icons in a pause state, a play state, a loud-speaking state and a mute state, respectively, wherein the loud-speaking state means that the video or audio in the tab page is playing, and the non-mute state means that the video or audio in the tab page is playing in a mute state. Of course, the embodiment of the present invention may also include other possible status icons, which are not illustrated here.
The user can also operate the status icon to change the status of the video or audio in the tab page. For example, when a video is in a paused state, a user can move a mouse cursor to a state icon through a mouse connected with the terminal device, and the state of the video can be changed into a playing state by clicking; alternatively, when the audio is in a mute state, the user may change the state of the audio to a loudspeaking state by touching the state icon with a finger or an object that can be recognized by a touch display screen of the terminal device.
In summary, in the embodiment of the present invention, when the tab page exits the activated state, the video or audio in the tab page may be paused and switched back to automatically continue playing, and a user does not need to manually perform an operation, which is more convenient. In addition, only the video or audio in one tab page is played at most in the browser, the processing pressure of the CPU of the device is low, the processing capacity of the browser is improved, the situation that a plurality of videos or audios are played simultaneously and the sound is noisy is avoided, and a comfortable audio-visual environment is provided for a user. In addition, if the video clip played in the tab page is an advertisement, the advertisement can be played in a mute manner until the end, and the positive clip is paused. Therefore, when the user switches to the first tab page again, the user can directly watch the feature film, the time of the user is saved, and the use experience of the user is improved. And, can also show audio frequency or video state icon on the tab bar of tab page, the user can know video or audio frequency state in this tab page through the state icon to the user can also operate this state icon, and then convenient and fast carries out the switching of video or audio frequency's state.
Referring to fig. 9, based on the same inventive concept, an embodiment of the present invention further provides a web page control apparatus, including:
a confirming unit 901, configured to confirm whether the first tab page includes a video playing object and/or an audio playing object when the monitoring unit 903 monitors that the first tab page exits the active state;
an executing unit 902, configured to perform a pause operation on the confirmed playing object when the confirming unit 901 confirms that the video playing object and/or the audio playing object are/is included in the first tab page.
Optionally, the execution unit 902 is further configured to:
and when the condition that the first label page reenters the activated state is monitored, continuing playing the playing object which is paused before.
Optionally, the apparatus further includes a listening unit 903;
the monitoring unit 903 is configured to monitor whether the current first tab page in the browser exits the active state.
Optionally, the monitoring unit 903 is specifically configured to:
monitoring a value of a current tab page in a tab page manager included in the browser, wherein the value of the current tab page is used for indicating the tab page in an activated state in the browser;
and determining whether the current first tab page in the browser exits the activation state according to the value of the current tab page.
Optionally, the monitoring unit 903 is specifically configured to:
when the value of the current label page is determined to be changed from a first value to a second value, determining that the first label page exits the activation state, wherein when the value of the current label page is the first value, the current activated label page is used for indicating that the current activated label page is the first label page, and when the value of the current label page is the second value, the current activated label page is used for indicating that the current activated label page is a second label page different from the first label page; alternatively, the first and second electrodes may be,
and when the value of the current label page is determined to be changed from the second value to the first value, determining that the first label page enters an activated state.
Optionally, the monitoring unit 903 is specifically configured to:
monitoring window information of an operating system in equipment for installing a browser;
and determining whether the current first tab page of the browser exits the activated state according to the monitored window message.
Optionally, the monitoring unit 903 is specifically configured to:
when the monitored window message indicates that window minimization operation is performed on the browser, determining that the first tab page exits the activation state; alternatively, the first and second electrodes may be,
and when the monitored window message indicates that the window maximization operation or the window restoration operation is performed on the browser, determining that the first tab page enters an active state.
Optionally, the confirming unit 901 is specifically configured to:
confirming whether the video-tag and/or the audio-tag is included in the first tag page; alternatively, the first and second electrodes may be,
and confirming whether the first label page comprises an object label carrying an identity label indicating a video playing object and/or an object label carrying an identity label indicating an audio playing object.
Optionally, the execution unit 902 is specifically configured to:
and calling a pause interface of the confirmed playing object to pause the confirmed playing object.
Optionally, the execution unit 902 is specifically configured to:
and calling the resuming playing interface or the playing interface of the paused playing object to continue playing the paused playing object.
Optionally, the execution unit 902 is specifically configured to:
confirming the type of a video clip currently played in a video playing object, wherein the type comprises an advertisement and a feature film;
when the type of the video clip currently being played is confirmed to be the advertisement, the advertisement is played in a mute mode, and when the advertisement playing is finished, the feature after the advertisement playing is finished is paused.
Optionally, the execution unit 902 is further configured to:
and displaying an operable state icon on the tab bar of the first tab page, wherein the state icon is used for indicating the current state of the video and/or audio in the first tab page, and the state of the video and/or audio in the first tab page can be switched after the state icon is operated.
The apparatus may be configured to execute the methods provided in the embodiments shown in fig. 3 to fig. 8, and therefore, for functions and the like that can be realized by each functional module of the apparatus, reference may be made to the description of the embodiments shown in fig. 3 to fig. 8, which is not repeated here.
Referring to fig. 10, based on the same technical concept, an embodiment of the present invention further provides a terminal device, which may include a memory 1001 and a processor 1002.
The memory 1001 is used for storing computer programs executed by the processor 1002. The memory 1001 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the terminal device, and the like. The processor 1002 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The embodiment of the present invention does not limit the specific connection medium between the memory 1001 and the processor 1002. In fig. 10, the memory 1001 and the processor 1002 are connected by a bus 1003, the bus 1003 is shown by a thick line in fig. 10, and the connection manner between other components is only schematically illustrated and is not limited. The bus 1003 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
Memory 1001 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1001 may also be a non-volatile memory (non-volatile) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD), or the memory 1001 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1001 may be a combination of the above memories.
A processor 1002, configured to execute the web page control method provided by the embodiments shown in fig. 3 to 8 when calling the computer program stored in the memory 1001.
The embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions required to be executed by the processor, and includes a program required to be executed by the processor.
In some possible embodiments, various aspects of the web page control method provided by the present invention may also be implemented in the form of a program product including program code for causing a computer device to perform the steps in the web page control method according to various exemplary embodiments of the present invention described above in this specification when the program product runs on the computer device, for example, the computer device may perform the web page control method provided by the embodiment shown in fig. 3 to 8.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for a web page control method of an embodiment of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (15)

1. A method for controlling a web page, comprising:
when the condition that the first tab page exits the activated state is monitored, whether a video playing object and/or an audio playing object is included in the first tab page is confirmed; and are
And when the first label page comprises a video playing object and/or an audio playing object, carrying out pause operation on the confirmed playing object.
2. The method of claim 1, wherein after the pausing the confirmed playback object, the method further comprises:
and when the condition that the first label page reenters the activated state is monitored, continuing playing the playing object which is paused before.
3. The method according to claim 2, wherein before the confirming whether the video playing object and/or the audio playing object is included in the first tab page when the first tab page is monitored to exit the active state, the method further comprises:
and monitoring whether the current first tab page in the browser exits the activated state.
4. The method of claim 3, wherein the monitoring whether the current first tab page in the browser exits the active state comprises:
monitoring a value of a current tab page in a tab page manager included in the browser, wherein the value of the current tab page is used for indicating the tab page in an active state in the browser;
and determining whether the current first tab page in the browser exits the activation state or not according to the value of the current tab page.
5. The method of claim 4, wherein determining whether a first tab page currently in the browser exits the active state based on the value of the current tab page comprises:
when the value of the current tab page is determined to be changed from a first value to a second value, determining that the first tab page exits the activation state, wherein when the value of the current tab page is the first value, the current tab page is used for indicating that the currently activated tab page is a first tab page, and when the value of the current tab page is the second value, the current tab page is used for indicating that the currently activated tab page is a second tab page different from the first tab page; alternatively, the first and second electrodes may be,
and when the value of the current label page is determined to be changed from the second value to the first value, determining that the first label page enters an activated state.
6. The method of claim 3, wherein the monitoring whether the first tab page currently in the browser exits the active state comprises:
monitoring window information of an operating system in equipment for installing the browser;
and determining whether the current first tab page of the browser exits the activated state or not according to the monitored window message.
7. The method of claim 6, wherein determining whether the first current tab page of the browser exits the active state according to the monitored window message comprises:
when the monitored window message indicates that window minimization operation is performed on the browser, determining that the first tab page exits the activated state; alternatively, the first and second electrodes may be,
and when the monitored window message indicates that window maximization operation or window restoration operation is performed on the browser, determining that the first tab page enters an activated state.
8. The method according to any one of claims 1-7, wherein said confirming whether the first tab page includes a video playback object and/or an audio playback object comprises:
confirming whether a video-tag and/or an audio-tag is included in the first tab page; alternatively, the first and second electrodes may be,
and confirming whether the first label page comprises an object label carrying an identity label indicating a video playing object and/or an object label carrying an identity label indicating an audio playing object.
9. The method according to any one of claims 1-7, wherein the pausing the confirmed playback object comprises:
and calling a pause interface of the confirmed playing object to pause the confirmed playing object.
10. The method according to any one of claims 1 to 7, wherein the resuming of the playing object that was paused comprises:
and calling a resume play interface or a play interface of the paused play object to continue playing the paused play object.
11. The method according to any one of claims 1 to 7, wherein when confirming that the video playing object is included in the first tab page, the pausing the confirmed playing object comprises:
confirming the type of a video clip currently being played in the video playing object, wherein the type comprises an advertisement and a feature film;
when the type of the video clip currently being played is confirmed to be the advertisement, the advertisement is played in a mute mode, and when the advertisement playing is finished, the feature film after the advertisement playing is finished is paused.
12. The method according to any one of claims 1-7, further comprising:
and displaying an operable state icon on a tab bar of the first tab page, wherein the state icon is used for indicating the current state of the video and/or audio in the first tab page, and the state of the video and/or audio in the first tab page can be switched after the state icon is operated.
13. A web page control apparatus, comprising:
the monitoring unit is used for monitoring whether the current first tab page in the browser exits the activation state or not;
the confirming unit is used for confirming whether the first label page comprises a video playing object and/or an audio playing object when the monitoring unit monitors that the first label page exits the activated state;
and the execution unit is used for carrying out pause operation on the confirmed playing object when the confirmation unit confirms that the first label page comprises the video playing object and/or the audio playing object.
14. A terminal device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 12.
15. A computer storage medium having computer-executable instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 12.
CN201810786521.2A 2018-07-17 2018-07-17 Webpage control method and device, terminal equipment and computer storage medium Active CN110730384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810786521.2A CN110730384B (en) 2018-07-17 2018-07-17 Webpage control method and device, terminal equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810786521.2A CN110730384B (en) 2018-07-17 2018-07-17 Webpage control method and device, terminal equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN110730384A true CN110730384A (en) 2020-01-24
CN110730384B CN110730384B (en) 2022-12-23

Family

ID=69217636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810786521.2A Active CN110730384B (en) 2018-07-17 2018-07-17 Webpage control method and device, terminal equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN110730384B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650958A (en) * 2020-12-28 2021-04-13 北京达佳互联信息技术有限公司 Page processing method and device, electronic equipment and computer readable storage medium
CN113378092A (en) * 2021-06-22 2021-09-10 海信电子科技(深圳)有限公司 Video playing management method and display equipment
CN113507646A (en) * 2021-07-01 2021-10-15 海信电子科技(深圳)有限公司 Display device and multi-tab-page media asset playing method of browser
CN113660532A (en) * 2021-08-11 2021-11-16 海信电子科技(深圳)有限公司 Multi-webpage video playing method and display equipment
CN114339277A (en) * 2021-12-22 2022-04-12 武汉斗鱼鱼乐网络科技有限公司 Live broadcast room sound shielding method and related equipment
CN115687827A (en) * 2022-11-15 2023-02-03 中电金信软件有限公司 Method, device, equipment and medium for communicating native page and H5 page path

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080276269A1 (en) * 2007-05-02 2008-11-06 Christoform Miller User Interfaces For Web-Based Video Player
CN102033776A (en) * 2009-09-29 2011-04-27 联想(北京)有限公司 Audio playing method and computing device
CN103809953A (en) * 2012-11-14 2014-05-21 腾讯科技(深圳)有限公司 Multimedia playing monitoring method and system
CN104239547A (en) * 2014-09-23 2014-12-24 可牛网络技术(北京)有限公司 Method for processing page resources of browser and device
CN104980801A (en) * 2015-06-05 2015-10-14 安一恒通(北京)科技有限公司 Method and device for processing audio data/video data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080276269A1 (en) * 2007-05-02 2008-11-06 Christoform Miller User Interfaces For Web-Based Video Player
CN102033776A (en) * 2009-09-29 2011-04-27 联想(北京)有限公司 Audio playing method and computing device
CN103809953A (en) * 2012-11-14 2014-05-21 腾讯科技(深圳)有限公司 Multimedia playing monitoring method and system
CN104239547A (en) * 2014-09-23 2014-12-24 可牛网络技术(北京)有限公司 Method for processing page resources of browser and device
CN104980801A (en) * 2015-06-05 2015-10-14 安一恒通(北京)科技有限公司 Method and device for processing audio data/video data

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650958A (en) * 2020-12-28 2021-04-13 北京达佳互联信息技术有限公司 Page processing method and device, electronic equipment and computer readable storage medium
CN112650958B (en) * 2020-12-28 2023-12-19 北京达佳互联信息技术有限公司 Page processing method, page processing device, electronic equipment and computer readable storage medium
CN113378092A (en) * 2021-06-22 2021-09-10 海信电子科技(深圳)有限公司 Video playing management method and display equipment
CN113507646A (en) * 2021-07-01 2021-10-15 海信电子科技(深圳)有限公司 Display device and multi-tab-page media asset playing method of browser
CN113507646B (en) * 2021-07-01 2023-07-18 Vidaa(荷兰)国际控股有限公司 Display equipment and browser multi-label page media resource playing method
CN113660532A (en) * 2021-08-11 2021-11-16 海信电子科技(深圳)有限公司 Multi-webpage video playing method and display equipment
CN114339277A (en) * 2021-12-22 2022-04-12 武汉斗鱼鱼乐网络科技有限公司 Live broadcast room sound shielding method and related equipment
CN115687827A (en) * 2022-11-15 2023-02-03 中电金信软件有限公司 Method, device, equipment and medium for communicating native page and H5 page path
CN115687827B (en) * 2022-11-15 2023-08-25 中电金信软件有限公司 Method, device, equipment and medium for communicating native page and H5 page path

Also Published As

Publication number Publication date
CN110730384B (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN110730384B (en) Webpage control method and device, terminal equipment and computer storage medium
US11782581B2 (en) Display control method and device, electronic device and storage medium
EP2891034B1 (en) Adjusting audio volume of multimedia when switching between multiple multimedia content
CN107172454B (en) Video recommendation method, medium, device and computing equipment
US20180285471A1 (en) Page caching method and apparatus
WO2022156368A1 (en) Recommended information display method and apparatus
WO2020133373A1 (en) Video processing method, apparatus, and electronic device, and computer readable storage medium
JP7391890B2 (en) Search page display method, device, terminal and storage medium
WO2022083427A1 (en) Landscape interaction method and apparatus, electronic device, and storage medium
US20120017162A1 (en) Data processing apparatus and method
CN108566561B (en) Video playing method, device and storage medium
US20110145745A1 (en) Method for providing gui and multimedia device using the same
CN111294637A (en) Video playing method and device, electronic equipment and computer readable medium
US10264055B2 (en) Displaying an application in a window in a graphical user interface environment on a computer system
US9747004B2 (en) Web content navigation using tab switching
US20230045363A1 (en) Video playback method and apparatus, computer device, and storage medium
CN110597612B (en) Intelligent equipment task management method and device
CN106095229B (en) Display method and device of mobile terminal
US20180285148A1 (en) Automate control of media playback based on visibility
CN111125595B (en) Multi-page control method and device, electronic equipment and storage medium
US11301345B2 (en) Desktop sound source discovery
CN114691273A (en) User interface returning method and device, electronic equipment and storage medium
WO2018113748A1 (en) Full screen implementation method for video, and electronic device
WO2023232092A1 (en) Page display method and apparatus, and electronic device
US20150363837A1 (en) Methods, systems, and media for presenting advertisements during background presentation of media content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021042

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant