WO2019200614A1 - 一种免打扰方法和终端 - Google Patents
一种免打扰方法和终端 Download PDFInfo
- Publication number
- WO2019200614A1 WO2019200614A1 PCT/CN2018/083963 CN2018083963W WO2019200614A1 WO 2019200614 A1 WO2019200614 A1 WO 2019200614A1 CN 2018083963 W CN2018083963 W CN 2018083963W WO 2019200614 A1 WO2019200614 A1 WO 2019200614A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- media
- input event
- user
- playing
- application
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72463—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
Definitions
- the present application relates to the field of terminal technologies, and in particular, to a do not disturb method and a terminal.
- the DND mode can be set in the existing terminal.
- the terminal can set the DND period, control the ringtone or SMS notification tone, etc. to mute during the DND period, which is convenient for the user to use during the inconvenient time period.
- applications with automatic media playback capabilities in the terminal are increasing, such as WeChat, Weibo, and Vibrato.
- WeChat as an example, the user opens the friend circle of WeChat in the mobile phone, and when the advertisement playing window is displayed in the circle of friends, the advertisement is automatically played.
- the present application provides a DND method and a terminal, which are used to reduce the automatic play of media in a terminal in the prior art, reduce possible resource waste, and reduce the consumption of possible data traffic.
- the embodiment of the present application provides a method for siphon-free, which is applicable to a terminal that is installed with a first application, where the method includes: displaying, by the terminal, an interface of the first application; a window of the media, and when the first application is in the media DND mode, determining whether the first media played by the window is triggered by a user's playing operation; if the window playing the first media is triggered by a user's playing operation, the playing device Corresponding media; if the window playing the first media is not triggered by the user's playing operation, pause or stop playing the corresponding media.
- the first application in the terminal may be set to the media do not disturb mode, and the terminal may determine whether the behavior of playing the first media in the media play window in the interface of the first application is triggered by the user's playing operation. , the corresponding media is played, and if not, the corresponding media is paused or stopped. In this mode, whether the media playing window plays media by the user's playing operation can avoid automatic media playback, thereby reducing resource waste, reducing data traffic consumption, reducing the burden of mobile phone processing, and reducing power consumption.
- the player when the condition that the window plays the first media is satisfied, the player is created to play the first media, and the creation time of the player is determined; the terminal determines that the window plays correspondingly Whether the target input event exists in the acquired input event when the media is triggered by the user's play operation, the target input event is an input event corresponding to the user's play operation, and the target input event is distributed earlier than the player.
- the target input event is distributed to the first application; if the target input is present The event is determined that the window playing the first media is triggered by the user's playing operation; if the target input event does not exist, determining that the window playing the first media is not triggered by the user's playing operation.
- the target input event determined by the terminal from the acquired input event needs to meet three conditions, 1. the target input event is an input event corresponding to the play operation; 2. the target input event is distributed earlier than the play event. The creation time of the device, and the time difference between the two is less than the preset time; 3. The app to which the target input event is distributed is the same app as the app that creates the player.
- the target input event can be determined more accurately, that is, it is more accurate to determine whether the corresponding media played by the window is triggered by the user's playback operation. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the step of executing includes: determining whether there is a first input event corresponding to the user's playing operation in the acquired input event; If there is a first input event, determining whether there is a second input event in which the time difference between the distribution time and the creation time is less than a preset time in the first input event; if there is a second input event, determining the second input event Whether the application to be distributed is the same application as the application that created the player; if it is the same application, it is determined that there is a target input event, and the target input event is the second input event; if it is not the same application, it is determined that there is no target input event.
- the target input event needs to satisfy three conditions, and when the terminal inputs the event from the acquired input event, the terminal may determine an input event of the acquired input event. Whether these three conditions are met in turn, and if all are satisfied, the input event is the target input event.
- the order of judgment may be arbitrary. For example, it may be first determined whether the first condition is satisfied, and after the first condition is satisfied, it is judged whether the second condition is satisfied, and when the second condition is satisfied, it is determined whether the third condition is satisfied.
- the target input event can be determined more accurately, that is, it is more accurate to determine whether the corresponding media played by the window is triggered by the user's playback operation. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the package name of the application to which the target input event is distributed is the same as the package name of the first application; and/or the process number and location of the application to which the target input event is distributed The process ID of the first application is the same.
- the app to which the target input event is distributed is the same app as the app that creates the player. Since an app corresponds to one or more processes, when an app corresponds to a process, the mobile phone only needs to determine whether the package name of the app to which the target input event is distributed is the same as the name of the app package that creates the player, or the mobile phone only needs to judge the target.
- the process ID of the app to which the input event is distributed is the same as the process ID of the created player.
- the mobile phone determines whether the package name of the app to which the target input event is distributed and the app package name of the created player are the same, and can also determine the process ID of the app to which the target input event is distributed and create the player. Is the process ID the same? In this way, it is possible to more accurately determine whether the app that created the player and the app to which the target input event is distributed are the same app.
- the first media is paused or stopped.
- the terminal may pause or stop playing the first media. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the terminal displays the first control in the window of the playing media or in the pop-up window, and the first control uses The first media is triggered to be played; when the first control is triggered, the terminal plays the first media.
- the terminal when the media play window appears in the interface of the first application, but the window plays the first media, the terminal may pause or stop the media play, but the terminal may also display the first control. For example, when the terminal pauses or stops the media playback, the media play window displays a black screen, but the terminal displays the first control in the window for playing the media or in the pop-up window. If the user wants to play the media, the first control can be triggered. In this way, the terminal can avoid automatic playback of the media, thereby reducing resource waste. At the same time, after pausing or stopping the media playback, the user can also trigger the playing media to improve the user experience.
- the first prompt information of the text or the icon is displayed in the window of the playing media or in the pop-up window for prompting that the automatic playing is prohibited or prompting the user to play the first medium.
- the terminal when a media play window appears in the interface of the first application, but the window plays the first media without the user consciously triggering, the terminal pauses or stops the media play.
- the terminal may display the first prompt information in the window of playing the media or in the pop-up window to prompt that the automatic play is prohibited or prompt the user to play the first media. In this way, the terminal can avoid automatic playback of the media, thereby reducing resource waste.
- the user after pausing or stopping the media playback, the user can also trigger the playing media to improve the user experience.
- the terminal displays a first interface for setting a media DND mode in response to a user operation, or detecting that data traffic is turned on, or when the terminal is in a conference mode or a silent mode.
- An interface includes a control for setting whether the media DND mode is enabled; and in response to the user operating the control of whether the media DND mode is enabled, the media DND mode is turned on for all or part of the terminal.
- the terminal displays a first interface for setting the media DND mode in a specific scenario, such as when the user actively sets, or the data traffic is turned on, or is in the conference mode.
- the user can enable the media DND mode for all or part of the terminals through the controls in the first interface. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the terminal displays a first interface for setting a media DND mode in response to a user operation, or detecting that data traffic is turned on, or when the terminal is in a conference mode or a silent mode.
- An interface includes a control for setting whether the media DND mode is enabled; and the terminal displays a second interface for setting the media DND mode in response to an operation of the user to activate the control that the media DND mode is enabled; the second interface includes An identifier of the M applications, and the M controls for setting whether the media DND mode is enabled, the M controls respectively corresponding to the M applications; M being an integer greater than or equal to 1; the terminal responding to the user activation The operation of one of the M controls turns on the media DND mode for the application corresponding to the one control.
- the user can select which applications in the terminal to enable the media DND mode according to their own needs. For example, the user commonly uses WeChat, then the media DND mode can be enabled for WeChat. In this way, automatic playback of the media can be avoided, thereby reducing resource waste and reducing data consumption.
- the terminal displays a second interface for setting the media DND mode in response to the user's operation, or detecting that the data traffic is turned on, or when the terminal is in the conference mode or the silent mode;
- the second interface includes an identifier of the M applications, and the M controls for setting whether the media DND mode is enabled, where the M controls respectively correspond to the M applications; and M is an integer greater than or equal to 1.
- the terminal displays a second interface for setting the media DND mode in a specific scenario, such as when the user actively sets, or the data traffic is turned on, or is in the conference mode.
- the user can select which applications in the terminal to enable the media DND mode through the M controls in the second interface. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the user when it is detected that the terminal accesses wifi, the user is prompted to close the media DND mode or display the first interface.
- the user prefers to automatically play the media. Therefore, in the embodiment of the present application, after the terminal is in the media DND mode, if the terminal detects that the terminal accesses the wifi, the user may be prompted to turn off the media DND mode or display a first interface for setting the media DND mode. Turning off the media DND mode through the controls of the first interface helps to improve the user experience.
- the terminal comprises a display screen, a memory, the software program and/or module of the first application, a software program and/or a module of the framework layer are stored in the memory; the display screen displays the first An interface of the application; the frame layer determines whether the first media is played by the user's playing operation; if the window plays the first media triggered by the user's playing operation, the frame layer plays the corresponding media; Playing the first media is not triggered by a user's playback operation, and the frame layer pauses or stops playing the corresponding media.
- the frame layer determines whether the first media is played by the user's play operation, and if so, plays the media, if not, pauses or stops playing. media. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the frame layer when the window of the first application includes a window for playing media, the frame layer creates a player to play the first media; the frame layer determines the creation of the player The frame layer determines whether the first media is triggered by the user's play operation, and the frame layer determines whether there is a target input event in the acquired input event, where the target input event is a user's play operation.
- the input event, the distribution time of the target input event is earlier than the creation time of the player, and the time difference between the distribution time of the target input event and the creation time of the player is less than the first preset duration, the target input An event is distributed to the first application; if the target input event is present, the framework layer determines that the window plays the first media triggered by a user's play operation; if the target input event does not exist, the frame layer Determining that the window plays the first media is not triggered by the user's playback operation.
- the framework layer determines whether the first media is played by the user's playback operation, that is, the framework layer determines whether there is a target input event in the acquired input event, and if so, determines that the window is played.
- a media is triggered by a user's playback operation; if not, the framework layer determines that the window playing the first media is not triggered by the user's playback operation. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the embodiment of the present application provides a method for siphon-free, which is applicable to a terminal that is installed with a first application, where the method includes: displaying, by the terminal, an interface of the first application, where the interface of the first application includes playing media Receiving, by the first application, request information for creating a player; if the first application is in the media DND mode, determining whether the request information is triggered by a user's play operation; Whether the information is triggered by the user's playback operation, creating a player and playing the corresponding media.
- the first application in the terminal when the first application in the terminal is in the media DND mode, if the media play window appears on the interface of the first application displayed by the terminal, the first application generates request information for requesting to create the player.
- the terminal determines whether the request information is triggered by the user's playing operation, and if so, plays the corresponding media, and if not, pauses or stops playing the corresponding media. In this mode, whether the media playing window plays media by the user's playing operation can avoid automatic media playback, thereby reducing resource waste, reducing data traffic consumption, reducing the burden of mobile phone processing, and reducing power consumption.
- the request information includes a generation time for generating the request information; and determining whether the request information is triggered by a user's play operation includes: determining whether the acquired input event is There is a target input event, the target input event is an input event corresponding to a user's play operation, the target input event is distributed earlier than the request information generation time, and the target input event is distributed and the generation time The time difference is less than the first preset duration, the target input event is distributed to the first application; if the target input event is present, determining that the request information is triggered by a user's play operation; if the target is not present An event is input to determine that the request information is not generated by a user's playback operation.
- the target input event determined by the terminal from the acquired input event needs to meet three conditions, 1. the target input event is an input event corresponding to the play operation; 2. the target input event is distributed earlier than the request. The generation time of the information, and the time difference between the two is less than the preset time; 3. The app to which the target input event is distributed is the same app as the app that creates the player.
- the target input event can be determined more accurately, that is, it is more accurately determined whether the request information is triggered by the user's playback operation. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the step of executing includes: determining whether there is a first input event corresponding to the user's playing operation in the acquired input event; If there is a first input event, determining whether there is a second input event in which the time difference between the distribution time and the creation time is less than a preset time in the first input event; if there is a second input event, determining the second input event Whether the application to be distributed is the same application as the application that created the player; if it is the same application, it is determined that there is a target input event, and the target input event is the second input event; if it is not the same application, it is determined that there is no target input event.
- the target input event needs to satisfy three conditions, and when the terminal inputs the event from the acquired input event, the terminal may determine an input event of the acquired input event. Whether these three conditions are met in turn, and if all are satisfied, the input event is the target input event.
- the order of judgment may be arbitrary. For example, it may be first determined whether the first condition is satisfied, and after the first condition is satisfied, it is judged whether the second condition is satisfied, and when the second condition is satisfied, it is determined whether the third condition is satisfied.
- the target input event can be determined more accurately, that is, it is more accurately determined whether the request information is triggered by the user's playback operation. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the package name of the application to which the target input event is distributed is the same as the package name of the first application; and/or the process number and location of the application to which the target input event is distributed The process ID of the first application is the same.
- the terminal displays a first control in a window of the playing media or in a pop-up window, and the first control is used to trigger creation.
- the player plays the first medium; when the first control is triggered, the terminal creates a player to play the first medium.
- the first prompt information of the text or the icon is displayed in the window of the playing media or in the pop-up window for prompting that the automatic playing is prohibited or prompting the user to play the first medium.
- the condition that the window plays the first medium includes: the window of the playing medium is displayed in whole or in part, or the window of the playing medium is displayed in the center of the display screen of the terminal.
- the terminal displays a first interface for setting a media DND mode in response to a user operation, or detecting that data traffic is turned on, or when the terminal is in a conference mode or a silent mode.
- An interface includes a control for setting whether the media DND mode is enabled; and in response to the user operating the control of whether the media DND mode is enabled, the media DND mode is turned on for all or part of the terminal.
- applying the media DND mode to all or part of the terminal comprises: responsive to the user activating the media
- the operation of the control in which the do not disturb mode is turned on displays a second interface for setting the media do not disturb mode; the second interface includes an identifier of the M applications, and the M controls for setting whether the media do not disturb mode is enabled,
- the M controls respectively correspond to the M applications; M is an integer greater than or equal to 1; respectively, in response to the user activating an operation of the N controls of the M controls, respectively, corresponding to the N controls
- the application turns on the DND mode, where N is less than or equal to M positive integers.
- the terminal displays a second interface for setting the media DND mode in response to the user's operation, or detecting that the data traffic is turned on, or when the terminal is in the conference mode or the silent mode;
- the second interface includes an identifier of the M applications, and the M controls for setting whether the media DND mode is enabled, where the M controls respectively correspond to the M applications; and M is an integer greater than or equal to 1.
- the user when it is detected that the terminal accesses the wireless network, the user is prompted to close the media DND mode or display the first interface.
- the terminal comprises a display screen and a memory, the memory comprising a software program and/or module of the first application, a software program and/or a module of the framework layer; the display screen displaying the first application
- the framework layer acquires request information generated by the first application for requesting to create a player; the framework layer determines whether the request information is triggered by a user's play operation; if the request information is by a user When the playback operation is triggered, the framework layer creates a player and plays the corresponding media; if the request information is not triggered by the user's playback operation, the framework layer rejects or discards the request information.
- the framework layer acquires request information for requesting to create a player, and the framework layer determines whether the request information is triggered by a user's playing operation. If yes, create a player to play the media, and if not, reject or drop the request message. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the request information includes a generation time when the first application generates the request information
- the framework layer determines whether the request information is triggered by a user's play operation, including: the framework layer Determining whether there is a target input event in the acquired input event, the target input event is an input event corresponding to a user's play operation, the target input event is distributed earlier than the request information generation time, and the target input event The time difference between the distribution time and the generation time is less than the first preset duration, the target input event is distributed to the first application; if the target input event exists, the framework layer determines that the request information is determined by the user The playing operation triggers generation; if the target input event does not exist, the framework layer determines that the request information is not triggered by a user's playing operation.
- the framework layer acquires request information for requesting to create a player, and the framework layer determines whether the request information is triggered by a user's play operation. Specifically, the framework layer determines whether there is a target input event in the acquired input event, and if yes, determining that the window plays the first media triggered by the user's playing operation; if not, the frame layer determines the window Playing the first media is not triggered by the user's playback operation. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the embodiment of the present application provides a method for avoiding interference, the method is applicable to a terminal, where the method includes: when the terminal is in the media DND mode, if the first application of the terminal creates a player during the running process, Playing the media, determining whether there is an input event matching the creation of the player event, the input event being an input event that may trigger a play behavior; if the input event exists, the terminal plays the media; if the input does not exist Event, the terminal pauses or stops media playback.
- the terminal may be set to a do not disturb mode, and the player may be created when the first application is running. For example, when the media play window appears in the interface of the first application, the player can be created. Or the first application (sms, phone) receives information or calls from other terminals, and can also create a player. After the terminal creates the player, it determines whether there is an input event that matches the player event. If it exists, the event that creates the player is triggered by the user. If it does not exist, the event that creates the player is not triggered by the user. , is the first application automatically triggered or triggered by other reasons. If the user actively triggers, the terminal plays the media.
- the terminal pauses or stops the media playback. In this way, automatic playback of the media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden on the mobile phone processing, and reducing power consumption.
- the terminal determines whether there is an input event that matches the creation of the player, including: the terminal determines the creation time of the player, and the terminal determines whether there is a target input event from the acquired input events.
- the target input event is an input event corresponding to a playback operation of the user, the distribution time of the target input event is earlier than the creation time of the player, and the time difference between the distribution time of the target input event and the creation time of the player is less than a first preset duration, the target input event is distributed to the first application; if the target input event is present, determining that there is an input event that matches a create player event; if the target input event is not present, Make sure there are no input events that match the player player creation event.
- the step of executing includes: determining whether there is a first input event corresponding to the user's playing operation in the acquired input event; If there is a first input event, determining whether there is a second input event in which the time difference between the distribution time and the creation time is less than a preset time in the first input event; if there is a second input event, determining the second input event Whether the application to be distributed is the same application as the application that created the player; if it is the same application, it is determined that there is a target input event, and the target input event is the second input event; if it is not the same application, it is determined that there is no target input event.
- the package name of the application to which the target input event is distributed is the same as the package name of the first application; and/or the process number and location of the application to which the target input event is distributed The process ID of the first application is the same.
- an embodiment of the present application provides a terminal, including a processor and a memory.
- the memory is for storing one or more computer programs; when the one or more computer programs stored by the memory are executed by the processor, enabling the terminal to implement the method of any one of the first aspect or the first aspect.
- the terminal when the one or more computer programs stored in the memory are executed by the processor, the terminal is enabled to implement the method of any one of the second aspect or the second aspect.
- the terminal is enabled to implement the method of any one of the third aspect or the third aspect.
- the embodiment of the present application further provides a terminal, where the terminal includes a module/unit that performs the method of any one of the first aspect or the first aspect.
- the terminal comprises a module/unit that performs the method of any one of the possible aspects of the second aspect or the second aspect.
- the terminal comprises a module/unit that performs the method of any of the possible aspects of the third aspect or the third aspect.
- the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium includes a computer program, when the computer program runs on the terminal, causing the terminal to perform the first aspect or the foregoing Any of a possible design methods on the one hand.
- the server when the computer program is run on the terminal, the server is caused to perform the method of any one of the possible aspects of the second aspect or the second aspect described above.
- the first terminal is caused to perform the method of any one of the third aspect or any of the above-mentioned third aspects.
- the embodiment of the present application further provides a computer program product, when the computer program product is run on a terminal, causing the terminal to perform the first aspect or any one of the foregoing possible designs of the first aspect.
- a computer program product when the computer program product is run on the terminal, the terminal is caused to perform the method of any one of the possible aspects of the second aspect or the second aspect described above.
- the terminal when the computer program product is run on a terminal, the terminal is caused to perform the method of any one of the third aspect or any of the above-mentioned third aspects.
- FIG. 1 is a schematic diagram of a hardware architecture of a terminal according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of a process in which a terminal triggers an app to play a video through an input event in the prior art
- FIG. 3 is a schematic diagram of a software architecture of a terminal according to an embodiment of the present invention.
- FIG. 4 is a schematic flowchart of a DND method according to an embodiment of the present invention.
- FIG. 5A is a schematic diagram of a setting app in a terminal according to an embodiment of the present invention.
- FIG. 5B is a schematic diagram of a setting app in a terminal according to an embodiment of the present invention.
- FIG. 5C is a schematic diagram of a setting app in a terminal according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a terminal displaying first prompt information according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a terminal display medium in a suspended state according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of displaying, by a terminal, second prompt information according to an embodiment of the present invention.
- FIG. 9 is a schematic diagram of a terminal displaying second prompt information according to an embodiment of the present invention.
- FIG. 10 is a schematic diagram of a terminal displaying third prompt information according to an embodiment of the present invention.
- FIG. 11 is a schematic diagram of a terminal displaying third prompt information according to an embodiment of the present invention.
- FIG. 12 is a schematic diagram of a terminal displaying third prompt information according to an embodiment of the present invention.
- FIG. 13 is a schematic diagram of a terminal displaying third prompt information according to an embodiment of the present invention.
- FIG. 14 is a schematic diagram of a terminal according to an embodiment of the present invention.
- FIG. 15 is a schematic diagram of a terminal according to an embodiment of the present invention.
- the terminal involved in the embodiment of the present application may also be referred to as a user equipment (User Equipment, UE).
- UE User Equipment
- Various applications can be installed in the terminal, such as WeChat, email, and Weibo.
- the terminal can be a smartphone, a tablet, various wearable devices, an in-vehicle device, and the like.
- the operating system (OS) involved in the embodiment of the present application is the most basic system software running on the terminal. Taking a smartphone as an example, the operating system can be an Android system or an IOS system. The following is an introduction to the Android system. Those skilled in the art can understand that other operating systems can also be implemented by similar algorithms.
- the terminal can run multiple applications at the same time.
- one application corresponds to one process, which is more complicated, and one application corresponds to multiple processes.
- Each process has a process number (process ID).
- the touch screen detects the touch operation and generates a corresponding hardware interrupt.
- the kernel layer of the operating system receives the touch operation, the touch operation is processed into the original input event (including touch coordinates, touch).
- the corresponding timestamp and other information are stored in the device node in the kernel layer.
- the framework layer reads the original input event from the device node and translates it, encapsulates it, etc., to get an input event containing more information.
- the framework layer then distributes the input event to an application or software module of interest, and the application or software module responds to the input event it receives, such as updating its own window screen or performing a particular operation.
- the media involved in the embodiment of the present application includes streaming media (including audio, video, and the like), and includes a system prompt tone such as a short message prompt tone and an incoming call ring tone, and the system prompt tone can be stored locally in the terminal.
- Streaming media can be understood as a network device that encapsulates video (compression, data packing) and then sends it to the terminal according to certain timing requirements. The terminal unblocks and plays the received data while the subsequent data arrives. media.
- a plurality of the embodiments of the present application refer to two or more.
- the embodiment of the present application provides a do not disturb method and a terminal, and the method is applicable to a terminal.
- Figure 1 shows a block diagram of one possible terminal.
- the terminal 100 includes: a radio frequency (RF) circuit 110 , a power source 120 , a processor 130 , a memory 140 , an input unit 150 , a display unit 160 , an audio circuit 170 , a communication interface 180 , and a wireless device Components such as the Wireless Fidelity (WiFi) module 190.
- RF radio frequency
- the structure of the terminal shown in FIG. 1 does not constitute a limitation on the terminal.
- the terminal provided by the embodiment of the present application may include more or less components than the illustrated, or combine some components. Or different parts arrangement.
- the components of the terminal 100 are specifically described below with reference to FIG. 1 :
- the RF circuit 110 can be used for receiving and transmitting data during communication or during a call. Specifically, after receiving the downlink data of the base station, the RF circuit 110 sends the data to the processor 130 for processing; in addition, the uplink data to be sent is sent to the base station.
- the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
- LNA Low Noise Amplifier
- RF circuitry 110 can also communicate with the network and other devices via wireless communication.
- the wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code). Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
- GSM Global System of Mobile communication
- GPRS General Packet Radio Service
- Code Division Multiple Access CDMA
- WCDMA Wideband Code Division Multiple Access
- LTE Long Term Evolution
- E-mail Short Messaging Service
- the WiFi technology is a short-range wireless transmission technology, and the terminal 100 can connect to an access point (AP) through the WiFi module 190, thereby implementing access to the data network.
- the WiFi module 190 can be used for receiving and transmitting data during communication.
- the terminal 100 can implement physical connection with other devices through the communication interface 180.
- the communication interface of the communication interface 180 and the other device is connected by a cable to implement data transmission between the terminal 100 and other devices.
- the terminal 100 can implement a communication service and send information to other contacts. Therefore, the terminal 100 needs to have a data transmission function, that is, the terminal 100 needs to include a communication module internally.
- FIG. 1 shows a communication module such as the RF circuit 110, the WiFi module 190, and the communication interface 180, it can be understood that at least one of the above components or the other is present in the terminal 100 for A communication module (such as a Bluetooth module) that implements communication for data transmission.
- a communication module such as a Bluetooth module
- the terminal 100 when the terminal 100 is a mobile phone, the terminal 100 may include the RF circuit 110, and may further include the WiFi module 190; when the terminal 100 is a computer, the terminal 100 may include the communication.
- the interface 180 may further include the WiFi module 190.
- the terminal 100 When the terminal 100 is a tablet computer, the terminal 100 may include the WiFi module.
- the memory 140 can be used to store software programs as well as modules.
- the processor 130 executes various functional applications and data processing of the terminal 100 by running software programs and modules stored in the memory 140.
- the memory 140 may mainly include a storage program area and a storage data area.
- the storage program area can store an operating system (mainly including a corresponding software program or module such as a kernel layer, a framework layer, and an application layer).
- the application layer may include various applications, such as an application having a media automatic play function; the storage data area may store multimedia files such as various pictures and video files.
- the memory 140 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
- the input unit 150 can be configured to receive numeric or character information input by a user, and generate a key signal input related to user settings and function control of the terminal 100.
- the input unit 150 may include a touch panel 151 and other input devices 152.
- the touch panel 151 can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 151 or on any suitable object or accessory.
- the operation in the vicinity of the touch panel 151) drives the corresponding connecting device according to a preset program.
- the touch panel 151 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
- the processor 130 is provided and can receive commands from the processor 130 and execute them.
- the touch panel 151 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
- the other input device 152 may include, but is not limited to, one or more of a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.
- function keys such as a volume control button, a switch button, etc.
- a trackball such as a mouse, a joystick, and the like.
- the display unit 160 can be used to display information input by a user or information provided to a user and various menus of the terminal 100.
- the display unit 160 is a display system of the terminal 100 for presenting an interface to implement human-computer interaction.
- the display unit 160 may include a display panel 161.
- the display panel 161 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
- LCD liquid crystal display
- OLED organic light-emitting diode
- the touch panel 151 may cover the display panel 161, and when the touch panel 151 detects a touch operation on or near it, the touch panel 151 transmits to the processor 130 to determine the type of the touch event. The processor 130 then provides a corresponding visual output on the display panel 161 based on the type of touch event.
- the touch panel 151 and the display panel 161 are two independent components to implement the input and input functions of the terminal 100, in some embodiments, the touch may be
- the control panel 151 is integrated with the display panel 161 to implement input and output functions of the terminal 100.
- the processor 130 is a control center of the terminal 100, connecting various components using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 140, and calling stored in the memory.
- the data within 140 performs various functions and processing data of the terminal 100 to implement a variety of services based on the terminal.
- the processor 130 may include one or more processing units.
- the processor 130 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, and the modem processor mainly processes wireless communications. It can be understood that the above modem processor may not be integrated into the processor 130.
- the terminal 100 also includes a power source 120 (such as a battery) for powering various components.
- a power source 120 can be logically connected to the processor 130 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption through the power management system.
- the terminal 100 further includes an audio circuit 170, a microphone 171, and a speaker 172, which can provide an audio interface between the user and the terminal 100.
- the audio circuit 170 can be used to convert the audio data to a signal that the speaker 172 can recognize and transmit the signal to the speaker 172 for conversion by the speaker 172 to a sound signal output.
- the microphone 171 is used to collect an external sound signal (such as a human voice, or other sound, etc.), and convert the collected external sound signal into a signal recognizable by the audio circuit 170, and transmit it to the audio circuit 170.
- the audio circuit 170 can also be used to convert the signal transmitted by the microphone 171 into audio data, and then output the audio data to the RF circuit 110 for transmission to, for example, another terminal, or output the audio data to the memory 140 for subsequent further processing.
- the terminal 100 may further include at least one type of sensor, a camera, etc., and details are not described herein.
- FIG. 2 shows a schematic diagram of an input event triggering app play video in the prior art.
- the terminal is the mobile phone 200 as an example, and the Android system is taken as an example.
- the software architecture of the mobile phone 200 mainly includes three layers, a kernel, a framework layer, and an application layer.
- a system runtime library (libraris) may be included between the kernel layer and the framework layer.
- Layer (not shown in Figure 2), the system runtime layer provides support for the upper layer, that is, the framework layer.
- the Android operating system runs the C/C++ library included in the system runtime layer to implement the framework. The function to be implemented by the layer.
- the kernel layer mainly includes the input/output device driver (keyboard, touch screen, earphone, speaker, microphone, etc.) and the device node.
- the user inputs the operation through the input device, and the kernel layer generates the corresponding original input event according to the input operation, and stores it in the device node. in.
- the framework layer mainly includes an input manager service (IMS) and a window manager service (WMS).
- IMS input manager service
- WMS window manager service
- the input reader (not shown) in the IMS can perform translation, encapsulation, and the like on the original input event stored in the device node, and obtain an input event containing more information, and send it to the WMS, where the WMS stores Clickable area of each application (such as controls), location information of the focus window, and so on. Therefore, WMS can correctly distribute input events to specified controls or focus windows.
- the application layer includes applications with video playback capabilities, such as web browsers, instant messaging applications, or video applications that provide video content (eg Youtube, Youku, etc.).
- applications with video playback capabilities such as web browsers, instant messaging applications, or video applications that provide video content (eg Youtube, Youku, etc.).
- the input operation is a click operation
- the web browser or the timely communication application calls the media player in the frame layer (mediaplayer).
- Interface the player that launches the framework layer.
- the web browser or instant messaging application plays the video.
- the mediaplayer calls the playback activity monitor (playback activity monitor) interface, and monitors the pause state or playback state of the player through the playback activity monitor.
- the above describes the process by which the user triggers the app to play the video through an input operation.
- apps with media autoplay such as WeChat, Weibo, Vibrato, etc.
- the process of playing video is different from the previous process.
- the WeChat does not require the user's playback operation to automatically trigger the frame layer to create the player, so as to automatically play the advertisement and other media. This non-user consciously triggered media play may not be the user.
- Such auto-play ads may waste resources, and may also consume data traffic, increase the processing load of mobile phones, waste power consumption, and may even affect other running processes (such as software downloads, photo cloud synchronization, etc.) ) The speed at which data is uploaded or downloaded.
- the embodiment of the present application provides a do not disturb method and a terminal.
- the terminal is in the media DND mode.
- the terminal can determine whether the behavior of creating the player is actively triggered by the user. If yes, the media is played, and if not, the media is paused.
- automatic playback of media can be avoided, thereby reducing resource waste, reducing data traffic consumption, reducing the burden of mobile phone processing, reducing power consumption, and reducing the impact on uploading data or downloading data of other running processes.
- FIG. 1 is a schematic diagram of a hardware framework of a terminal provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of a software architecture of a terminal provided by an embodiment of the present application.
- the software architecture of the terminal 100 mainly includes three layers: a kernel layer, a framework layer, and an application layer.
- the IMS in Figure 3 adds the ability to identify input events in the input event that may trigger playback behavior.
- the playback activitymonitor adds a function of comparing the distribution information of the input event recognized by the IMS with the information about the application creation player in the terminal 100, and the specific content will be described below.
- FIG. 1 is a hardware architecture of an embodiment of the present application
- FIG. 3 is a software architecture of an embodiment of the present application
- software programs and/or modules corresponding to the software architecture in FIG. 3 are stored in the memory 140
- the processor 130 runs the memory.
- the software programs and applications stored in 140 perform the following process:
- the IMS reads the original input event from the device node to process the input event containing more information, identifies the obtained input event, and identifies the first input event, wherein the first input event includes a possible trigger to play The input event of the behavior.
- the IMS then distributes the first input event to the corresponding app (such as app1) in the application layer via WMS.
- the IMS records the distribution information of the first input event, such as the package name of the app1, the process ID, and the distribution time;
- the app1 calls the mediaplayer interface in the framework layer to create the player. Then, the mediaplayer also records the information about creating the player, such as the package name, process ID, and creation time of the app1. Then, app1 calls the playbackactivitymonitor interface in the framework layer and sends the relevant information for creating the player to the playbackactivitymonitor.
- the playback activity monitor can obtain the distribution information of the first input event recorded in the IMS. Then, a second input event is found from the first input event, the distribution time of the second input event is earlier than the creation time, and the time difference between the distribution time and the creation time of the player is less than the preset time. It is then determined whether the package name (or process ID) of the app1 of the second input event is the same as the package name (or process ID) of the app1 that created the player. If the same, the playing media, for example, app1 calls the mediaplayerstart interface (not shown) in the framework layer to implement the playing media.
- the present invention does not limit this; if not, pause the media play, for example, app1 calls the mediaplayerpause interface (not shown) in the framework layer to implement pause playback. Device. When not the same, you can also stop media playback, for example, call the mediaplayerstop interface in the framework layer to stop media playback.
- FIG. 4 is a do not disturb method according to an embodiment of the present application.
- a mobile phone is taken as an example for introduction.
- the hardware architecture of the mobile phone is as shown in FIG. 1
- the software architecture is as shown in FIG. 3
- the software program and/or module corresponding to the software architecture in the mobile phone is stored in the memory 140
- the processor 130 runs in the memory 140 .
- Software program and application to execute the flow of the DND method provided by the embodiment of the present application.
- the process of the method may include:
- S401 The mobile phone detects that the media is in the DND mode.
- the mobile phone can also have a media do not disturb mode, and the user can turn on the media do not disturb mode in the mobile phone.
- the “media do not disturb mode” refers to a mode in which media automatic playback is prohibited. For example, when WeChat is in the media DND mode, the automatic playback of media in WeChat is prohibited.
- the processor 130 in the handset detects that it is currently in the media DND mode while running software programs and/or modules in the kernel layer.
- the user can turn on the settings option in the phone and launch the media DND mode in the settings options.
- Figures 5A-5C show interface diagrams of setup options in a handset.
- the "Do Not Disturb” option 501 is displayed in the setting options in the handset 500.
- the "Do Not Disturb” setting interface 502 is entered, see Figure 5B.
- the "DND” setting control interface 502 displays the "Media Do Not Disturb Mode” switch control 503.
- the mobile phone 500 turns off the media do not disturb mode by default, that is, the slider in the switch control 503 is on the left side.
- the slider in the switch control 503 moves to the right, and the color of the left side of the switch control 503 is displayed, that is, the mobile phone 500 turns on the media DND mode, and the DND mode has media play installed in the mobile phone.
- the application of the function takes effect, and these applications can be selected by the user, or the mobile phone can be classified according to the function of the application.
- the display of the handset 500 can also display the interface as shown in FIG. 5C.
- the mobile phone 500 displays an icon of an app (app with media autoplay function) installed in itself, and the user can select which apps are enabled for the media DND mode.
- the WeChat switch control 504 can be triggered, that is, the WeChat switch control 504 is in an open state, and when the mobile phone 500 runs WeChat, the media DND mode is adopted.
- the media can be automatically played when the mobile phone 500 runs the browser.
- apps having the media automatic play function such as WeChat, browser, vibrato, microblog, facebook, twitter, and the like.
- the user can also open the media do not disturb mode of the mobile phone in other manners, which is not limited in this embodiment of the present invention.
- a shortcut icon for setting the media do not disturb mode can be displayed on the display of the mobile phone, and when the user triggers the shortcut icon, the mobile phone starts the media do not disturb mode.
- the handset detects an operation to turn on the media DND mode, it is confirmed that the handset is in the media DND mode.
- the mobile phone can detect the state of the switch control corresponding to the media do not disturb mode in the setting option, and if it is in the on state, confirm that the mobile phone is in the media do not disturb mode.
- a media do not disturb list may be stored in the mobile phone.
- the app package name of these apps is added to the media DND list.
- the mobile phone detects the operation of launching the app, it can determine whether the app package name of the app exists in the media DND list. If it exists, the mobile phone uses the DND method provided by the application to process when the app is running, so as to reduce the situation that the app automatically plays the media. If it does not exist, the mobile phone can be processed in the prior art manner when the app is running, that is, the media is automatically played.
- S402 The mobile phone acquires an input event.
- the processor 130 in the handset reads the original input event from the kernel layer while running the software program and/or module in the IMS in the framework layer, and then processes the read raw input event to include more The input event of the information, that is, the input event.
- the user can trigger an input operation through an input device such as a touch screen, a microphone, a headphone, etc., to generate a corresponding hardware interrupt
- an input device such as a touch screen, a microphone, a headphone, etc.
- the kernel layer of the operating system processes the input operation into an original input event for storage, and the framework layer reads the original input event.
- the original input event is processed into an input event containing more information, which is distributed to the application of interest.
- the input operation may be various. Taking the touch screen as an example, the input operation may be a click or slide operation of the user on the touch screen. Taking a microphone as an example, the input operation may be a "play" command that the user inputs through the microphone voice.
- the input operation may be a playback, pause, volume up or down operation triggered by the earphone. That is, an input event corresponding to an input operation that may trigger a play behavior is an input event that may trigger a play behavior.
- an “input event” refers to processing an original input event into an input event containing more information.
- S403 The mobile phone identifies the first input event in the acquired input event.
- the processor 130 in the mobile phone runs the software program and/or module in the IMS in the framework layer
- the acquired input event may continue to be identified.
- the first algorithm module different from the IMS is set in the mobile phone to identify the acquired input event, and the processor 130 in the mobile phone is running the software program and/or module corresponding to the first algorithm module to execute: the first algorithm module
- the input event is obtained from the IMS, and then the acquired input event is identified.
- the first algorithm module may not operate in a state where the mobile phone is not in the media do not disturb mode. After the mobile phone detects that it is currently in the media DND mode, it starts running the first algorithm module.
- the first algorithm module may identify whether the input event is the first input event after each input event is acquired, or may identify whether multiple input events exist after acquiring multiple input events. The first input event.
- the first input event is an input event corresponding to the user's play operation.
- How the application responds to input events is generally determined by the application (especially third-party applications outside of the system application). That is to say, it is usually an application to determine which operations of the user are playback operations. Therefore, in the prior art, it is generally difficult for the framework layer to determine whether the input event corresponds to the user's playback operation through an input event itself, that is, to determine the application. Whether to play media in response to this input event.
- the embodiment of the present invention determines some input events that are generally corresponding to the user's playback operation as the first input event, for example, an input event corresponding to a "play" command input through a microphone voice, and a play command triggered by the earphone.
- the preset event list may include at least one first input event.
- the preset event list can be a list obtained by the mobile phone manufacturer according to experiments or experience, and then stored in the mobile phone when the mobile phone is shipped from the factory.
- the preset event list may also be a user-defined, updatable list. For example, the user may add an input event corresponding to the playback operation that he often uses to the preset event list.
- the first algorithm module can identify whether the first input event exists in the acquired input event by comparing the acquired input event and the preset event list.
- the first algorithm module identifies the input if an input event acquired by the first algorithm module matches the preset event list, that is, an input event acquired by the first algorithm module exists in the preset event list.
- the event is the first input event.
- the first algorithm module identifies the first input event in the acquired input event, and there may be two cases. First, the phone does not recognize the first input event, ie the first input event is zero. Second, the mobile phone recognizes the first input event, that is, the first input event is not zero. In the first case, since there is no first input event, if the application with the media automatic play function in the mobile phone creates the player during the running process, it is determined that the automatic play behavior can directly suspend the media play. For the second case, S404-S410 can continue to be executed.
- the mobile phone records first information of the first input event, where the first information includes an app package name, a process ID, a distribution time, and the like of the app to which the input event is distributed.
- the processor 130 in the mobile phone may record the app package name, process ID, distribution time, etc., to which the first input event is distributed to the app when running the software program and/or module in the IMS in the framework layer.
- the first information recorded by the mobile phone can be recorded in the form of a table, see Table 1.
- S405 The player is created while the mobile phone is running.
- the mobile phone when the condition of playing the media is satisfied, the mobile phone creates a player, and these conditions may be various. For example, when the mobile phone is running a certain video playing app, when the video playing window in the display interface of the app is partially displayed or completely displayed, the mobile phone creates a player to play the media. Or, when the mobile phone receives a short message or an incoming call sent by another mobile phone, the mobile phone also creates a player to play the incoming call ringtone or short message prompt tone. Or, in the process of browsing the app interface or the webpage, the pop-up advertisement play window, etc., the mobile phone also creates a player. In the actual process, there may be other reasons for creating a player, which is not specifically limited in the embodiment of the present application.
- the processor 130 in the mobile phone calls the mediaplayer interface in the framework layer, runs the mediaplayer interface, and completes the creation of the player.
- the mobile phone creation player can also be implemented in other manners, which is not specifically limited in the embodiment of the present application.
- the mobile phone records the second information, where the second information includes an app package name, a process ID, a creation time, and the like of the app that creates the player.
- the processor 130 in the mobile phone invokes the mediaplayer interface in the framework layer, runs the mediaplayer interface, and completes the creation of the player. Then, the mediaplayer also records related information for creating the player, that is, the second information. Then, the processor 130 in the mobile phone continues to call the playback activity monitor interface in the framework layer, and the processor 130 sends the second information in the mediaplayer to the playback activity monitor.
- S407 The mobile phone determines whether there is a second input event in the first input event, the distribution time of the second input event is earlier than the creation time, and the time difference between the two is less than the preset time. If yes, execute S408, if no , then execute S410.
- the second input event is one or more of the first input events identified by S402-S404.
- the playback activity monitorr stores the related information for creating the player, that is, the second information, and the first information of the first input event is stored in the IMS. Therefore, when the processor 130 in the mobile phone runs the playback activity monitor in the framework layer, the first information stored in the IMS is sent to the playback activity monitor, and the process of determining whether the second input event exists in the first input event is implemented through the playback activity monitor.
- the second input event can be found in the aforementioned Table 1 according to the creation time.
- the mobile phone looks for the second input event in Table 1.
- the specific value of the preset time may be determined according to actual conditions, for example, according to the calculation rate of the terminal. When the operation rate is high, the preset time can be set shorter, and when the operation rate is lower, the preset time can be set longer.
- S408 The mobile phone determines whether the app package name of the app to which the second input event is distributed is the same as the app package name in the second information, and/or determines the process ID and the second information of the app to which the second input event is distributed. Whether the process IDs are the same, if yes, execute S409, and if no, execute S410.
- the processor 130 in the mobile phone performs a S408 in a playback activity monitor in the framework layer.
- a second algorithm module different from the playback activity monitor is provided in the mobile phone to execute S408. Then, when the processor 130 in the mobile phone runs the software program and/or module corresponding to the first algorithm module, the second information is obtained from the playback activity monitor, the first information is obtained from the IMS, and then S408 is performed.
- the second algorithm module is in a non-operation state by default, and when the mobile phone detects that it is in the media DND mode, it starts running the second algorithm module.
- an app corresponds to one process or multiple processes. Therefore, the following two cases are explained. In the first case, an app corresponds to a process. In the second case, an app corresponds to multiple processes.
- the mobile phone since an app corresponds to a process, the mobile phone only needs to judge whether the package name of the app to which the second input event is distributed and the app package name in the second information are the same, or the mobile phone only needs to judge that the second input event is The process ID of the app to be distributed and the process ID in the second information are the same.
- the mobile phone determines whether the package name of the app to which the second input event is distributed and the app package name in the second information are the same, and can also determine that the second input event is distributed. Whether the process ID of the app and the process ID in the second information are the same. In this way, it is more accurate to locate the player and the second input event is distributed to the same process in the same app.
- S409 The mobile phone plays media.
- the processor 130 in the mobile phone calls the mediaplayerstart interface (not shown in FIG. 3) in the framework layer, triggers the display unit 160 to display the video contained in the media through the mediaplayerstart interface, and/or triggers the speaker 172 to play the audio contained in the media. To achieve media playback.
- the mobile phone may also output a first prompt message before the media is played, and the first prompt information is used to prompt the user whether to confirm the playing media. In this way, it can be further determined that the trigger media playing behavior is actively triggered by the user to improve accuracy.
- FIG. 6 is a schematic diagram of first prompt information displayed by a mobile phone provided by an embodiment of the present application.
- the terminal is a mobile phone as an example, and the WeChat in the mobile phone is taken as an example.
- the display interface of the WeChat circle displayed by the mobile phone includes an advertisement play window 601, a prompt information 602, a "confirm” control 603, and a “cancel” control 604, and the prompt information 602 is "alert: whether to confirm the advertisement. ".
- the advertisement is played in the advertisement play window 601.
- the phone pauses or stops playing the advertisement.
- S402-S404 is to determine whether there is a first input event in the acquired input event, and when present, obtain the first information in the acquired input event, and S402-S404 may be sequentially executed.
- S405-S406 is to determine whether the mobile phone is created by the mobile phone, and when the player is created, the second information for creating the player is acquired, and S405 is executed before S406.
- S402-S404 may be executed sequentially with S405-S406, or simultaneously. Among them, S404 and S406 are completed before S407-S408.
- S402-408 is only an example of an implementation, and its purpose is to determine whether an input event in the acquired input event has caused the creation of the player. Considering that after the user performs a playback operation on an interface of an application, an input event corresponding to the playback operation is distributed to the application, and the application triggers the creation of the player in response to the input event, thereby determining one of the acquired input events.
- Whether the input event causes the creation of the player can determine whether an input event satisfies the following conditions: (1) the input event is the first input event, (2) the input event is distributed earlier than the player creation time, and The time difference is less than the preset time (for example, determining whether there is a second input event in S407); (3) the app to which the input event is distributed is the same app as the app creating the player (for example, the second comparison in S408) Enter the app package name and/or process ID of the event, and create the app package name and/or process ID).
- the target event When a target input event that satisfies the above three conditions is found from the acquired input event, the target event may be considered to cause the app to create a player, and then S409 is performed, if one of the three conditions is not satisfied, then It is considered that the creation of the player is not caused by the user's playback operation, and the application may be automatically played, or for other reasons, S410 is executed.
- S410 The mobile phone pauses media playback.
- the processor 130 in the handset invokes the mediaplayerpause interface (not shown in Figure 3) in the framework layer to pause media playback.
- the mediaplayerstop interface (not shown in Figure 3) in the framework layer to stop media playback.
- the media may contain images and/or sounds, so when the phone pauses the media, it may choose to pause the playback of the image and/or the playback of the sound. For example, when only pause sound playback, the phone can set the speaker to mute or set the speaker volume to zero.
- the mobile phone can also display through the display that the media is in a paused state or a stopped state to prompt the user that the media has been paused or has stopped playing.
- the phone can display a pause control or a stop control.
- the terminal is a mobile phone as an example, and the WeChat in the mobile phone is taken as an example.
- the WeChat circle displayed on the display screen of the mobile phone includes an advertisement play window 701, wherein the pause control 702 is included in the advertisement play window 701.
- the phone can display a black screen status in the media play window on the display.
- the mobile phone displays a black screen status in the media play window to prompt the user that the media has been paused or stopped. Therefore, the mobile phone may not acquire the media (for example, the media video may be a network video or a local video). In this way, the computing time and resources of the mobile phone can be saved and the efficiency can be improved.
- the mobile phone can also display images or texts in the media play window on the display.
- the mobile phone in order to beautify the media play window, may acquire one frame of image, and then display the acquired one frame image in the media play window.
- the phone displays a pause control on the image so that the user knows that the media is currently paused.
- One frame of image acquired by the mobile phone may be one frame of image in the media.
- the mobile phone can acquire a frame of video (network video or local video).
- the first frame of the video can be acquired.
- the image obtained by the mobile phone can also be a customized image of the mobile phone.
- the mobile phone can obtain a frame image that is not related to the media from the network or locally.
- the mobile phone can directly pause the playing media, and can also output a second prompt message to prompt the user whether to automatically play the media.
- FIG. 8 is a schematic diagram of second prompt information displayed by the mobile phone provided by the embodiment of the present application.
- the terminal is a mobile phone as an example, and the WeChat in the mobile phone is taken as an example.
- the display interface of the WeChat circle of friends displayed by the mobile phone includes an advertisement play window 801, prompt information 802, a “confirmation” control 803, and a “cancel” control 804, and the prompt information 802 is “alert: whether to play an advertisement”.
- the prompt information 802 is “alert: whether to play an advertisement”.
- the advertisement is played in the advertisement play window 801.
- the phone pauses or stops playing the ad.
- the player when the mobile phone receives information from other terminals or an incoming call, the player can also create a player to play a system prompt tone (sms alert tone or incoming call alert tone).
- the mobile phone may further determine whether to play the media by determining the playing duration of the media.
- the short message tone is a file stored locally on the mobile phone, and the playing time is short.
- the duration of the SMS alert tone can be recorded in the mobile phone.
- the mobile phone receives the short message of the other mobile phone, after the player is created, the mobile phone determines whether the playing time of the short message prompting sound to be played by the player is less than the preset duration. If yes, it is determined to be a short message tone, and the short message tone is played. If it is greater than, pause the playback of the SMS alert tone. In this way, even if the mobile phone is in the media DND mode, when the mobile phone receives the information sent by other mobile phones, such as SMS, WeChat message, QQ message, etc., the user can promptly prompt the user to receive the message.
- the terminal can avoid automatic media playback, save data traffic, reduce power consumption, and improve user experience.
- the user can trigger the media playing.
- the user can trigger the display of the pause control in the media play window to play the media.
- the player may be created multiple times while the phone is running. For example, in the process of browsing the app interface or the webpage, in order to browse more content, the app interface or the webpage is often swiped upwards, and in the process of sliding, the new media play may appear continuously in the app interface or the webpage.
- the window creates a player each time the media play window appears.
- the phone may continuously create a player when it receives a short message or a call from another mobile phone. Each time the player creates a player, the DND process shown in Figure 4 can be performed.
- the handset recognizes that the first input event (S403-S404) and the handset creation player (S405-S406) can be two separate processes with no sequence between them.
- the mobile phone can first create a player and then determine whether there is a first input event that matches the event that created the player.
- the mobile phone may first identify the first input event and then determine whether there is an event that creates a player that matches the first input event.
- S402-S404 can be continuously performed, that is, the mobile phone continuously acquires an input event, recognizes the first input event, and records the distribution process of the first input event as long as it is in the media do not disturb mode. Once the phone creates the player, S405-S410 is executed.
- the phone creates a player but does not recognize the first input event from the acquired input event (ie, S404 is not executed). Since there is no first input event, the mobile phone does not need to execute S407-S410 to directly suspend media playback. Of course, in this case, the mobile phone can continue to execute S407-S410, but since the first input event is zero, the execution result is still to pause the media play.
- the phone does not play the media. Therefore, the mobile phone can be executed without S407-S410.
- the phone will perform at least two processes during the creation of the player.
- the mobile phone receives the request information for creating the player, and then prepares to create the player based on the request information.
- the second process the phone creates a player.
- the request information generated by the app includes the app package name, the video address (the address of the streaming media or the address of the local video) or Video size, etc.
- the mobile phone sets a video tag based on the request information, that is, the set video tag includes an app package name, a video address, or a video size.
- the phone creates a player based on the video tag, which is the second process described above.
- the embodiment shown in Figure 4 occurs in the second process or after the second process, ie the handset has created the player.
- the app in the mobile phone generates request information for requesting to create a player, and the mobile phone determines whether the request information is generated by an input event in the acquired input event, and if so, the mobile phone creates The player plays the media, if not the phone does not create a player. See Figure 9:
- S901-S904 Please refer to S401-S404 in the embodiment shown in FIG. 2. Different from the embodiment shown in Fig. 4 is S905-S908.
- the app in the mobile phone generates request information for requesting to create a player, where the request information includes an app package name, a process ID, and a generation time of the request information.
- the request information for requesting to create the player may be generated. For example, when the conditions for playing the media are met, the app generates request information for creating the player. Please refer to the above for the conditions for playing media.
- the processor 130 in the mobile phone executes the software program/mode of the app to execute: when the app has the requirement of playing the media, generates request information, and the app sends the request information to the framework layer, and the framework layer receives the request.
- the player is created based on the request information.
- the app sends the request information to an API interface in the framework layer.
- the API interface sets the video tag based on the request information
- the API interface invokes the mediaplayer interface, and sends the video tag to the mediaplayer.
- the mediaplayer creates the player based on the tags. .
- S906 The mobile phone determines whether there is a second input event in the first input event, the distribution time of the second input event is earlier than the generation time, and the time difference between the two is less than the preset time. If yes, execute S907, if not, then Do not create a player.
- S907 The mobile phone determines whether the app package name in the first information is the same as the app package name in the request information, and/or determines whether the process ID in the first information and the process ID in the request information are the same, and if yes, executing S908, If not, the player is not created.
- S908 The mobile phone creates a player and plays the media.
- a player may be created to play the media.
- the processor 130 in the mobile phone calls the mediaplayer interface in the framework layer, runs the mediaplayer interface, and completes the creation of the player. Then, the processor 130 in the mobile phone invokes the mediaplayerstart interface in the framework layer, triggers the display unit 160 to display the video contained in the media through the mediaplayerstart interface, and/or triggers the speaker 172 to play the audio contained in the media to implement media playback.
- the application If an application's interface is displayed on the display of the mobile phone and the media play window in the interface is displayed in whole or in part, the application generates request information for creating the player. If the mobile phone determines that the request information is not triggered by an input event in the acquired input event, the player will not be created. Then the mobile phone can display a black screen in the media play window. If the user wants to play the media, the user can be triggered to trigger the mobile phone to create a corresponding media by triggering the control in the media play window.
- the user actively sets the mobile phone to be in the media do not disturb mode.
- the user may forget to set the media do not disturb mode, and directly open the app with the media automatic play function such as WeChat friends circle, vibrato.
- the media automatic play function such as WeChat friends circle, vibrato.
- the mobile phone can actively prompt the user whether to set the media DND mode.
- a possible implementation manner is that the mobile phone determines whether to output the third prompt information by using the current scene mode, and the third prompt information is used to prompt the user to set the media do not disturb mode.
- the mobile phone determines that it is currently in a silent mode, a conference mode, and the like. If the mobile phone detects the user launching app (app with media auto play function), the third prompt information may be displayed, and the third prompt information is used to prompt the user to be in the silent mode and set the media do not disturb mode.
- the mobile phone detects the user launching app (app with media auto play function)
- the third prompt information may be displayed, and the third prompt information is used to prompt the user to be in the silent mode and set the media do not disturb mode.
- the mobile phone may display the third prompt information while detecting the user launching the app, or may display the third prompt information when the user launches the app, and the media play window appears in the display interface of the app. Not limited.
- FIG. 10 shows a schematic diagram of a third prompt message displayed by a mobile phone.
- the third prompt information is displayed as an example in response to a user-triggered operation for initiating WeChat.
- the prompt information 1001 is displayed on the display screen of the mobile phone, specifically “currently in the silent mode, whether to open the media do not disturb mode”.
- two controls are also displayed. If the user triggers the "Cancel" control 1003, the mobile phone hides the prompt information and displays the app interface. If the user triggers the "OK" control 1002, the phone automatically initiates the media DND mode. Alternatively, after the user triggers the "OK" control 1002, the display screen of the mobile phone jumps to the display interface of the setting app (for example, jumps to FIG. 5A or FIG. 5B), and then the media DND mode is manually activated by the user.
- the mobile phone can determine whether to output the third prompt information by using the set schedule, and the third prompt information is used to prompt the user to set the media do not disturb mode.
- the user sets the schedule to 10:00-12:00: the meeting.
- the third prompt information may be displayed to prompt the user whether to set the media DND mode.
- the system time is between 10:00 and 12:00, and the mobile phone detects the operation of the user launching the app (app with the media automatic play function), and displays the third prompt information.
- the third prompt message is displayed when the media play window appears in the display interface of the app displayed on the display of the mobile phone.
- FIG. 11 shows a schematic diagram of a third prompt message displayed by a mobile phone.
- the third prompt information is displayed as an example in response to a user-triggered operation for initiating WeChat.
- the prompt information 1101 is displayed on the display screen of the mobile phone, specifically, "the daily schedule of the current time period is a conference, and it is determined whether the media DND mode is enabled."
- two controls are also displayed. If the user triggers the "Cancel” control 1103, the mobile phone hides the prompt information and displays the app interface. If the user triggers the "OK” control 1102, the phone automatically initiates the media DND mode. Alternatively, after the user triggers the "OK" control 1102, the display screen of the mobile phone jumps to the display interface of the setting app (for example, jumps to FIG. 5A or FIG. 5B), and then the media do not disturb mode is manually activated by the user.
- the mobile phone may determine whether to output the third prompt information according to whether the data traffic is in an open state, and the third prompt information is used to prompt the user to set the media do not disturb mode.
- the mobile phone detects the operation of the user launching app (app with media auto play function), or when the media play window appears in the display interface of the app displayed on the display screen of the mobile phone, if the mobile phone detects the current data traffic When it is on, a third prompt message is displayed to prompt the user to set the media do not disturb mode. In this way, it helps to reduce the waste of data traffic.
- FIG. 12 shows a schematic diagram of the third prompt information displayed by the mobile phone.
- the mobile phone in response to a user-triggered operation for initiating WeChat, displays a prompt message 1201 on the display screen of the mobile phone, specifically “data traffic is enabled, whether the media DND mode is set”. If the user triggers the "Cancel" control 1203, the mobile phone hides the prompt information and displays the app interface. If the user triggers the "OK" control 1202, the phone automatically initiates the media DND mode. Alternatively, after the user triggers the "OK” control 1202, the display screen of the mobile phone jumps to the display interface of the setting app (for example, jumps to FIG. 5A or FIG. 5B), and then the media DND mode is manually activated by the user.
- the display screen of the mobile phone jumps to the display interface of the setting app (for example, jumps to FIG. 5A or FIG. 5B), and then the media DND mode is manually activated by the user.
- the mobile phone may determine whether to output the third prompt information according to whether the wireless connection state is currently in use, and the third prompt information is used to prompt the user to turn off the media do not disturb mode. It should be noted that, in the embodiment of the present application, the mobile phone is in a wireless connection state, that is, the mobile phone is in a wifi connection state, or the mobile phone is in a state of accessing other free networks.
- the mobile phone detects the operation of the user launching app (app with media auto play function), or when the media play window appears in the display interface of the app displayed on the display of the mobile phone, if the mobile phone detects that the mobile phone is currently in the wireless state
- the connection state, and currently in the media DND mode displays a third prompt message to prompt the user to turn off the media DND mode.
- FIG. 13 shows a schematic diagram of a third prompt message displayed by a mobile phone.
- the mobile phone displays a prompt message 1301 on the display screen of the mobile phone in response to the user-triggered operation for initiating the WeChat, specifically “currently in the wireless connection state, whether to turn off the media DND mode”.
- the method provided by the embodiment of the present application is introduced from the perspective of the terminal as an execution subject.
- the terminal may include a hardware structure and/or a software module, and implement the foregoing functions in the form of a hardware structure, a software module, or a hardware structure plus a software module.
- One of the above functions is performed in a hardware structure, a software module, or a hardware structure plus a software module, depending on the specific application and design constraints of the technical solution.
- FIG. 14 shows a terminal 1400 provided by the present application.
- the terminal 1400 includes a display unit 1401, a processing unit 1402, and a playback control unit 1403.
- the display unit 1401 is configured to display an interface of the first application in the terminal 1400.
- the processing unit 1402 is configured to: when the interface of the first application includes a window for playing media, and the first application is in the media DND mode, determine whether the window playing the first media is triggered by a user playing operation;
- the playing control unit 1403 is configured to play the corresponding media when the processing unit 1402 determines that the window playing the first media is triggered by a user's playing operation;
- the playing control unit 1403 is configured to: when the processing unit 1402 determines that the window playing the first media is not triggered by a user's playing operation, pause or stop playing the corresponding media.
- the processing unit 1402 is further configured to: when the interface of the first application includes a window for playing media, create a player to play the first media, determine a creation time of the player;
- the unit 1402 is configured to: determine whether there is a target input event in the acquired input event, where the target input event is corresponding to the user's play operation, when it is used to determine whether the media corresponding to the window play is triggered by the user's play operation.
- the input event, the distribution time of the target input event is earlier than the creation time of the player, and the time difference between the distribution time of the target input event and the creation time of the player is less than the first preset duration, the target input An event is distributed to the first application; if the target input event exists, determining that the window plays the first media is triggered by a user's playing operation; if the target input event does not exist, determining that the window plays the first media Not triggered by the user's playback operation.
- the package name of the application to which the target input event is distributed is the same as the package name of the first application; and/or the process ID of the application to which the target input event is distributed and the first application The process number is the same.
- the playing control unit 1403 is further configured to: when the processing unit 1402 determines that the window playing the first media is not triggered by the user's playing operation, and determines that the total duration of the first media is greater than the second duration, Pause or stop playing the first media.
- the display unit 1401 is further configured to: when the processing unit 1402 determines that the window playing the first media is not triggered by a user's playing operation, the window of the playing media or the first window displayed in the pop-up window a control, the first control is configured to trigger playing the first media;
- the play control unit 1403 is further configured to play the first media when the processing unit 1402 detects that the first control is triggered.
- the first prompt information of the text or the icon is displayed in the window of the playing media or in the pop-up window, for prompting that the automatic playing is prohibited or prompting the user to play the first media.
- the display unit 1401 is further configured to: when the processing unit 1402 responds to the operation of the user, or detects that the data traffic is turned on, or when the terminal is in the conference mode or the silent mode, the display setting media is free.
- the first interface of the disturb mode the first interface includes a control for setting whether the media DND mode is enabled;
- the processing unit 1402 is further configured to enable the media DND mode for all or part of the terminals in response to an operation of a user to activate a control that the media DND mode is enabled.
- the method includes: The display unit is configured to display a second interface for setting a media DND mode in response to the operation of the control unit 1402 in response to the user activating the media DND mode; the second interface includes M An identifier of the application, and a control for setting the media DND mode to be enabled, wherein the M controls respectively correspond to the M applications; and M is an integer greater than or equal to 1;
- the processing unit 1402 is configured to enable the DND mode for the N applications corresponding to the N controls, where N is less than or equal to M positive, respectively, in response to the user activating an operation of the N controls of the M controls Integer.
- the display unit 1401 is further configured to display, when the processing unit 1402 is further configured to respond to a user operation, or detect that data traffic is turned on, or when the terminal is in a conference mode or a silent mode.
- Setting a second interface of the media DND mode the second interface includes an identifier of the M applications, and the M controls for setting whether the media DND mode is enabled, where the M controls respectively correspond to the M applications; M is an integer greater than or equal to 1.
- the display unit 1401 is further configured to: when the processing unit 1402 detects that the terminal accesses the wireless network, prompt the user to turn off the media do not disturb mode, or display the first interface.
- the terminal includes a display screen, a memory, where the software program and/or module of the first application, a software program and/or a module of the framework layer are stored, and the display screen displays an interface of the first application;
- the frame layer determines whether the first media is played by the user's playing operation; if the window plays the first media triggered by the user's playing operation, the frame layer plays the corresponding media; if the window plays the first media Not triggered by the user's playback operation, the framework layer pauses or stops playing the corresponding media.
- the method further includes: the frame layer creates a player to play the first media; and the frame layer determines the player
- the creation time of the frame layer determining whether the first media is triggered by the user's playing operation includes: the framework layer determines whether there is a target input event in the acquired input event, and the target input event is a user's play.
- the distribution time of the target input event is earlier than the creation time of the player, and the time difference between the distribution time of the target input event and the creation time of the player is less than the first preset duration, a target input event is distributed to the first application; if the target input event is present, the framework layer determines that the window plays the first media triggered by a user's play operation; if the target input event does not exist, The framework layer determines that the window playing the first media is not triggered by the user's playback operation.
- FIG. 15 shows a terminal 1500 provided by the present application.
- the terminal 1500 includes a display unit 1501, a processing unit 1502, a creating unit 1503, and a playing unit 1504.
- the display unit 1501 is configured to: display an interface of the first application
- the processing unit 1502 acquires request information for creating a player generated by the first application when the interface of the first application includes a window for playing the media; and if the first application is in the media DND mode, the determining unit Whether the request information is triggered by a user's playback operation;
- the creating unit 1503 is configured to: when the processing unit 1502 determines whether the request information is triggered by a user's playing operation, create a player;
- the playing unit 1504 is configured to play a corresponding media.
- the request information includes a generation time that the first application generates the request information
- the processing unit 1502 is specifically configured to: when the determining whether the request information is triggered by a user's play operation, Determining whether there is a target input event in the acquired input event, the target input event is an input event corresponding to a user's play operation, the target input event is distributed earlier than the request information generation time, and the target input event The time difference between the distribution time and the generation time is less than the first preset duration, the target input event is distributed to the first application; if the target input event is present, determining that the request information is triggered by the user's play operation Generating; if the target input event does not exist, determining that the request information is not triggered by a user's play operation.
- the package name of the application to which the target input event is distributed is the same as the package name of the first application; and/or the process ID of the application to which the target input event is distributed and the first application The process number is the same.
- the display unit 1501 is further configured to: when the processing unit 1502 determines that the request information is not triggered by a user's play operation, the window of the play media or the pop-up window displays the first control, The first control is configured to trigger creation of a player to play the first media;
- the creating unit 1503 is further configured to: when the processing unit 1502 detects that the first control is triggered, create a player;
- the playing unit 1504 is further configured to: after the creating unit 1503 creates a player, play the first media.
- the first prompt information of the text or the icon is displayed in the window of the playing media or in the pop-up window, for prompting that the automatic playing is prohibited or prompting the user to play the first media.
- the condition that the window plays the first media includes: the window of the playing media is displayed in whole or in part, or the window of the playing media is displayed in the center of the display screen of the terminal.
- the display unit 1501 is further configured to: when the processing unit 1502 responds to the user's operation, or detects that the data traffic is turned on, or when the terminal is in the conference mode or the silent mode, the display setting media is free.
- the first interface of the disturb mode the first interface includes a control for setting whether the media DND mode is enabled;
- the processing unit 1502 is further configured to enable the media DND mode to be applied to all or part of the terminal in response to an operation of the user to activate the control that the media DND mode is enabled.
- the display unit is configured to display a second interface for setting a media DND mode in response to the operation of the control unit 1502 in response to the user activating the media DND mode;
- the second interface includes M An identifier of the application, and a control for setting the media DND mode to be enabled, wherein the M controls respectively correspond to the M applications; and M is an integer greater than or equal to 1;
- the processing unit 1502 is configured to enable a DND mode for the N applications corresponding to the N controls, where N is less than or equal to M positive, respectively, in response to the user activating an operation of the N controls of the M controls Integer.
- the display unit 1501 is further configured to display when the processing unit 1502 is further configured to respond to a user operation, or when data traffic is detected to be turned on, or when the terminal is in a conference mode or a silent mode.
- Setting a second interface of the media DND mode includes an identifier of the M applications, and the M controls for setting whether the media DND mode is enabled, where the M controls respectively correspond to the M applications; M is an integer greater than or equal to 1.
- the display unit 1501 is further configured to: when the processing unit 1502 detects that the terminal accesses the wireless network, prompt the user to turn off the media DND mode, or display the first interface.
- the terminal comprises a display screen and a memory
- the software includes a software program and/or a module of the first application, a software program and/or a module of the framework layer
- the display screen displays an interface of the first application
- the framework layer acquires request information for requesting to create a player; the framework layer determines whether the request information is triggered by a user's play operation; and if the request information is triggered by a user's play operation, the framework The layer creates a player and plays the corresponding media; if the request information is not triggered by the user's playing operation, the framework layer rejects or discards the request information.
- the request information includes a generation time that the first application generates the request information, and the framework layer determines whether the request information is triggered by a user's play operation, where the framework layer determines that the acquired information is obtained.
- the target input event is an input event corresponding to a playback operation of the user
- the distribution time of the target input event is earlier than the generation time of the request information
- the distribution time of the target input event is The time difference of the generation time is less than the first preset duration, the target input event is distributed to the first application; if the target input event exists, the framework layer determines that the request information is triggered by a user's play operation Generating; if the target input event does not exist, the framework layer determines that the request information is not triggered by a user's play operation.
- Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
- a storage medium may be any available media that can be accessed by a computer.
- the computer readable medium may include a RAM, a ROM, an electrically erasable programmable read only memory (EEPROM), a compact disc read-only memory (CD-).
- ROM read-only memory
- Any connection may suitably be a computer readable medium.
- the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are included in the fixing of the associated medium.
- a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital video disc (DVD), a floppy disk, and a Blu-ray disc, wherein Disks typically replicate data magnetically, while disks use lasers to optically replicate data. Combinations of the above should also be included within the scope of the computer readable media.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Telephone Function (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
一种免打扰方法和终端。该方法包括:终端显示所述第一应用的界面;若所述第一应用的界面包括播放媒体的窗口,且所述第一应用处于媒体免打扰模式时,判断所述窗口播放第一媒体是否由用户的播放操作触发;若所述窗口播放第一媒体由用户的播放操作触发,播放所述对应的媒体;若所述窗口播放第一媒体不是由用户的播放操作触发,暂停或停止播放所述对应的媒体。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗
Description
本申请涉及终端技术领域,尤其涉及一种免打扰方法和终端。
随着近年来终端的各种功能的不断完善和提高,现有的终端中可以设置免打扰模式。在免打扰模式下,终端可以设置免打扰时间段,控制来电铃声或短信通知音等在免打扰时间段静音,方便用户在不便打扰的时间段使用。而目前的趋势是,终端中具有媒体自动播放功能的应用(application)日益增多,比如微信、微博、抖音等。以微信为例,用户打开手机中微信的朋友圈,当朋友圈中显示广告播放窗口时,会自动播放广告。然而,有些媒体,并不一定是用户真正想要看的,那么这些媒体的自动播放便造成了资源浪费,而且如果终端的数据流量处于开启状态时,媒体的自动播放会导致数据流量的消耗,造成用户的经济损失,而上述现有技术并不能解决该问题。
发明内容
本申请提供一种免打扰方法和终端,用以减少现有技术中终端中媒体的自动播放,减少可能的资源浪费,降低可能的数据流量的消耗。
第一方面,本申请实施例提供一种免打扰的方法,适用于安装有第一应用的终端,该方法包括:终端显示所述第一应用的界面;若所述第一应用的界面包括播放媒体的窗口,且所述第一应用处于媒体免打扰模式时,判断所述窗口播放第一媒体是否由用户的播放操作触发;若所述窗口播放第一媒体由用户的播放操作触发,播放所述对应的媒体;若所述窗口播放第一媒体不是由用户的播放操作触发,暂停或停止播放所述对应的媒体。
在本申请实施例中,终端中的第一应用可以被设置成媒体免打扰模式,终端可以判断第一应用的界面中的媒体播放窗口播放第一媒体的行为是否由用户的播放操作触发,若是,则播放对应的媒体,若否,则暂停或停止播放对应的媒体。在这种方式下,通过用户的播放操作决定媒体播放窗口是否播放媒体,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,当所述窗口播放第一媒体的条件满足时,创建播放器以播放所述第一媒体,确定所述播放器的创建时间;终端在判断所述窗口播放对应的媒体是否由用户的播放操作触发时,确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,确定所述窗口播放第一媒体不是由用户的播放操作触发。
在本申请实施例中,终端从已获取的输入事件中确定的目标输入事件需要满足三个条件,1、目标输入事件是播放操作对应的输入事件;2、目标输入事件的分发时间早于播放器的创建时间,且二者时间差小于预设时间;3、目标输入事件被分发到的app,与创建播 放器的app是同一个app。通过这三个条件,可以较为准确的确定目标输入事件,即较为准确的确定窗口播放对应的媒体是否由用户的播放操作触发。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述终端判断已获取的输入事件中是否存在目标输入事件时,执行的步骤包括:判断已获取的输入事件中是否存在用户的播放操作对应的第一输入事件;若存在第一输入事件,判断第一输入事件中是否存在分发时间与所述创建时间之间的时间差小于预设时间的第二输入事件;若存在第二输入事件,判断所述第二输入事件被分发到的应用与创建播放器的应用是否为同一应用;若是同一应用,确定存在目标输入事件,目标输入事件即为第二输入事件;若不是同一应用,确定不存在目标输入事件。
在本申请实施例中,如前述内容可知,目标输入事件需要满足三个条件,那么终端从已获取的输入事件中确定的目标输入事件时,可以判断已获取的输入事件中的某个输入事件是否依次满足这三个条件,若全部满足,该输入事件便是目标输入事件。在判断判断已获取的输入事件中的某个输入事件是否依次满足这三个条件的过程中,判断顺序可以任意。比如,可以先判断是否满足第一个条件,当满足了第一个条件之后判断是否满足判断第二个条件,当满足第二个条件之后判断是否满足第三个条件。通过这三个条件,可以较为准确的确定目标输入事件,即较为准确的确定窗口播放对应的媒体是否由用户的播放操作触发。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
在本申请实施例中,目标输入事件被分发到的app,与创建播放器的app是同一个app。由于一个app对应一个或多个进程,当一个app对应一个进程时,手机只需判断目标输入事件被分发到的app的包名和创建播放器的app包名是否相同,或者,手机只需判断目标输入事件被分发到的app的进程ID和创建播放器的进程ID是否相同即可。当一个app对应多个进程,手机判断目标输入事件被分发到的app的包名和创建播放器的app包名是否相同后,还可以判断目标输入事件被分发到的app的进程ID和创建播放器的进程ID是否相同。通过这种方式,可较为准确的确定创建播放器的app和目标输入事件被分发到的app是否为同一个app。
在一种可能的设计中,若所述窗口播放第一媒体不是由用户的播放操作触发,并且所述第一媒体的总时长大于第二时长,暂停或停止播放所述第一媒体。
在本申请实施例中,对于一些非用户有意识触发的,而且播放时长较长的媒体,终端可以暂停或者停止播放第一媒体。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,若所述窗口播放第一媒体不是由用户的播放操作触发,所述终端在所述播放媒体的窗口或在弹出的窗口显示第一控件,所述第一控件用于触发播放所述第一媒体;当所述第一控件被触发时,所述终端播放所述第一媒体。
在本申请实施例中,当第一应用的界面中出现媒体播放窗口,但窗口播放第一媒体不是用户有意识触发的情况下,终端会暂停或停止媒体播放,但是终端还可以显示第一控件,比如,终端暂停或停止媒体播放时,媒体播放窗口显示黑屏,但是终端在播放媒体的窗口 或在弹出的窗口中显示第一控件,若用户想要播放媒体,可以触发第一控件。通过这种方式,终端可以避免媒体的自动播放,从而减少资源浪费。同时,在暂停或停止媒体播放后,用户还可以触发播放媒体,提高用户体验。
在一种可能的设计中,在所述播放媒体的窗口或在弹出的窗口显示文字或图标的第一提示信息,用于提示自动播放被禁止或提示用户是否播放所述第一媒体。
在本申请实施例中,当第一应用的界面中出现媒体播放窗口,但窗口播放第一媒体不是用户有意识触发的情况下,终端会暂停或停止媒体播放。终端可以在播放媒体的窗口或在弹出的窗口显示第一提示信息,以提示自动播放被禁止或提示用户是否播放所述第一媒体。通过这种方式,终端可以避免媒体的自动播放,从而减少资源浪费。同时,在暂停或停止媒体播放后,用户还可以触发播放媒体,提高用户体验。
在一种可能的设计中,终端响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式。
在本申请实施例中,终端在特定的场景下,(比如用户主动设置、或者数据流量开启,或者处于会议模式时),显示设置媒体免打扰模式的第一界面。用户可以通过第一界面中的控件,对所述终端中的全部或部分应用开启媒体免打扰模式。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,终端响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;终端响应于用户激活所述媒体免打扰模式是否开启的控件的操作,显示用于设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数;终端响应于用户激活所述M个控件中的一个控件的操作,对与所述一个控件对应的应用开启媒体免打扰模式。
在本申请实施例中,用户可以根据自己的需求选择针对终端中的哪些应用开启媒体免打扰模式。比如用户常用的是微信,那么可以对微信开启媒体免打扰模式。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗。
在一种可能的设计中,终端响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数。
在本申请实施例中,终端在特定的场景下,(比如用户主动设置、或者数据流量开启,或者处于会议模式时),显示设置媒体免打扰模式的第二界面。用户可以通过第二界面中的M个控件,选择对所述终端中的哪些应用开启媒体免打扰模式。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,当检测到所述终端接入了wifi时,提示用户关闭所述媒体免打扰模式,或显示所述第一界面。
通常,在终端接入了wifi的情况下,用户更希望自动播放媒体。因此,在本申请实施例中,终端处于媒体免打扰模式后,若检测到终端接入了wifi,可以提示用户关闭媒体免打扰模式,或者显示用于设置媒体免打扰模式的第一界面,用户通过第一界面的控件,关闭媒体免打扰模式,有助于提高了用户体验。
在一种可能的设计中,所述终端包括显示屏、存储器,所述存储器中存储第一应用的软件程序和/或模块、框架层的软件程序和/或模块;显示屏显示所述第一应用的界面;框架层判断窗口播放第一媒体是否由用户的播放操作触发;若所述窗口播放第一媒体由用户的播放操作触发,所述框架层播放所述对应的媒体;若所述窗口播放第一媒体不是由用户的播放操作触发,所述框架层暂停或停止播放所述对应的媒体。
在本申请实施例中,当第一应用的界面中出现媒体播放窗口时,所述框架层判断窗口播放第一媒体是否由用户的播放操作触发,若是,播放媒体,若不是,暂停或停止播放媒体。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,在所述第一应用的界面中包括播放媒体的窗口时,所述框架层创建播放器以播放所述第一媒体;所述框架层确定所述播放器的创建时间;所述框架层判断窗口播放第一媒体是否由用户的播放操作触发,包括:所述框架层确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,所述框架层确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,所述框架层确定所述窗口播放第一媒体不是由用户的播放操作触发。
在本申请实施例中,框架层判断窗口播放第一媒体是否由用户的播放操作触发,即所述框架层确定已获取的输入事件中是否存在目标输入事件,若存在,确定所述窗口播放第一媒体由用户的播放操作触发;若不存在,所述框架层确定所述窗口播放第一媒体不是由用户的播放操作触发。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
第二方面,本申请实施例提供一种免打扰的方法,适用于安装有第一应用的终端,该方法包括:终端显示所述第一应用的界面,所述第一应用的界面包括播放媒体的窗口;接收第一应用发送的用于创建播放器的请求信息;若所述第一应用处于媒体免打扰模式时,判断所述请求信息是否由用户的播放操作触发生成的;若所述请求信息是否由用户的播放操作触发产生,创建播放器,播放对应的媒体。
在本申请实施例中,终端中的第一应用处于媒体免打扰模式时,若终端显示的第一应用的界面出现媒体播放窗口时,第一应用生成用于请求创建播放器的请求信息。终端判断该请求信息是否由用户的播放操作触发生成,若是,则播放对应的媒体,若否,则暂停或停止播放对应的媒体。在这种方式下,通过用户的播放操作决定媒体播放窗口是否播放媒体,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述请求信息中包含生成所述请求信息的生成时间;所述判断所述请求信息是否由用户的播放操作触发生成的,包括:确定已获取的输入事件中是否存 在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于请求信息的生成时间,且所述目标输入事件的分发时间与所述生成时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述请求信息由用户的播放操作触发生成;若不存在所述目标输入事件,确定所述请求信息不是由用户的播放操作触发生成。
在本申请实施例中,终端从已获取的输入事件中确定的目标输入事件需要满足三个条件,1、目标输入事件是播放操作对应的输入事件;2、目标输入事件的分发时间早于请求信息的生成时间,且二者时间差小于预设时间;3、目标输入事件被分发到的app,与创建播放器的app是同一个app。通过这三个条件,可以较为准确的确定目标输入事件,即较为准确的确定请求信息是否由用户的播放操作触发生成的。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述终端判断已获取的输入事件中是否存在目标输入事件时,执行的步骤包括:判断已获取的输入事件中是否存在用户的播放操作对应的第一输入事件;若存在第一输入事件,判断第一输入事件中是否存在分发时间与所述创建时间之间的时间差小于预设时间的第二输入事件;若存在第二输入事件,判断所述第二输入事件被分发到的应用与创建播放器的应用是否为同一应用;若是同一应用,确定存在目标输入事件,目标输入事件即为第二输入事件;若不是同一应用,确定不存在目标输入事件。
在本申请实施例中,如前述内容可知,目标输入事件需要满足三个条件,那么终端从已获取的输入事件中确定的目标输入事件时,可以判断已获取的输入事件中的某个输入事件是否依次满足这三个条件,若全部满足,该输入事件便是目标输入事件。在判断判断已获取的输入事件中的某个输入事件是否依次满足这三个条件的过程中,判断顺序可以任意。比如,可以先判断是否满足第一个条件,当满足了第一个条件之后判断是否满足判断第二个条件,当满足第二个条件之后判断是否满足第三个条件。通过这三个条件,可以较为准确的确定目标输入事件,即较为准确的确定请求信息是否由用户的播放操作触发生成。通过这种方式下,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
在一种可能的设计中,若所述请求信息不是由用户的播放操作触发,所述终端在所述播放媒体的窗口或在弹出的窗口显示第一控件,所述第一控件用于触发创建播放器以播放所述第一媒体;当所述第一控件被触发时,所述终端创建播放器播放所述第一媒体。
在一种可能的设计中,在所述播放媒体的窗口或在弹出的窗口显示文字或图标的第一提示信息,用于提示自动播放被禁止或提示用户是否播放所述第一媒体。
在一种可能的设计中,所述窗口播放第一媒体的条件包括:所述播放媒体的窗口被全部或部分显示,或者所述播放媒体的窗口被显示在终端的显示屏的中央。
在一种可能的设计中,终端响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式。
在一种可能的设计中,响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式,包括:响应于用户激活所述媒体免打扰模式是否开启的控件的操作,显示用于设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数;分别响应于用户激活所述M个控件中的N个控件的操作,对与所述N个控件对应的N个应用开启免打扰模式,其中N为小于等于M个正整数。
在一种可能的设计中,终端响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数。
在一种可能的设计中,当检测到所述终端接入了无线网络时,提示用户关闭所述媒体免打扰模式,或显示所述第一界面。
在一种可能的设计中,终端包括显示屏和存储器,所述存储器中包括第一应用的软件程序和/或模块、框架层的软件程序和/或模块;显示屏显示所述第一应用的界面;所述框架层获取第一应用生成的用于请求创建播放器的请求信息;所述框架层判断所述请求信息是否由用户的播放操作触发生成的;若所述请求信息是由用户的播放操作触发产生的,所述框架层创建播放器,播放对应的媒体;若所述请求信息不是由用户的播放操作触发产生的,所述框架层拒绝或丢弃所述请求信息。
在本申请实施例中,在第一应用的界面出现播放媒体的窗口时,框架层获取用于请求创建播放器的请求信息,框架层判断所述请求信息是否由用户的播放操作触发生成的,若是,则创建播放器播放媒体,若不是,则拒绝或丢请求信息。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述请求信息中包含第一应用生成所述请求信息的生成时间;所述框架层判断所述请求信息是否由用户的播放操作触发生成,包括:所述框架层确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于请求信息的生成时间,且所述目标输入事件的分发时间与所述生成时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,所述框架层确定所述请求信息由用户的播放操作触发生成;若不存在所述目标输入事件,所述框架层确定所述请求信息不是由用户的播放操作触发生成。
在本申请实施例中,当第一应用的界面中出现媒体播放窗口时,框架层获取用于请求创建播放器的请求信息,框架层判断请求信息是否由用户的播放操作触发生成。具体的,所述框架层确定已获取的输入事件中是否存在目标输入事件,若存在,确定所述窗口播放第一媒体由用户的播放操作触发;若不存在,所述框架层确定所述窗口播放第一媒体不是由用户的播放操作触发。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
第三方面,本申请实施例提供一种免打扰的方法,该方法适用于终端,该方法包括:终端处于媒体免打扰模式时,若所述终端的第一应用在运行过程中创建播放器以播放媒体, 则判断是否存在与创建播放器事件相匹配的输入事件,所述输入事件为可能触发播放行为的输入事件;若存在所述输入事件,所述终端播放媒体;若不存在所述输入事件,所述终端暂停或者停止媒体播放。
在本申请实施例中,终端可以被设置成免打扰模式,当第一应用在运行过程中可以创建播放器。比如,第一应用的界面出现媒体播放窗口时,可以创建播放器。或者第一应用(短信、电话)接收到来自其它终端的信息或来电,也可以创建播放器。终端创建播放器后,判断是否存在与创建播放器事件相匹配的输入事件,如果存在,说明创建播放器的事件是用户主动触发的,如果不存在,说明创建播放器的事件不是用户主动触发的,是第一应用自动触发或者其它原因触发的。如果是用户主动触发的,终端播放媒体,如果不是用户主动触发的,终端暂停或停止媒体播放。通过这种方式,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗。
在一种可能的设计中,所述终端判断是否存在与创建播放器相匹配的输入事件,包括:终端确定播放器的创建时间,终端从已获取的输入事件中确定是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定存在与创建播放器事件相匹配的输入事件;若不存在所述目标输入事件,确定不存在与创建播放器事件相匹配的输入事件。
在一种可能的设计中,所述终端判断已获取的输入事件中是否存在目标输入事件时,执行的步骤包括:判断已获取的输入事件中是否存在用户的播放操作对应的第一输入事件;若存在第一输入事件,判断第一输入事件中是否存在分发时间与所述创建时间之间的时间差小于预设时间的第二输入事件;若存在第二输入事件,判断所述第二输入事件被分发到的应用与创建播放器的应用是否为同一应用;若是同一应用,确定存在目标输入事件,目标输入事件即为第二输入事件;若不是同一应用,确定不存在目标输入事件。
在一种可能的设计中,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
第四方面,本申请实施例提供一种终端,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得终端能够实现第一方面或者第一方面的任意一种可能的设计的方法。或者,当存储器存储的一个或多个计算机程序被处理器执行时,使得终端能够实现第二方面或者第二方面的任意一种可能的设计的方法。或者,当存储器存储的一个或多个计算机程序被处理器执行时,使得终端能够实现第三方面或者第三方面的任意一种可能的设计的方法。
第五方面,本申请实施例还提供了一种终端,所述终端包括执行第一方面或者第一方面的任意一种可能的设计的方法的模块/单元。或者,所述终端包括执行第二方面或者第二方面的任意一种可能的设计的方法的模块/单元。或者,所述终端包括执行第三方面或者第三方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第六方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行第一方面或上述第一方面的任意一种可能的设计的方法。或者,当计算机程序在终端上运行时,使得所述服 务器执行第二方面或上述第二方面的任意一种可能的设计的方法。或者,当计算机程序在终端上运行时,使得所述第一终端执行第三方面或上述第三方面的任意一种可能的设计的方法。
第七方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在终端上运行时,使得所述终端执行第一方面或上述第一方面的任意一种可能的设计的方法。或者,当所述计算机程序产品在终端上运行时,使得终端执行第二方面或上述第二方面的任意一种可能的设计的方法。或者,当所述计算机程序产品在终端上运行时,使得所述终端执行第三方面或上述第三方面的任意一种可能的设计的方法。
图1为本发明一实施例提供的一种终端的硬件架构的示意图;
图2为现有技术中终端通过输入事件触发app播放视频的流程示意图;
图3为本发明一实施例提供的一种终端的软件架构的示意图;
图4为本发明一实施例提供的免打扰方法的流程示意图;
图5A为本发明一实施例提供的终端中的设置app的示意图;
图5B为本发明一实施例提供的终端中的设置app的示意图;
图5C为本发明一实施例提供的终端中的设置app的示意图;
图6为本发明一实施例提供的终端显示第一提示信息的示意图;
图7为本发明一实施例提供的终端显示媒体处于暂停状态的示意图;
图8为本发明一实施例提供的终端显示第二提示信息的示意图;
图9为本发明一实施例提供的终端显示第二提示信息的示意图;
图10为本发明一实施例提供的终端显示第三提示信息的示意图;
图11为本发明一实施例提供的终端显示第三提示信息的示意图;
图12为本发明一实施例提供的终端显示第三提示信息的示意图;
图13为本发明一实施例提供的终端显示第三提示信息的示意图;
图14为本发明一实施例提供的一种终端的示意图;
图15为本发明一实施例提供的一种终端的示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
以下,对本申请实施例中的部分用语进行说明,以便于本领域技术人员理解。
本申请实施例涉及的终端,又可以称为用户设备(User Equipment,UE)。终端中可以安装各种应用(在下文的介绍中简称app),比如微信,邮箱、微博等。终端可以是智能手机、平板电脑、各类可穿戴设备、车载设备等。
本申请实施例涉及的操作系统(operating system,OS),是运行在终端上的最基本的系统软件。以智能手机为例,操作系统可以是安卓(android)系统或IOS系统。以下以Android系统为例进行介绍。本领域技术人员可以理解,其它操作系统中,也可以采用类似的算法实现。
通常终端可以同时运行多个应用。较为简单的,一个应用对应一个进程,较为复杂的,一个应用对应多个进程。每个进程具备一个进程号(进程ID)。
以用户在触摸屏上进行触摸操作为例,触摸屏检测触摸操作,产生相应的硬件中断,操作系统的内核(kernel)层接收到触摸操作后,将触摸操作加工成原始输入事件(包括触摸坐标,触摸对应的时间戳等信息)存储在内核层中的设备节点中。框架(framework)层从设备节点中读取原始输入事件,并将其进行翻译、封装等处理,得到包含更多信息的输入事件。然后,框架层将该输入事件分发到感兴趣的应用或软件模块,应用或软件模块对其接收到的输入事件作出响应,比如更新自己的窗口画面或者执行特定的操作等。
本申请实施例涉及的媒体,包含流媒体(包括音频,和视频等),还包括短信提示音、来电铃声等系统提示音,系统提示音可以存储在终端本地。流媒体可以理解为网络设备将视频、声音等数据经过封装(压缩编码、数据打包)后按照一定的时序要求发送给终端,终端在后续数据不断到达的同时对接收的数据进行解封并播放的媒体。
本申请实施例涉及的多个,是指大于或等于两个。
另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
本申请实施例提供了一种免打扰方法和终端,该方法适用于终端中。图1示出了一种可能的终端的结构图。参阅图1所示,所述终端100包括:射频(Radio Frequency,RF)电路110、电源120、处理器130、存储器140、输入单元150、显示单元160、音频电路170、通信接口180、以及无线保真(Wireless Fidelity,WiFi)模块190等部件。本领域技术人员可以理解,图1中示出的终端的结构并不构成对终端的限定,本申请实施例提供的终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对所述终端100的各个构成部件进行具体的介绍:
所述RF电路110可用于通信或通话过程中,数据的接收和发送。特别地,所述RF电路110在接收到基站的下行数据后,发送给所述处理器130处理;另外,将待发送的上行数据发送给基站。通常,所述RF电路110包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。
此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
WiFi技术属于短距离无线传输技术,所述终端100通过WiFi模块190可以连接接入点(Access Point,AP),从而实现数据网络的访问。所述WiFi模块190可用于通信过程中,数据的接收和发送。
所述终端100可以通过所述通信接口180与其他设备实现物理连接。可选的,所述通信接口180与所述其他设备的通信接口通过电缆连接,实现所述终端100和其他设备之间的数据传输。
由于在本申请实施例中,所述终端100能够实现通信业务,向其他联系人发送信息,因此所述终端100需要具有数据传输功能,即所述终端100内部需要包含通信模块。虽然图1示出了所述RF电路110、所述WiFi模块190、和所述通信接口180等通信模块,但是可以理解的是,所述终端100中存在上述部件中的至少一个或者其他用于实现通信的通 信模块(如蓝牙模块),以进行数据传输。
例如,当所述终端100为手机时,所述终端100可以包含所述RF电路110,还可以包含所述WiFi模块190;当所述终端100为计算机时,所述终端100可以包含所述通信接口180,还可以包含所述WiFi模块190;当所述终端100为平板电脑时,所述终端100可以包含所述WiFi模块。
所述存储器140可用于存储软件程序以及模块。所述处理器130通过运行存储在所述存储器140的软件程序以及模块,从而执行所述终端100的各种功能应用以及数据处理。
可选的,所述存储器140可以主要包括存储程序区和存储数据区。其中,存储程序区可存储操作系统(主要包括内核层,框架层和应用层等各自对应的软件程序或模块)。其中,应用层可以包含各种应用,比如具有媒体自动播放功能的应用;存储数据区可存储比如各种图片、视频文件等多媒体文件等。
此外,所述存储器140可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
所述输入单元150可用于接收用户输入的数字或字符信息,以及产生与所述终端100的用户设置以及功能控制有关的键信号输入。
可选的,输入单元150可包括触控面板151以及其他输入设备152。
其中,所述触控面板151,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在所述触控面板151上或在所述触控面板151附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,所述触控面板151可以包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给所述处理器130,并能接收所述处理器130发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现所述触控面板151。
可选的,所述其他输入设备152可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
所述显示单元160可用于显示由用户输入的信息或提供给用户的信息以及所述终端100的各种菜单。所述显示单元160即为所述终端100的显示系统,用于呈现界面,实现人机交互。
所述显示单元160可以包括显示面板161。可选的,所述显示面板161可以采用液晶显示屏(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置。
进一步的,所述触控面板151可覆盖所述显示面板161,当所述触控面板151检测到在其上或附近的触摸操作后,传送给所述处理器130以确定触摸事件的类型,随后所述处理器130根据触摸事件的类型在所述显示面板161上提供相应的视觉输出。
虽然在图1中,所述触控面板151与所述显示面板161是作为两个独立的部件来实现所述终端100的输入和输入功能,但是在某些实施例中,可以将所述触控面板151与所述显示面板161集成而实现所述终端100的输入和输出功能。
所述处理器130是所述终端100的控制中心,利用各种接口和线路连接各个部件,通过运行或执行存储在所述存储器140内的软件程序和/或模块,以及调用存储在所述存储器 140内的数据,执行所述终端100的各种功能和处理数据,从而实现基于所述终端的多种业务。
可选的,所述处理器130可包括一个或多个处理单元。可选的,所述处理器130可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到所述处理器130中。
所述终端100还包括用于给各个部件供电的电源120(比如电池)。可选的,所述电源120可以通过电源管理系统与所述处理器130逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。
如图1所示,终端100还包括音频电路170、麦克风171和扬声器172,可提供用户与终端100之间的音频接口。音频电路170可用于将音频数据转换为扬声器172能够识别的信号,并将信号传输到扬声器172,由扬声器172转换为声音信号输出。麦克风171用于收集外部的声音信号(如人说话的声音、或者其它声音等),并将收集的外部的声音信号转换为音频电路170能够识别的信号,发送给音频电路170。音频电路170还可用于将麦克风171发送的信号转换为音频数据,再将音频数据输出至RF电路110以发送给比如另一终端,或者将音频数据输出至存储器140以便后续进一步处理。
尽管未示出,所述终端100还可以包括至少一种传感器、摄像头等,在此不再赘述。
下面介绍与本申请相关的背景技术。
图2示出了现有技术中输入事件触发app播放视频的示意图。在图2中,以终端是手机200为例,且以安卓系统为例。如图所示,手机200的软件架构主要包括3层,内核、框架层以及应用层,当然,图2所示的软件架构中,在内核层和框架层之间还可以包含系统运行库(libraris)层(图2中未示出),该系统运行库层为上层即框架层提供支撑,当框架层被使用时,安卓操作系统会运行系统运行库层中包含的C/C++库以实现框架层要实现的功能。
内核层主要包含输入/输出设备的驱动(键盘、触摸屏、耳机、扬声器、麦克风等)以及设备节点,用户通过输入设备进行输入操作,内核层根据输入操作产生相应的原始输入事件,存储在设备节点中。
框架层主要包含输入事件管理服务器(input manager service,IMS)和系统窗口管理服务(window manager service,WMS)。其中,IMS中的input reader(图中未示出)可以对存储在设备节点中的原始输入事件进行翻译、封装等处理,得到包含更多信息的输入事件,并发送到WMS,WMS中存储有每个应用程序的可点击区域(比如控件)、焦点窗口的位置信息等。因此,WMS可以正确的将输入事件分发到指定的控件或者焦点窗口。
应用层包括具有视频播放功能的应用,例如网页浏览器,即时通信应用,或者专门提供视频内容的视频应用(例如Youtube,优酷等)。以输入操作是点击操作为例,若点击操作对应的输入事件被分发到网页浏览器或及时通信应用中的播放控件,网页浏览器或及时通信应用通过调用框架层中的媒体播放器(mediaplayer)接口,启动框架层的播放器。然后,网页浏览器或即时通信应用播放视频。图2中,mediaplayer调用播放行为监视器(playbackactivitymonitor)接口,通过playbackactivitymonitor监控播放器的暂停状态或者播放状态等等。
上文介绍用户通过输入操作触发app播放视频的流程。对于具有媒体自动播放功能的 app,比如微信、微博、抖音等app,播放视频的流程与前述过程不同。以微信为例,用户点击触摸屏,打开微信朋友圈的显示界面。当该显示界面中出现媒体播放窗口时,微信不需要用户的播放操作而自动触发框架层创建播放器,以实现自动播放广告等媒体,这种非用户有意识触发的媒体播放,很有可能不是用户想要的,这类自动播放广告可能会造成资源浪费,而且还可能造成数据流量的消耗,手机处理负担加重,浪费功耗,甚至可能影响其它正在运行的进程(例如软件下载,照片云同步等)的上传数据或下载数据的速度。
本申请实施例提供一种免打扰方法和终端。在该方法中,终端处于媒体免打扰模式,当终端创建播放器时,终端可以判断创建播放器的行为是否为用户主动触发的,若是,则播放媒体,若否,则暂停播放媒体。通过该方法,可以避免媒体的自动播放,从而减少资源浪费,降低数据流量的消耗,减轻手机处理的负担,降低功耗,减少对其它正在运行的进程的上传数据或下载数据的速度的影响。
图1示出了本申请实施例提供的终端的硬件框架的示意图,对应的,图3示出了本申请实施例提供的终端的软件架构的示意图。如图3所示,终端100的软件架构主要包含3层:内核层、框架层和应用层。与图2相比,图3中的IMS新增了识别输入事件中的可能触发播放行为的输入事件的功能。playbackactivitymonitor新增了比较IMS识别出的输入事件的分发信息与终端100中的应用创建播放器的相关信息的功能,具体内容将在下文介绍。
其中,内核层、框架层以及应用层的功能与图2所示内容相同的部分,此处不再重复。应理解,图1是本申请实施例的硬件架构,图3是本申请实施例的软件架构,图3中的软件架构对应的软件程序和/或模块存储在存储器140中,处理器130运行存储器140中存储的软件程序和应用以执行如下过程:
(1)IMS从设备节点中读取原始输入事件进行处理得到包含更多信息的输入事件后,对得到的输入事件进行识别,识别出第一输入事件,其中,第一输入事件包含可能触发播放行为的输入事件。然后,IMS通过WMS将第一输入事件分发到应用层中相应的app(比如app1)。IMS记录第一输入事件的分发信息,比如app1的包名(package name)、进程ID和分发时间等;
(2)当app1被运行时,由于用户的播放操作,或者由于用户浏览应用界面的过程中无意识的激活了播放窗口,或者是其它情况,造成了app1调用框架层中的mediaplayer接口以创建播放器,那么mediaplayer也要记录创建播放器的相关信息,比如创建播放器的是app1的包名、进程ID和创建时间等。然后,app1调用框架层中的playbackactivitymonitor接口,并将创建播放器的相关信息发送给playbackactivitymonitor。
(3)playbackactivitymonitor可以获取IMS中记录的第一输入事件的分发信息。然后从第一输入事件中寻找第二输入事件,第二输入事件的分发时间早于所述创建时间,且该分发时间与播放器的创建时间之间的时间差小于预设时间。然后判断第二输入事件的app1的包名(或进程ID)与创建播放器的app1的包名(或进程ID)是否相同。若相同,播放媒体,例如app1调用框架层中的mediaplayerstart接口(图中未示出),以实现播放媒体。具体的,可按照现有技术的实现方式,本发明对此不做限定;若不相同,暂停媒体播放,例如,app1调用框架层中的mediaplayerpause接口(图中未示出),以实现暂停播放器。在不相同时,还可以停止媒体播放,例如,调用框架层中的mediaplayerstop接口,停止媒体播放。
请参考图4,为本申请实施例提供的免打扰方法,在下文的介绍中,将以手机为例进 行介绍。应理解,手机的硬件架构如图1所示,软件架构如图3所示,其中,手机中的软件架构对应的软件程序和/或模块存储在存储器140中,处理器130运行存储器140中存储的软件程序和应用以执行本申请实施例提供的免打扰方法的流程。如图4所示,该方法的流程可以包括:
S401:手机检测到当前处于媒体免打扰模式。
类似于会议模式、室外模式等情景模式,手机中也可以具有媒体免打扰模式,用户可以打开手机中的媒体免打扰模式。需要说明的是,在本申请实施例中,如无特别说明,“媒体免打扰模式”是指禁止媒体自动播放的模式。比如,微信处于媒体免打扰模式时,禁止微信中媒体的自动播放。
示例性的,手机中的处理器130在运行内核层中的软件程序和/或模块时,检测当前处于媒体免打扰模式。
作为一种示例,用户可以打开手机中的设置选项,在设置选项中启动媒体免打扰模式。
示例性的,图5A-5C示出了手机中的设置选项的界面示意图。如图5A所示,手机500中的设置选项中显示“免打扰”选项501。当用户激活“免打扰”选项501后,进入“免打扰”的设置界面502,请参见图5B。
如图5B所示,“免打扰”的设置界面502中显示“媒体免打扰模式”的开关控件503。手机500默认关闭媒体免打扰模式,即开关控件503中的滑块处于左侧。当用户触发开关控件503后,开关控件503中的滑块向右移动,并且开关控件503左侧显示颜色,即手机500开启媒体免打扰模式,该免打扰模式对手机中已安装的具有媒体播放功能的应用生效,这些应用可以由用户选择,或者是手机根据应用的功能分类得到。
在一种实施例中,当用户触发媒体免打扰模式的开关控件503后,手机500的显示屏还可以显示如图5C所示的界面。在图5C中,手机500显示自身中安装的app(具有媒体自动播放功能的app)的图标,用户可以选择针对哪些app开启媒体免打扰模式。比如,用户选择微信,可以触发微信的开关控件504,即微信的开关控件504处于开启状态,手机500运行微信时,采用媒体免打扰模式。再比如,用户并未选择浏览器,那么手机500运行浏览器时,媒体可以自动播放。
在本申请实施例中,具有媒体自动播放功能的app可以有多种,比如微信、浏览器、抖音、微博、脸书(facebook)、推特(twitter)等。
当然,用户还可以通过其它方式打开手机的媒体免打扰模式,本发明实施例对此不作限制。比如,手机的显示屏上可以显示设置媒体免打扰模式的快捷图标,当用户触发该快捷图标时,手机启动媒体免打扰模式。
作为一种示例,当手机检测到用于开启媒体免打扰模式的操作后,确认手机处于媒体免打扰模式。
作为另一种示例,手机可以检测设置选项中媒体免打扰模式对应的开关控件的状态,若处于开启状态,则确认手机处于媒体免打扰模式。
在本申请实施例中,手机中可以存储有媒体免打扰清单。当手机检测到用户开启针对某些app的媒体免打扰模式后,将这些app的app包名添加到该媒体免打扰清单中。当手机检测到启动app的操作后,可以判断该app的app包名是否存在于媒体免打扰清单中。若存在,则手机在运行该app时,采用本申请提供的免打扰方法来处理,以减少该app自动播放媒体的情况出现。若不存在,则手机在运行该app时,可以按现有技术的方式处理, 即自动播放媒体。
S402:手机获取输入事件。
示例性的,手机中的处理器130在运行框架层中的IMS中的软件程序和/或模块时,从内核层读取原始输入事件,然后将读取的原始输入事件加工得到的包含更多信息的输入事件,即获取到输入事件。
如前述内容可知,用户可以通过输入设备比如触摸屏、麦克风、耳机等触发输入操作,产生相应的硬件中断,操作系统的内核层将输入操作加工成原始输入事件进行存储,框架层读取原始输入事件,将原始输入事件加工成包含更多信息的输入事件,将该输入事件被分发到感兴趣的应用。其中,输入操作可以有多种,以触摸屏为例,输入操作可以是用户在触摸屏上的点击或者滑动操作。以麦克风为例,输入操作可以是用户通过麦克风语音输入的“播放”指令。以耳机为例,输入操作可以是通过耳机触发的播放、暂停、音量调高或调低等操作。即,可能触发播放行为的输入操作对应的输入事件便是可能触发播放行为的输入事件。
需要说明的是,本发明实施例中,如无特别说明,“输入事件”是指将原始输入事件加工成包含更多信息的输入事件。
S403:手机识别获取的输入事件中的第一输入事件。
示例性的,手机中处理器130在运行框架层中的IMS中的软件程序和/或模块时,获取输入事件后,可以继续对获取的输入事件进行识别。或者,手机中设置有与IMS不同的第一算法模块对获取的输入事件进行识别,那么手机中的处理器130在运行第一算法模块对应的软件程序和/或模块以执行:第一算法模块从IMS中获取输入事件,然后对获取的输入事件进行识别。为了节省功耗,在手机不处于媒体免打扰模式的状态下,第一算法模块可以不运行。手机检测到当前处于媒体免打扰模式后,开始运行第一算法模块。
作为一种示例,第一算法模块可以在每次获取到一个输入事件后,便识别该输入事件是否为第一输入事件,也可以在获取多个输入事件后,识别多个输入事件中是否存在可第一输入事件。
其中,第一输入事件为用户的播放操作对应的输入事件。由于应用对输入事件如何响应一般由应用决定(尤其是系统应用之外的第三方应用)。也就是说,通常是应用来决定用户的哪些操作才是播放操作,因此,现有技术中,框架层一般较难通过一个输入事件本身来确定该输入事件是否对应用户的播放操作,即确定应用是否响应该输入事件而播放媒体。对此,本发明实施例确定了一些通常与用户的播放操作对应的输入事件作为第一输入事件,比如,通过麦克风语音输入的“播放”指令对应的输入事件,通过耳机触发的播放指令对应的输入事件,通过触摸屏触发的触摸操作(比如在触摸屏上的单击操作)对应的输入事件等。预设事件列表中可以包含至少一个第一输入事件。预设事件列表可以是手机生产厂家根据实验或经验获得,然后在手机出厂时存储于手机中的列表。当然,预设事件列表还可以是用户自定义的、可更新的列表,比如用户可以将自己经常使用的播放操作对应的输入事件添加到预设事件列表中。
举例来说,第一算法模块被运行后可以通过比对已获取的输入事件和预设事件列表来识别已获取的输入事件中是否存在第一输入事件。其中,若第一算法模块获取的一个输入事件与所述预设事件列表匹配,即第一算法模块获取的一个输入事件存在于所述预设事件列表中,则第一算法模块识别出该输入事件为第一输入事件。
当然,第一算法模块识别获取的输入事件中的第一输入事件,可能会有两种情况。第一种,手机并未识别出第一输入事件,即第一输入事件为零。第二种,手机识别出第一输入事件,即第一输入事件不为零。对于第一种情况,由于不存在第一输入事件,若手机中具有媒体自动播放功能的应用在运行的过程中创建播放器,则确定为自动播放行为,可以直接暂停媒体播放。对于第二种情况,可继续执行S404-S410。
S404:手机记录第一输入事件的第一信息,所述第一信息包含输入事件被分发到的app的app包名、进程ID、分发时间等。
示例性的,手机中的处理器130在运行框架层中的IMS中的软件程序和/或模块时,可以记录第一输入事件被分发到app的app包名、进程ID、分发时间等。
作为一种示例,手机记录第一信息可以以表格的形式记录,请参见表1。
表1
S405:手机在运行过程中,创建播放器。
在本申请实施例中,当播放媒体的条件满足时,手机创建播放器,这些条件可能有多种。比如,手机在运行某个视频播放app的过程中,app的显示界面中视频播放窗口被部分显示或被完全显示时,手机创建播放器来播放媒体。或者,手机接收到其它手机发送的短消息或者来电时,手机也会创建播放器来播放来电铃声或者短信息提示音。或者,用户在浏览app界面或者网页的过程中,弹出的广告播放窗口等,手机也会创建播放器。在实际过程中,创建播放器还可能有其它原因,本申请实施例不作具体限定。
示例性的,手机中的处理器130调用框架层中的mediaplayer接口,运行该mediaplayer接口,完成播放器的创建。当然,手机创建播放器还可以通过其它方式来实现,本申请实施例不作具体的限定。
S406:手机记录第二信息,所述第二信息包含创建播放器的app的app包名、进程ID、创建时间等。
示例性的,手机中的处理器130调用框架层中的mediaplayer接口,运行该mediaplayer接口,完成播放器的创建,那么mediaplayer中也要记录创建播放器的相关信息,即第二信息。然后,手机中的处理器130继续调用框架层中的playbackactivitymonitor接口,处理器130将mediaplayer中的第二信息发送给playbackactivitymonitor。
S407:手机判断第一输入事件中是否存在第二输入事件,第二输入事件的分发时间早于所述创建时间,且二者之间的时间差小于预设时间,若是,则执行S408,若否,则执行S410。
也就是说,第二输入事件是S402-S404识别出的第一输入事件中的一个或几个。
如前述内容可知,playbackactivitymonitor中存储有创建播放器的相关信息,即第二信息,IMS中存储有第一输入事件的第一信息。因此,手机中的处理器130在运行框架层中的playbackactivitymonitor时,将IMS中存储的第一信息发送给playbackactivitymonitor,通过playbackactivitymonitor实现判断第一输入事件中是否存在第二输入事件的过程。
作为一种示例,手机确定创建播放器的创建时间后,可以根据创建时间在前述的表1中寻找第二输入事件。当然,手机在表1中寻找第二输入事件,可能存在两种情况,第一种,未寻找到第二输入事件。第二种,寻找到第二输入事件。对于第一种情况,由于第二输入事件为零,若手机中具有媒体自动播放功能的应用在运行的过程中创建播放器,则确定为自动播放行为。对于第二种情况,可继续执行S408-S410。
在本申请实施例中,预设时间的具体取值可以根据实际情况而定,比如可以根据终端的运算速率来定。当运算速率较高时,预设时间可以设置的较短,当运算速率较低时,预设时间可以设置的较长。
S408:手机判断第二输入事件被分发到的app的app包名与第二信息中的app包名是否相同,和/或判断第二输入事件被分发到的app的进程ID和第二信息中的进程ID是否相同,若是,则执行S409,若否,则执行S410。
示例性的,手机中的处理器130在框架层中的playbackactivitymonitor来执行S408。或者,手机中设置有与playbackactivitymonitor不同的第二算法模块来执行S408。那么手机中的处理器130在运行第一算法模块对应的软件程序和/或模块时,从playbackactivitymonitor中获取第二信息,从IMS中获取第一信息,然后执行S408。为了节省功耗,第二算法模块默认处于不运行状态,当手机检测到自身处于媒体免打扰模式时,开始运行第二算法模块。
如前述内容可知,一个app对应一个进程或多个进程。因此下文分两种情况进行说明。第一种情况,一个app对应一个进程。第二种情况,一个app对应多个进程。
第一种情况,由于一个app对应一个进程,手机只需判断第二输入事件被分发到的app的包名和第二信息中的app包名是否相同,或者,手机只需判断第二输入事件被分发到的app的进程ID和第二信息中的进程ID是否相同即可。
第二种情况,由于一个app对应多个进程,手机判断第二输入事件被分发到的app的包名和第二信息中的app包名是否相同后,还可以判断第二输入事件被分发到的app的进程ID和第二信息中的进程ID是否相同。通过这种方式,可较为准确的定位到创建播放器和第二输入事件被分发到的是同一个app中的同一个进程中。
S409:手机播放媒体。
示例性的,手机中的处理器130调用框架层中的mediaplayerstart接口(图3中未示出),通过mediaplayerstart接口触发显示单元160显示媒体包含的视频,和/或触发扬声器172播放媒体包含的音频,实现媒体播放。
当然,为了提高准确性,手机在播放媒体之前,还可以输出第一提示信息,该第一提示信息用于提示用户是否确认播放媒体。通过这种方式,可以进一步确定触发媒体播放行为是用户主动触发的,提高准确性。
示例性的,图6示出了本申请实施例提供的手机显示的第一提示信息的示意图。在图6中,以终端是手机为例,且以手机中的微信为例。如图6所示,手机显示的微信朋友圈的显示界面中包含广告播放窗口601、提示信息602、“确认”控件603和“取消”控件604,该提示信息602为“提醒:是否确认播放广告”。当用户触发“确认”控件603时,广告播放窗口601中播放广告。当用户触发“取消”控件604时,手机暂停或停止播放广告。
在本申请实施例中,S402-S404是为了判断已获取的输入事件中是否存在第一输入事件,并在存在时,获取该获取的输入事件中的第一信息,S402-S404可以顺序执行。 S405-S406是为了判断手机是否创建了播放器,并在创建了播放器时,获取创建播放器的第二信息,S405先于S406执行。S402-S404可以与S405-S406先后执行,或同时执行。其中,S404和S406在S407-S408之前完成执行。
可以理解,S402-408只是一个实现的举例,其目的是为了判断已获取的输入事件中的某个输入事件是否导致了创建播放器。考虑到在用户在一个应用的界面进行播放操作后,该播放操作对应的输入事件被分发至该应用,该应用响应该输入事件而触发创建播放器,因此,判断已获取的输入事件中的某个输入事件是否导致了创建播放器可以判断一个输入事件是否满足以下条件:(1)该输入事件是第一输入事件,(2)该输入事件的分发时间早于播放器的创建时间,且二者时间差小于预设时间(例如S407中的判断是否存在第二输入事件);(3)该输入事件被分发到的app,与创建播放器的app是同一个app(例如S408中的比较第二输入事件的app包名和/或进程ID,创建播放器的app包名和/或进程ID)。
当从已获取的输入事件中找到一个满足上述三个条件的目标输入事件时,则可以认为该目标事件导致了该app创建播放器,则执行S409,如果三个条件中有一个不满足,则认为创建播放器并不是用户的播放操作导致的,可能是应用自动播放,或者其他原因,则执行S410。
可以理解,为了实现上述判断的目的,除了S402-S408之外,还可以采用其他顺序或者具体步骤来实现,本发明实施例对此不做限定。
S410:手机暂停媒体播放。
示例性的,手机中的处理器130调用框架层中的mediaplayerpause接口(图3中未示出),暂停媒体播放。或者,调用框架层中的mediaplayerstop接口(图3中未示出),停止媒体播放。
在实际操作过程中,媒体可以包含图像和/或声音,所以手机暂停媒体时,可以选择暂停图像的播放和/或声音的播放。比如,只暂停声音播放时,手机可以将扬声器设置为静音或者将扬声器的音量设置为0。
当然,手机还可以通过显示屏显示媒体处于暂停状态或者停止状态,以提示用户媒体已暂停或者已停止播放。
作为一种示例,手机可以显示暂停控件或停止控件。
请参见图7所示,在图7中,以终端是手机为例,且以手机中的微信为例。如图7所示,手机的显示屏上显示的微信朋友圈中包含广告播放窗口701,其中,在广告播放窗口701中包含暂停控件702。
作为另一种示例,手机可以在显示屏上的媒体播放窗口中显示黑屏状态。
这种方式下,手机在媒体播放窗口中显示黑屏状态,以提示用户媒体已暂停或者停止播放。因此,手机可以不获取媒体(以媒体时视频为例,可以是网络视频或者本地视频)。这种方式,可以节省手机的计算时间和资源,提高效率。
当然,手机也可以在显示屏上的媒体播放窗口中显示图像或者文字等信息。
在本申请实施例中,为了美化媒体播放窗口,手机可以获取一帧图像,然后将获取的一帧图像显示在媒体播放窗口中。手机在该图像上显示暂停控件,以便用户知晓当前处于媒体暂停播放的状态。
手机获取的一帧图像可以是媒体中的一帧图像。以媒体是视频为例,手机可以获取视频(网络视频或本地视频)中的一帧图像。比如,可以获取视频的第一帧图像。手机获取 的一帧图像还可以是手机自定义的一帧图像。比如,手机可以从网络或者本地获取与媒体无关的一帧图像。
当然,手机可以直接暂停播放媒体,也可以输出第二提示信息,以提示用户是否自动播放媒体。
示例性的,图8示出了本申请实施例提供的手机显示的第二提示信息的示意图。在图8中,以终端是手机为例,且以手机中的微信为例。如图8所示,手机显示的微信朋友圈的显示界面中包含广告播放窗口801、提示信息802、“确认”控件803和“取消”控件804,该提示信息802为“提醒:是否播放广告”。当用户触发“确认”控件803时,广告播放窗口801中播放广告。当用户触发“取消”控件804时,手机暂停或停止播放广告。
如前述内容可知,手机收到来自其它终端的信息或者来电时,也可以创建播放器来播放系统提示音(短信提示音或者来电提示音)。
这种情况下,由于手机收到来自其它终端的信息或者来电的时间不确定,而且,用户操作手机中短信应用和电话应用的时间相对较小,所以S408的判断结果为否的可能性较大,所以手机不播放系统提示音的可能性比较大。这种方式中,手机处于媒体免打扰模式时,可以屏蔽来电提示音或者短信提示音等。
作为一种示例,当S408的判断结果为否时,手机可以进一步通过判断媒体的播放时长来确定是否要播放媒体。通常,短信提示音是存储在手机本地的文件,播放时长较短。手机中可以记录短信提示音的播放时长。当手机接收到其它手机的短信时,创建播放器后,手机判断该播放器即将播放的短信提示音播放时长是否小于预设时长。若是,则确定为短信提示音,则播放短信提示音。若大于,则暂停短信提示音的播放。这种方式下,即使手机处于媒体免打扰模式,当手机接收到其它手机发送的信息时,比如短信、微信消息,QQ消息等,也可以及时的提示用户收到消息。
通过以上描述可知,通过本申请实施例提供的免打扰方法,终端可以避免媒体自动播放,节省数据流量,降低功耗,提高用户体验。
图4所示的实施例提供的免打扰方法中,手机暂停媒体播放后即S410之后,用户可以触发媒体播放。比如,用户可以触发媒体播放窗口中显示暂停控件,播放媒体。手机在运行过程中,可能会多次创建播放器。比如,用户在浏览app界面或者网页的过程中,为了浏览更多的内容,往往会向上滑动app界面或者网页,在上滑的过程中,app界面或者网页中可能会不断的出现新的媒体播放窗口,每次出现媒体播放窗口时,便创建一次播放器。或者,手机可能会不断的接收到其它手机发送的短消息或者来电时,会不断创建播放器。手机每创建一次播放器可以执行一次图4所示的免打扰流程。
在图4所示的实施例中,手机识别第一输入事件(S403-S404)和手机创建播放器(S405-S406)可以是两个独立的过程,二者之间没有顺序限定。比如,手机可以先创建播放器,然后判断是否存在于创建播放器的事件相匹配的第一输入事件。或者,手机也可以先识别第一输入事件,然后判断是否存在于第一输入事件匹配的创建播放器的事件。当然,S402-S404可以在持续进行,即手机只要处于媒体免打扰模式,则不停的获取输入事件,识别第一输入事件,记录第一输入事件的分发过程。一旦手机创建播放器,则执行S405-S410。
如果手机创建播放器但未从已获取的输入事件中识别出第一输入事件(即未执行S404)。由于不存在第一输入事件,所以手机无需执行S407-S410,直接暂停媒体播放。当 然,这种情况下,手机也可以继续执行S407-S410,但由于第一输入事件为零,所以执行结果仍然为暂停媒体播放。
如果识别出第一输入事件,但是手机未创建播放器(即未执行S405-406),所以手机不播放媒体。因此,手机可以无需执行S407-S410。
通常,手机在创建播放器的过程中,至少会进行两个过程。第一个过程,手机接收到创建播放器的请求信息,然后基于该请求信息做创建播放器的准备工作。第二个过程,手机创建播放器。以视频为例,第一个过程中,手机中某个app需要创建播放器时,app生成的请求信息,请求信息中包含app包名、视频地址(流媒体的地址或者本地视频的地址)或视频尺寸等。手机基于请求信息设置video标签,即设置的video标签包含app包名、视频地址或视频尺寸。当手机做好这些准备工作后,手机基于video标签创建播放器,即前述的第二个过程。
在图4所示的实施例发生在第二个过程中或者第二个过程之后,即手机已创建了播放器。具体的流程请参见前述关于图4所示实施例的描述。下面介绍另一个实施例,该实施例发生在第一个过程中或者发生在第一个过程之后第二个过程之前。具体的,手机中的app在运行过程中生成了用于请求创建播放器的请求信息,手机判断该请求信息是否为已获取的输入事件中的某个输入事件触发生成的,如果是,手机创建播放器播放媒体,如果不是手机不创建播放器。请参见图9所示:
S901-S904请参见图2所示的实施例中S401-S404。与图4所示的实施例不同的是S905-S908。
S905:手机中的app在运行过程中生成用于请求创建播放器的请求信息,所述请求信息中包含创建播放器的app的app包名、进程ID,生成请求信息的生成时间等。
在本申请实施例中,手机中的app在运行过程中,如果有播放媒体的需求时,可以生成用于请求创建播放器的请求信息。比如,当播放媒体的条件满足时,app产生创建播放器的请求信息。关于播放媒体的条件请参见前述内容。
示例性的,手机中的处理器130在运行app的软件程序/模式时以执行:app有播放媒体的需求时,生成请求信息,app将该请求信息发送至框架层,框架层接收到该请求信息时,基于该请求信息创建播放器。比如,app将请求信息发送至框架层中的某个API接口,该API接口基于请求信息设置video标签后,该API接口调用mediaplayer接口,并将video标签发送给mediaplayer,mediaplayer基于这些标签创建播放器。
S906:手机判断第一输入事件中是否存在第二输入事件,第二输入事件的分发时间早于生成时间,且二者之间的时间差小于预设时间,若是,则执行S907,若否,则不创建播放器。
关于S906的描述请参见图4所示的实施例中的S407。
S907:手机判断第一信息中的app包名与请求信息中的app包名是否相同,和/或判断第一信息中的进程ID和请求信息中的进程ID是否相同,若是,则执行S908,若否,则不创建播放器。
关于S906的描述请参见图4所示的实施例中的S408。
S908:手机创建播放器,播放媒体。
如果手机判断该请求信息是已获取的输入事件中的某个输入事件触发生成的,可以创建播放器,播放媒体。示例性的,手机中的处理器130调用框架层中的mediaplayer接口, 运行该mediaplayer接口,完成播放器的创建。然后,手机中的处理器130调用框架层中的mediaplayerstart接口,通过mediaplayerstart接口触发显示单元160显示媒体包含的视频,和/或触发扬声器172播放媒体包含的音频,实现媒体播放。
如果手机的显示屏上显示某个应用的界面,且该界面中的媒体播放窗口被全部或部分显示时,该应用生成用于创建播放器的请求信息。如果手机判断该请求信息不是已获取的输入事件中的某个输入事件触发生成的,不会创建播放器。那么手机可以在媒体播放窗口中显示黑屏,若用户想要播放媒体,可以通过触发媒体播放窗口中的控件来触发手机创建播放器播放对应媒体。
在图4或图9所示的实施例中,用户是主动设置手机处于媒体免打扰模式的。而在实际应用中,用户可能会忘记设置媒体免打扰模式,而直接打开微信朋友圈、抖音等具有媒体自动播放功能的app。比如,在会议中,如果用户忘记设置媒体免打扰模式,直接打开app,若app自动播放媒体的话,可能会给用户带来不必要的麻烦。因此,在本申请实施例中,若用户未设置媒体免打扰模式,手机可以主动提示用户是否需要设置媒体免打扰模式。
一种可能的实现方式为,手机通过自身当前所处的情景模式来判断是否输出第三提示信息,第三提示信息用于提示用户设置媒体免打扰模式。
举例来说,手机确定自身当前处于静音模式、会议模式等。若手机检测到用户启动app(具有媒体自动播放功能的app),可以显示第三提示信息,该第三提示信息用于提示用户,当前处于静音模式,是否设置媒体免打扰模式。
当然,手机可以在检测到用户启动app的同时显示第三提示信息,也可以是在用户启动app,而且app的显示界面中出现媒体播放窗口时,显示第三提示信息,本申请实施例对此不作限定。
示例性的,图10示出了手机显示第三提示信息的示意图。在图10中,以手机响应于用户触发的用于启动微信的操作,显示第三提示信息为例。
在图10中,手机的显示屏上显示提示信息1001,具体为“当前处于静音模式,是否打开媒体免打扰模式”。图10中,还显示两个控件,若用户触发的是“取消”控件1003,则手机隐藏提示信息,显示app界面。若用户触发的是“确定”控件1002,则手机自动启动媒体免打扰模式。或者,用户触发“确定”控件1002后,手机的显示屏跳转到设置app的显示界面(比如跳转到图5A或图5B),然后由用户手动启动媒体免打扰模式。
另一种可能的实现方式为,手机可以通过已设置好的日程安排来确定是否输出第三提示信息,该第三提示信息用于提示用户设置媒体免打扰模式。
举例来说,用户设置日程安排为10:00-12:00:会议。手机检测到当前的系统时间为10:00时,可以显示第三提示信息,用以提示用户是否设置媒体免打扰模式。或者,系统时间在10:00-12:00之内,手机检测到用户启动app(具有媒体自动播放功能的app)的操作的同时,显示第三提示信息。或者,系统时间在10:00-12:00之内,手机的显示屏上显示的app的显示界面中出现媒体播放窗口时,显示第三提示信息。
示例性的,图11示出了手机显示第三提示信息的示意图。在图11中,以手机响应于用户触发的用于启动微信的操作,显示第三提示信息为例。
在图11中,手机的显示屏上显示提示信息1101,具体为“当前时间段的日常安排是会议,确定是否开启媒体免打扰模式”。图11中,还显示两个控件,若用户触发的是“取消”控件1103,则手机隐藏提示信息,显示app界面。若用户触发的是“确定”控件1102,则手 机自动启动媒体免打扰模式。或者,用户触发“确定”控件1102后,手机的显示屏跳转到设置app的显示界面(比如跳转到图5A或图5B),然后由用户手动启动媒体免打扰模式。
又一种可能的实现方式,手机可以根据数据流量是否处于开启状态来判断是否输出第三提示信息,第三提示信息用于提示用户设置媒体免打扰模式。
举例来说,手机检测到用户启动app(具有媒体自动播放功能的app)的操作时,或者,手机的显示屏上显示的app的显示界面中出现媒体播放窗口时,若手机检测到当前数据流量处于开启状态,则显示第三提示信息,以提示用户设置媒体免打扰模式。通过这种方式,有助于减少数据流量的浪费。
示例性的,图12示出了手机显示第三提示信息的示意图。在图12中,手机响应于用户触发的用于启动微信的操作,手机的显示屏上显示提示信息1201,具体为“数据流量已开启,是否设置媒体免打扰模式”。若用户触发的是“取消”控件1203,则手机隐藏提示信息,显示app界面。若用户触发的是“确定”控件1202,则手机自动启动媒体免打扰模式。或者,用户触发“确定”控件1202后,手机的显示屏跳转到设置app的显示界面(比如跳转到图5A或图5B),然后由用户手动启动媒体免打扰模式。
又一种可能的实现方式,手机可以根据当前是否处于无线连接状态来判断是否输出第三提示信息,第三提示信息用于提示用户关闭媒体免打扰模式。需要说明的是,在本申请实施例中,手机处于无线连接状态是指,手机处于wifi连接状态,或者手机接入其它免费的网络的状态。
举例来说,手机检测到用户启动app(具有媒体自动播放功能的app)的操作时,或者,手机的显示屏上显示的app的显示界面中出现媒体播放窗口时,若手机检测到当前处于无线连接状态,且当前处于媒体免打扰模式,则显示第三提示信息,以提示用户关闭媒体免打扰模式。
示例性的,图13示出了手机显示第三提示信息的示意图。在图13中,手机响应于用户触发的用于启动微信的操作,手机的显示屏上显示提示信息1301,具体为“当前处于无线连接状态,是否关闭媒体免打扰模式”。
本申请的各个实施方式可以任意进行组合,以实现不同的技术效果。
上述本申请提供的实施例中,从终端作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,终端可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
基于相同的构思,图14所示为本申请提供的一种终端1400。如图14所示,终端1400包括显示单元1401、处理单元1402、播放控制单元1403。
其中,显示单元1401,用于显示终端1400中的第一应用的界面;
处理单元1402,用于当所述第一应用的界面包括播放媒体的窗口时,且所述第一应用处于媒体免打扰模式时,判断所述窗口播放第一媒体是否由用户的播放操作触发;
播放控制单元1403,用于在处理单元1402确定所述窗口播放第一媒体由用户的播放操作触发时,播放所述对应的媒体;
所述播放控制单元1403,用于在处理单元1402确定所述窗口播放第一媒体不是由用户的播放操作触发,暂停或停止播放所述对应的媒体。
可选的,所述处理单元1402还用于当所述第一应用的界面包括播放媒体的窗口时,创建播放器以播放所述第一媒体,确定所述播放器的创建时间;所述处理单元1402在用于判断所述窗口播放对应的媒体是否由用户的播放操作触发时,具体用于:确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,确定所述窗口播放第一媒体不是由用户的播放操作触发。
可选的,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
可选的,所述播放控制单元1403还用于,在处理单元1402确定所述窗口播放第一媒体不是由用户的播放操作触发,并且确定所述第一媒体的总时长大于第二时长时,暂停或停止播放所述第一媒体。
可选的,所述显示单元1401还用于,在所述处理单元1402确定所述窗口播放第一媒体不是由用户的播放操作触发时,所述播放媒体的窗口或在弹出的窗口显示第一控件,所述第一控件用于触发播放所述第一媒体;
所述播放控制单元1403还用于当所述处理单元1402检测到所述第一控件被触发时,播放所述第一媒体。
可选的,在所述播放媒体的窗口或在弹出的窗口显示文字或图标的第一提示信息,用于提示自动播放被禁止或提示用户是否播放所述第一媒体。
可选的,所述显示单元1401还用于:在所述处理单元1402响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;
所述处理单元1402还用于响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式。
可选的,所述处理单元1402在用于响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式时,具体包括:所述显示单元用于:在所述处理单元1402响应于用户激活所述媒体免打扰模式是否开启的控件的操作时,显示用于设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数;
所述处理单元1402用于分别响应于用户激活所述M个控件中的N个控件的操作,对与所述N个控件对应的N个应用开启免打扰模式,其中N为小于等于M个正整数。
可选的,所述显示单元1401还用于,在所述处理单元1402还用于响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数。
可选的,所述显示单元1401还用于:在所述处理单元1402检测到所述终端接入了无线网络时,提示用户关闭所述媒体免打扰模式,或显示所述第一界面。
可选的,所述终端包括显示屏、存储器,所述存储器中存储第一应用的软件程序和/ 或模块、框架层的软件程序和/或模块;显示屏显示所述第一应用的界面;框架层判断窗口播放第一媒体是否由用户的播放操作触发;若所述窗口播放第一媒体由用户的播放操作触发,所述框架层播放所述对应的媒体;若所述窗口播放第一媒体不是由用户的播放操作触发,所述框架层暂停或停止播放所述对应的媒体。
可选的,在所述第一应用的界面中包括播放媒体的窗口时,所述方法还包括:所述框架层创建播放器以播放所述第一媒体;所述框架层确定所述播放器的创建时间;所述框架层判断窗口播放第一媒体是否由用户的播放操作触发,包括:所述框架层确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,所述框架层确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,所述框架层确定所述窗口播放第一媒体不是由用户的播放操作触发。
基于相同的构思,图15所示为本申请提供的一种终端1500。如图15所示,终端1500包括显示单元1501、处理单元1502、创建单元1503和播放单元1504。
其中,所述显示单元1501用于:显示所述第一应用的界面;
所述处理单元1502当所述第一应用的界面包括播放媒体的窗口时,获取第一应用生成的用于创建播放器的请求信息;若所述第一应用处于媒体免打扰模式时,判断所述请求信息是否由用户的播放操作触发生成的;
所述创建单元1503用于,在所述处理单元1502确定所述请求信息是否由用户的播放操作触发产生时,创建播放器;
所述播放单元1504,用于播放对应的媒体。
可选的,所述请求信息中包含第一应用生成所述请求信息的生成时间;所述处理单元1502在所述判断所述请求信息是否由用户的播放操作触发生成的时,具体用于:确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于请求信息的生成时间,且所述目标输入事件的分发时间与所述生成时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述请求信息由用户的播放操作触发生成;若不存在所述目标输入事件,确定所述请求信息不是由用户的播放操作触发生成。
可选的,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
可选的,所述显示单元1501还用于,在所述处理单元1502确定所述请求信息不是由用户的播放操作触发生成时,所述播放媒体的窗口或在弹出的窗口显示第一控件,所述第一控件用于触发创建播放器以播放所述第一媒体;
所述创建单元1503还用于当所述处理单元1502检测到所述第一控件被触发时,创建播放器;
所述播放单元1504还用于;在所述创建单元1503创建播放器后,播放所述第一媒体。
可选的,在所述播放媒体的窗口或在弹出的窗口显示文字或图标的第一提示信息,用于提示自动播放被禁止或提示用户是否播放所述第一媒体。
可选的,所述窗口播放第一媒体的条件包括:所述播放媒体的窗口被全部或部分显示, 或者所述播放媒体的窗口被显示在终端的显示屏的中央。
可选的,所述显示单元1501还用于:在所述处理单元1502响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;
所述处理单元1502还用于响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式。
可选的,所述处理单元1502在用于响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式时,具体包括:所述显示单元用于:在所述处理单元1502响应于用户激活所述媒体免打扰模式是否开启的控件的操作时,显示用于设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数;
所述处理单元1502用于分别响应于用户激活所述M个控件中的N个控件的操作,对与所述N个控件对应的N个应用开启免打扰模式,其中N为小于等于M个正整数。
可选的,所述显示单元1501还用于,在所述处理单元1502还用于响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数。
可选的,所述显示单元1501还用于:在所述处理单元1502检测到所述终端接入了无线网络时,提示用户关闭所述媒体免打扰模式,或显示所述第一界面。
可选的,终端包括显示屏和存储器,所述存储器中包括第一应用的软件程序和/或模块、框架层的软件程序和/或模块;显示屏显示所述第一应用的界面;所述框架层获取用于请求创建播放器的请求信息;所述框架层判断所述请求信息是否由用户的播放操作触发生成的;若所述请求信息是由用户的播放操作触发产生的,所述框架层创建播放器,播放对应的媒体;若所述请求信息不是由用户的播放操作触发产生的,所述框架层拒绝或丢弃所述请求信息。
可选的,所述请求信息中包含第一应用生成所述请求信息的生成时间;所述框架层判断所述请求信息是否由用户的播放操作触发生成,包括:所述框架层确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于请求信息的生成时间,且所述目标输入事件的分发时间与所述生成时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,所述框架层确定所述请求信息由用户的播放操作触发生成;若不存在所述目标输入事件,所述框架层确定所述请求信息不是由用户的播放操作触发生成。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、电可擦可编程只读存储器(electrically erasable programmable read only memory,EEPROM)、只读光盘(compact disc read-Only memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(digital subscriber line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本申请实施例所使用的,盘(disk)和碟(disc)包括压缩光碟(compact disc,CD)、激光碟、光碟、数字通用光碟(digital video disc,DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。
总之,以上所述仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡根据本申请的揭露,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (24)
- 一种免打扰的方法,适用于安装有第一应用的终端,其特征在于,该方法包括:显示所述第一应用的界面;在所述第一应用的界面中包括播放媒体的窗口时,若所述第一应用处于媒体免打扰模式,判断窗口播放第一媒体是否由用户的播放操作触发;若所述窗口播放第一媒体由用户的播放操作触发,播放所述对应的媒体;若所述窗口播放第一媒体不是由用户的播放操作触发,暂停或停止播放所述对应的媒体。
- 如权利要求1所述的免打扰方法,其特征在于,在所述第一应用的界面中包括播放媒体的窗口时,所述方法还包括:创建播放器以播放所述第一媒体,确定所述播放器的创建时间;所述判断所述窗口播放对应的媒体是否由用户的播放操作触发,包括:确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,确定所述窗口播放第一媒体不是由用户的播放操作触发。
- 如权利要求2所述的免打扰方法,其特征在于,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
- 如权利要求1-3任一项所述的免打扰方法,其特征在于,若所述窗口播放第一媒体不是由用户的播放操作触发,并且所述第一媒体的总时长大于第二时长,暂停或停止播放所述第一媒体。
- 如权利要求1-4任一项所述的免打扰的方法,其特征在于,若所述窗口播放第一媒体不是由用户的播放操作触发,所述方法还包括:在所述播放媒体的窗口或在弹出的窗口显示第一控件,所述第一控件用于触发播放所述第一媒体;当所述第一控件被触发时,所述终端播放所述第一媒体。
- 如权利要求5所述的免打扰的方法,其特征在于,在所述播放媒体的窗口或在弹出的窗口显示文字或图标的第一提示信息,用于提示自动播放被禁止或提示用户是否播放所述第一媒体。
- 如权利要求1-6任一项所述的免打扰的方法,其特征在于,所述方法还包括:响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;响应于用户激活所述媒体免打扰模式是否开启的控件的操作,对所述终端中的全部或部分应用开启媒体免打扰模式。
- 如权利要求1-6任一所述的免打扰的方法,其特征在于,所述方法还包括:响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第一界面,所述第一界面包括设置媒体免打扰模式是否开启的控件;响应于用户激活所述媒体免打扰模式是否开启的控件的操作,显示用于设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数;响应于用户激活所述M个控件中的一个控件的操作,对与所述一个控件对应的应用开启媒体免打扰模式。
- 如权利要求1-6任一项所述的免打扰的方法,其特征在于,所述方法还包括:响应于用户的操作,或检测到数据流量开启时,或当所述终端处于会议模式或静音模式时,显示设置媒体免打扰模式的第二界面;所述第二界面包括M个应用的标识,和所述M个设置媒体免打扰模式是否开启的控件,所述M个控件分别对应所述M个应用;M为大于或等于1的整数。
- 如权利要求1-9任一所述的免打扰的方法,其特征在于,所述方法还包括:当检测到所述终端接入了wifi时,提示用户关闭所述媒体免打扰模式,或显示所述第一界面。
- 如权利要求1所述的免打扰的方法,其特征在于,所述终端包括显示屏、存储器,所述存储器中存储有所述第一应用的软件程序和/或模块、框架层的软件程序和/或模块;显示所述第一应用的界面,包括:所述显示屏显示所述第一应用的界面;所述判断窗口播放第一媒体是否由用户的播放操作触发,包括:所述框架层判断窗口播放第一媒体是否由用户的播放操作触发;所述播放所述对应的媒体,包括:所述框架层播放所述对应的媒体;所述暂停或停止播放所述对应的媒体,包括:所述框架层暂停或停止播放所述对应的媒体。
- 如权利要求11所述的免打扰的方法,其特征在于,在所述第一应用的界面中包括播放媒体的窗口时,所述方法还包括:所述框架层创建播放器以播放所述第一媒体;所述框架层确定所述播放器的创建时间;所述框架层判断窗口播放第一媒体是否由用户的播放操作触发,包括:所述框架层确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,所述框架层确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,所述框架层确定所述窗口播放第一媒体不是由用户的播放操作触发。
- 一种免打扰的方法,适用于安装有第一应用的终端,其特征在于,该方法包括:显示所述第一应用的界面;在所述第一应用的界面包括播放媒体的窗口时,获取第一应用生成的用于创建播放器的请求信息;若所述第一应用处于媒体免打扰模式时,判断所述请求信息是否由用户的播放操作触发生成的;若所述请求信息是由用户的播放操作触发产生的,创建播放器,播放对应的媒体;若所述请求信息不是由用户的播放操作触发产生的,拒绝或丢弃所述请求信息。
- 如权利要求13所述的免打扰的方法,其特征在于,所述请求信息中包含第一应用生成所述请求信息的生成时间;所述判断所述请求信息是否由用户的播放操作触发生成的,包括:确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于请求信息的生成时间,且所述目标输入事件的分发时间与所述生成时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述请求信息由用户的播放操作触发生成;若不存在所述目标输入事件,确定所述请求信息不是由用户的播放操作触发生成。
- 如权利要求14所述的免打扰方法,其特征在于,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
- 如权利要求13-15任一项所述的免打扰方法,其特征在于,若所述窗口播放第一媒体不是由用户的播放操作触发,并且所述第一媒体的总时长大于第二时长,暂停或停止播放所述第一媒体。
- 如权利要求13-16任一项所述的免打扰的方法,其特征在于,若所述窗口播放第一媒体不是由用户的播放操作触发,所述方法还包括:所述显示屏在所述播放媒体的窗口或在弹出的窗口显示第一控件,所述第一控件用于触发播放所述第一媒体;当所述第一控件被触发时,所述终端播放所述第一媒体。
- 如权利要求13所述的免打扰的方法,其特征在于,所述终端包括显示屏和存储器,所述存储器中存储有所述第一应用的软件程序和/或模块、框架层的软件程序和/或模块;显示所述第一应用的界面,包括:所述显示屏显示所述第一应用的界面;所述获取第一应用生成的用于创建播放器的请求信息,包括:所述框架层获取第一应用生成的用于请求创建播放器的请求信息;所述判断所述请求信息是否由用户的播放操作触发生成的,包括:所述框架层判断所述请求信息是否由用户的播放操作触发生成的;所述创建播放器,播放对应的媒体,包括:所述框架层创建播放器,播放对应的媒体;所述拒绝或丢弃所述请求信息,包括:所述框架层拒绝或丢弃所述请求信息。
- 如权利要求18所述的免打扰的方法,其特征在于,所述请求信息中包含第一应 用生成所述请求信息的生成时间;所述框架层判断所述请求信息是否由用户的播放操作触发生成,包括:所述框架层确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于请求信息的生成时间,且所述目标输入事件的分发时间与所述生成时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,所述框架层确定所述请求信息由用户的播放操作触发生成;若不存在所述目标输入事件,所述框架层确定所述请求信息不是由用户的播放操作触发生成。
- 一种终端,其特征在于,包括处理器和存储器;所述存储器用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述终端执行:显示所述第一应用的界面;在所述第一应用的界面中包括播放媒体的窗口时,若所述第一应用处于媒体免打扰模式,判断窗口播放第一媒体是否由用户的播放操作触发;若所述窗口播放第一媒体由用户的播放操作触发,播放所述对应的媒体;若所述窗口播放第一媒体不是由用户的播放操作触发,暂停或停止播放所述对应的媒体。
- 如权利要求20所述的终端,其特征在于,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,还使得所述终端执行:创建播放器以播放所述第一媒体,确定所述播放器的创建时间;当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述终端执行判断窗口播放第一媒体是否由用户的播放操作触发的步骤时,具体执行;确定已获取的输入事件中是否存在目标输入事件,所述目标输入事件是用户的播放操作对应的输入事件,所述目标输入事件的分发时间早于播放器的创建时间,且所述目标输入事件的分发时间与所述播放器的创建时间的时间差小于第一预设时长,所述目标输入事件被分发到所述第一应用;若存在所述目标输入事件,确定所述窗口播放第一媒体由用户的播放操作触发;若不存在所述目标输入事件,确定所述窗口播放第一媒体不是由用户的播放操作触发。
- 如权利要求21所述的终端,其特征在于,所述目标输入事件被分发到的应用的包名与所述第一应用的包名相同;和/或所述目标输入事件被分发到的应用的进程号与所述第一应用的进程号相同。
- 如权利要求20-22任一项所述的终端,其特征在于,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述终端执行:在所述窗口播放第一媒体不是由用户的播放操作触发,并且所述第一媒体的总时长大于第二时长时,暂停或停止播放所述第一媒体。
- 一种计算机存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行如权利要求1至19任一所述的方法。
Priority Applications (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/964,250 US11405499B2 (en) | 2018-04-20 | 2018-04-20 | Do-not-disturb method and terminal |
EP18915188.9A EP3699744B1 (en) | 2018-04-20 | 2018-04-20 | Do-not-disturb method and terminal |
CN202111614162.0A CN114489558A (zh) | 2018-04-20 | 2018-04-20 | 一种免打扰方法和终端 |
CN201880049136.8A CN110945467B (zh) | 2018-04-20 | 2018-04-20 | 一种免打扰方法和终端 |
PCT/CN2018/083963 WO2019200614A1 (zh) | 2018-04-20 | 2018-04-20 | 一种免打扰方法和终端 |
US17/840,978 US12015733B2 (en) | 2018-04-20 | 2022-06-15 | Do-not-disturb method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/083963 WO2019200614A1 (zh) | 2018-04-20 | 2018-04-20 | 一种免打扰方法和终端 |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/964,250 A-371-Of-International US11405499B2 (en) | 2018-04-20 | 2018-04-20 | Do-not-disturb method and terminal |
US17/840,978 Continuation US12015733B2 (en) | 2018-04-20 | 2022-06-15 | Do-not-disturb method and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019200614A1 true WO2019200614A1 (zh) | 2019-10-24 |
Family
ID=68239359
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/083963 WO2019200614A1 (zh) | 2018-04-20 | 2018-04-20 | 一种免打扰方法和终端 |
Country Status (4)
Country | Link |
---|---|
US (2) | US11405499B2 (zh) |
EP (1) | EP3699744B1 (zh) |
CN (2) | CN110945467B (zh) |
WO (1) | WO2019200614A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112394668A (zh) * | 2020-11-25 | 2021-02-23 | 安徽文香信息技术有限公司 | 一种智慧教室用广播系统及方法 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102514841B1 (ko) * | 2018-01-09 | 2023-03-28 | 삼성전자주식회사 | 기기의 어플리케이션에 선택적으로 네트워크 기능을 제공하는 기술 및 방법 |
US11039279B1 (en) * | 2019-12-10 | 2021-06-15 | BlueOwl, LLC | Automated tracking of vehicle operation and synchronized media delivery |
CN113747552B (zh) * | 2021-06-18 | 2024-03-19 | 荣耀终端有限公司 | 一种功耗优化方法和电子设备 |
CN113676596B (zh) * | 2021-08-20 | 2022-08-16 | 北京字节跳动网络技术有限公司 | 电子设备控制方法、装置、存储介质和电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105100897A (zh) * | 2015-07-23 | 2015-11-25 | 小米科技有限责任公司 | 快捷播放的控制方法及装置 |
CN105160220A (zh) * | 2015-09-01 | 2015-12-16 | 上海斐讯数据通信技术有限公司 | 一种具媒体文件的播放安全控制功能的移动终端及其方法 |
CN106033306A (zh) * | 2015-03-20 | 2016-10-19 | 阿里巴巴集团控股有限公司 | 自动播放控制方法及装置 |
CN106125959A (zh) * | 2016-06-28 | 2016-11-16 | 广东欧珀移动通信有限公司 | 控制方法、控制装置及电子装置 |
US20170168705A1 (en) * | 2015-12-14 | 2017-06-15 | Le Holdings (Beijing) Co., Ltd. | Method and electronic device for adjusting video progress |
Family Cites Families (49)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6504990B1 (en) * | 1998-11-12 | 2003-01-07 | Max Abecassis | Randomly and continuously playing fragments of a video segment |
US7565680B1 (en) * | 2000-06-30 | 2009-07-21 | Comcast Ip Holdings I, Llc | Advanced set top terminal having a video call feature |
US7509651B2 (en) * | 2003-05-23 | 2009-03-24 | Hewlett-Packard Development Company, L.P. | System and method for providing event notifications to information technology resource managers |
US7706903B2 (en) * | 2006-04-13 | 2010-04-27 | International Business Machines Corporation | Selective muting of applications |
WO2007141204A1 (en) * | 2006-06-02 | 2007-12-13 | Anoto Ab | System and method for recalling media |
US20090273712A1 (en) * | 2008-05-01 | 2009-11-05 | Elliott Landy | System and method for real-time synchronization of a video resource and different audio resources |
US20100040349A1 (en) * | 2008-05-01 | 2010-02-18 | Elliott Landy | System and method for real-time synchronization of a video resource and different audio resources |
US8727779B2 (en) * | 2009-05-08 | 2014-05-20 | Microsoft Corporation | Authoring of demonstration environments |
US8477109B1 (en) * | 2010-06-24 | 2013-07-02 | Amazon Technologies, Inc. | Surfacing reference work entries on touch-sensitive displays |
CN101894004A (zh) | 2010-06-25 | 2010-11-24 | 深圳市五巨科技有限公司 | 一种移动终端游戏音效自动调整的方法和装置 |
US8922564B2 (en) * | 2010-12-01 | 2014-12-30 | Microsoft Corporation | Controlling runtime execution from a host to conserve resources |
US9417754B2 (en) * | 2011-08-05 | 2016-08-16 | P4tents1, LLC | User interface system, method, and computer program product |
US9661292B2 (en) * | 2011-12-28 | 2017-05-23 | Panasonic Intellectual Property Management Co., Ltd. | Content playback device and content playback method |
US8787726B2 (en) * | 2012-02-26 | 2014-07-22 | Antonio Rossi | Streaming video navigation systems and methods |
US9715365B2 (en) * | 2012-06-27 | 2017-07-25 | Sonos, Inc. | Systems and methods for mobile music zones |
US8959438B2 (en) * | 2012-09-06 | 2015-02-17 | Google Inc. | Media control pane in browser |
CN103809953B (zh) * | 2012-11-14 | 2018-09-07 | 腾讯科技(深圳)有限公司 | 多媒体播放监测方法及系统 |
KR102058461B1 (ko) | 2013-04-30 | 2019-12-23 | 삼성전자 주식회사 | 사용자 디바이스의 기능 처리 방법 및 장치 |
EP2801919A1 (en) * | 2013-05-10 | 2014-11-12 | LG Electronics, Inc. | Mobile terminal and controlling method thereof |
CN103327173B (zh) | 2013-05-17 | 2015-10-28 | 广东欧珀移动通信有限公司 | 一种移动终端的声音控制方法及装置 |
KR101474467B1 (ko) * | 2013-07-09 | 2014-12-19 | 엘지전자 주식회사 | 이동 단말기 및 그것의 제어방법 |
US20170132659A1 (en) * | 2014-01-13 | 2017-05-11 | Google Inc. | Potential Revenue of Video Views |
US11477256B2 (en) * | 2014-05-02 | 2022-10-18 | Stationhead, Inc. | System and process for controlling a computerized entertainment property playlist |
US10761683B2 (en) * | 2014-05-02 | 2020-09-01 | Stationhead, Inc. | System and process for controlling a computerized entertainment property playlist |
US20150334170A1 (en) * | 2014-05-19 | 2015-11-19 | Tribune Digital Ventures, Llc | Use of a remainder duration as a basis to generate a playlist |
US9516269B2 (en) * | 2014-06-04 | 2016-12-06 | Apple Inc. | Instant video communication connections |
US9632664B2 (en) * | 2015-03-08 | 2017-04-25 | Apple Inc. | Devices, methods, and graphical user interfaces for manipulating user interface objects with visual and/or haptic feedback |
WO2016152388A1 (ja) * | 2015-03-23 | 2016-09-29 | 株式会社村田製作所 | タッチ式入力装置 |
US10235035B2 (en) * | 2015-08-10 | 2019-03-19 | Apple Inc. | Devices, methods, and graphical user interfaces for content navigation and manipulation |
CN105872746A (zh) * | 2015-11-26 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | 根据使用场景进行静音的方法及终端设备 |
CN105872724A (zh) * | 2015-12-31 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | 一种视频播放方法及装置 |
CN105704531A (zh) | 2016-01-19 | 2016-06-22 | 努比亚技术有限公司 | 播放视频时的免打扰终端及方法 |
KR102408649B1 (ko) * | 2016-02-19 | 2022-06-15 | 삼성전자주식회사 | 환경 설정 방법 및 장치 |
US10475397B2 (en) * | 2016-06-20 | 2019-11-12 | Lenovo (Singapore) Pte. Ltd. | Systems and methods for determining whether to present content using electronic paper display |
US10110943B2 (en) * | 2016-08-01 | 2018-10-23 | Roku, Inc. | Flexible output of streaming media |
CN107526502A (zh) | 2016-09-02 | 2017-12-29 | 腾讯科技(深圳)有限公司 | 媒体文件的播放方法和装置 |
US20180270517A1 (en) * | 2017-03-19 | 2018-09-20 | Microsoft Technology Licensing, Llc | Decoupled Playback of Media Content Streams |
US10645335B2 (en) * | 2017-03-22 | 2020-05-05 | Panasonic Intellectual Property Management Co., Ltd. | Imaging apparatus for generating a single file of two shooting periods |
US10635738B2 (en) * | 2017-05-16 | 2020-04-28 | Apple Inc. | Device, method, and graphical user interface for managing website presentation settings |
US10776511B2 (en) * | 2017-06-04 | 2020-09-15 | Apple Inc. | User experience using privatized crowdsourced data |
US10725647B2 (en) * | 2017-07-14 | 2020-07-28 | Microsoft Technology Licensing, Llc | Facilitating interaction with a computing device based on force of touch |
CN107483721B (zh) | 2017-07-28 | 2019-10-25 | Oppo广东移动通信有限公司 | 基于黑屏手势的控制方法、装置、存储介质及移动终端 |
CN107426091B (zh) | 2017-08-11 | 2018-05-18 | 广东以诺通讯有限公司 | 一种控制微信声音的方法 |
KR102524027B1 (ko) * | 2018-05-04 | 2023-04-21 | 삼성전자주식회사 | 발열 제어를 위한 전자 장치 및 그의 동작 방법 |
US11178468B2 (en) * | 2018-11-29 | 2021-11-16 | International Business Machines Corporation | Adjustments to video playing on a computer |
US11093105B2 (en) * | 2018-12-18 | 2021-08-17 | Spotify Ab | Controlling automatic playback of media content |
US10928998B2 (en) * | 2018-12-18 | 2021-02-23 | Spotify Ab | Methods and systems for configuring automatic media playback settings |
GB2581321B (en) * | 2018-12-21 | 2023-10-11 | Eric Lewis John | System and method for reusable digital video templates incorporating cumulative sequential iteration technique in music education |
KR20190116188A (ko) * | 2019-09-23 | 2019-10-14 | 엘지전자 주식회사 | 상황 인식에 기반한 방해 금지 모드 추천을 위한 장치 및 제어 방법 |
-
2018
- 2018-04-20 CN CN201880049136.8A patent/CN110945467B/zh active Active
- 2018-04-20 WO PCT/CN2018/083963 patent/WO2019200614A1/zh unknown
- 2018-04-20 US US16/964,250 patent/US11405499B2/en active Active
- 2018-04-20 CN CN202111614162.0A patent/CN114489558A/zh active Pending
- 2018-04-20 EP EP18915188.9A patent/EP3699744B1/en active Active
-
2022
- 2022-06-15 US US17/840,978 patent/US12015733B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033306A (zh) * | 2015-03-20 | 2016-10-19 | 阿里巴巴集团控股有限公司 | 自动播放控制方法及装置 |
CN105100897A (zh) * | 2015-07-23 | 2015-11-25 | 小米科技有限责任公司 | 快捷播放的控制方法及装置 |
CN105160220A (zh) * | 2015-09-01 | 2015-12-16 | 上海斐讯数据通信技术有限公司 | 一种具媒体文件的播放安全控制功能的移动终端及其方法 |
US20170168705A1 (en) * | 2015-12-14 | 2017-06-15 | Le Holdings (Beijing) Co., Ltd. | Method and electronic device for adjusting video progress |
CN106125959A (zh) * | 2016-06-28 | 2016-11-16 | 广东欧珀移动通信有限公司 | 控制方法、控制装置及电子装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3699744A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112394668A (zh) * | 2020-11-25 | 2021-02-23 | 安徽文香信息技术有限公司 | 一种智慧教室用广播系统及方法 |
Also Published As
Publication number | Publication date |
---|---|
US12015733B2 (en) | 2024-06-18 |
EP3699744B1 (en) | 2023-05-10 |
US20210044693A1 (en) | 2021-02-11 |
CN110945467B (zh) | 2022-02-18 |
US20220311859A1 (en) | 2022-09-29 |
US11405499B2 (en) | 2022-08-02 |
EP3699744A4 (en) | 2021-01-13 |
CN114489558A (zh) | 2022-05-13 |
CN110945467A (zh) | 2020-03-31 |
EP3699744A1 (en) | 2020-08-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11606458B2 (en) | Favorite-object display method and terminal | |
WO2019200614A1 (zh) | 一种免打扰方法和终端 | |
US10635449B2 (en) | Method and apparatus for running game client | |
WO2018184488A1 (zh) | 视频配音方法及装置 | |
US10069818B2 (en) | Method, system, device, and terminal for network initialization of multimedia playback device | |
CN108781236B (zh) | 音频播放方法及电子设备 | |
CN106851695B (zh) | 一种测试网速的方法、装置和系统 | |
JP2016537904A (ja) | Wi−fiネットワーク接続方法、装置、プログラム、及び記録媒体 | |
CN108021298B (zh) | 利用剪切板粘贴信息的方法及装置 | |
WO2020103070A1 (zh) | 一种对应用程序进行处理的方法、装置和电子设备 | |
WO2019128191A1 (zh) | 一种用于处理呼叫请求的方法、移动终端及可读存储介质 | |
WO2018161788A1 (zh) | 多媒体数据共享方法及装置 | |
CN113039774B (zh) | 一种对应用程序进行处理的方法、装置、电子设备和存储介质 | |
KR101876394B1 (ko) | 단말기에 미디어 데이터를 재생하는 방법 및 장치 | |
KR20160033646A (ko) | 라우터 플러그인을 제어하기 위한 방법 및 장치 | |
WO2019084783A1 (zh) | 服务调度方法和装置、计算机设备、计算机可读存储介质 | |
US20150286361A1 (en) | Single gesture video capture and share | |
JP6441385B2 (ja) | 情報入力方法、装置、プログラム及び記録媒体 | |
US20210286588A1 (en) | Method and apparatus for playing alarm and electronic device | |
CN112000411B (zh) | 移动终端及其录音通道占用信息的显示方法 | |
CN113596748B (zh) | 实现呼叫保持功能的方法、服务器及用户终端 | |
CN112148399B (zh) | 一种应用图标的切换方法、装置及存储介质 | |
CN106713673A (zh) | 一种信息处理方法和电子设备 | |
US12124765B2 (en) | Audio playing method and electronic device | |
CN113742037A (zh) | 移动终端及其应用控制方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18915188 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2018915188 Country of ref document: EP Effective date: 20200522 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |