CN114969399A - Media playing control method and device - Google Patents

Media playing control method and device Download PDF

Info

Publication number
CN114969399A
CN114969399A CN202210692226.7A CN202210692226A CN114969399A CN 114969399 A CN114969399 A CN 114969399A CN 202210692226 A CN202210692226 A CN 202210692226A CN 114969399 A CN114969399 A CN 114969399A
Authority
CN
China
Prior art keywords
state
screen
media application
running
condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210692226.7A
Other languages
Chinese (zh)
Inventor
吕鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Semiconductor Nanjing Co Ltd
Original Assignee
Spreadtrum Semiconductor Nanjing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Semiconductor Nanjing Co Ltd filed Critical Spreadtrum Semiconductor Nanjing Co Ltd
Priority to CN202210692226.7A priority Critical patent/CN114969399A/en
Publication of CN114969399A publication Critical patent/CN114969399A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/48Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/483Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/438Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling media playing. Determining the interface state of the terminal equipment after a first operation triggering a state switching command is executed, wherein the state switching command is used for indicating that a media application running on a foreground of the terminal equipment is switched to a background, judging whether the interface state meets a first condition, if the interface state meets the first condition, switching the media application to the background and keeping the running state of the media application unchanged, and if the interface state does not meet the first condition, switching the media application to the background and setting the running state of the media application to a pause state. When the method switches the media application from the foreground to the background, whether the operation of the media application is suspended is determined according to the interface state, so that the aim of saving electric energy or preventing the mutual interference among a plurality of applications is fulfilled.

Description

Media playing control method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling media playback
Background
At present, when media applications of smart devices such as smart phones and tablet computers operate for a long time, screens are always in a normally bright state, and most of electric quantity consumption is occupied. In some cases, the user may not need to watch the device screen all the time or only be interested in the audio, so that the screen can be turned off while the normal operation of the media application is ensured, and the consumption of electric quantity is saved.
Although the media application is played in the screen-off state in the implementation manner in the prior art, at the same time, when the screen is in the normally-on state, and the user is switched from the media application to another application, the media application entering the background is still in the playing state, and the audio of the media application may have a certain influence on the use of the other application, which results in the reduction of user experience.
Disclosure of Invention
The embodiment of the invention provides a media playing control method and a media playing control device.
In a first aspect, an embodiment of the present invention provides a media playing control method, including:
determining an interface state of the terminal equipment after a first operation of triggering a state switching command is executed, wherein the state switching command is used for indicating that a media application running on a foreground of the terminal equipment is switched to a background;
judging whether the interface state meets a first condition or not;
if the interface state meets the first condition, switching the media application to a background and keeping the running state of the media application unchanged;
if the interface state does not meet the first condition, switching the media application to a background and setting the running state of the media application to a pause state.
In one implementation, the determining whether the interface state meets a first condition includes:
and if the screen state of the terminal equipment is the screen off state and the running state of the media application is the playing state, determining that the interface state meets the first condition.
In one implementation, the determining that the screen state is the screen-off state includes:
invoking a screen detection process, wherein the screen detection process is used for detecting the screen state and returning a first return value, and the first return value comprises: the screen display control method comprises the following steps that a first state value or a second state value is used, the first state value is used for indicating that the screen state is a normally-on state or a screen locking state, and the second state value is used for indicating that the screen state is a screen extinguishing state;
receiving the first return value;
and if the first return value is the second state value, determining that the screen state is the screen extinguishing state.
In one implementation, if the interface state meets the first condition, switching the media application to a background and keeping the running state of the media application unchanged includes:
if the screen state is the screen-off state and the running state is the playing state, switching the media application to a background and prohibiting running of a playing pause process;
wherein the play pause procedure is used to set the running state of the media application to the pause state.
In one implementation, the determining whether the interface state meets a first condition includes:
and if the screen state of the terminal equipment is the screen locking state and the running state of the media application is the playing state, determining that the interface state meets the first condition.
In one implementation, determining that the screen state is the lock screen state includes:
invoking a screen detection process and an input detection process, wherein the input detection process is used for detecting the screen state and returning a second return value, and the second return value comprises: a third state value or a fourth state value, wherein the third state value is used for indicating that the screen state is the screen off state or the screen locking state, and the fourth state value is used for indicating that the screen state is the normally on state
Receiving a first return value and the second return value of the screen detection process,
and if the first return value is the first state value and the second return value is the third state value, determining that the screen state is the screen locking state.
In one implementation, the switching the media application to the background and setting the running state of the media application to the suspended state if the interface state does not meet the first condition includes:
if the screen state is a normally bright state and the running state is the playing state, switching the media application to a background and running a playing suspension process to set the running state of the media application to the suspension state.
In a second aspect, an embodiment of the present invention provides a video playback control apparatus, where the apparatus includes:
the determining module is used for determining the interface state of the terminal equipment after a first operation triggering a state switching command is executed, wherein the state switching command is used for indicating that a media application running on a foreground of the terminal equipment is switched to a background;
the judging module is used for judging whether the interface state meets a first condition or not;
the switching module is used for switching the media application to a background and keeping the running state of the media application unchanged if the interface state meets the first condition;
and the switching module is used for switching the media application to a background and setting the running state of the media application to a pause state if the interface state does not meet the first condition.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor calling the program instructions to be able to perform the method provided by the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, where the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the method provided in the first aspect.
In the embodiment of the invention, the interface state of the terminal equipment after the first operation of triggering a state switching command is executed is determined, the state switching command is used for indicating that the media application running on the foreground of the terminal equipment is switched to the background, whether the interface state meets a first condition or not is judged, if the interface state meets the first condition, the media application is switched to the background and the running state of the media application is kept unchanged, and if the interface state does not meet the first condition, the media application is switched to the background and the running state of the media application is set to a pause state. When the method switches the media application from the foreground to the background, whether the operation of the media application is suspended is determined according to the interface state, so that the aim of saving electric energy or preventing the mutual interference among a plurality of applications is fulfilled.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart of a media playing control method according to an embodiment of the present invention;
fig. 2 is a flowchart of another media playing control method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a media playing control device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For better understanding of the technical solutions in the present specification, the following detailed description of the embodiments of the present invention is provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only a few embodiments of the present specification, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present specification.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the specification. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Fig. 1 is a flowchart of a media playing control method according to an embodiment of the present invention. The method can be applied to terminal devices such as smart phones and tablet computers, and as shown in fig. 1, the method can include:
step 101, determining an interface state of the terminal device after a first operation triggering a state switching command is executed, where the state switching command is used to instruct to switch a media application running on a foreground of the terminal device to a background.
In the embodiment of the invention, the media application comprises the application of terminal equipment such as video software or audio software. After the media application is started, the media application is firstly operated in the foreground of the terminal device (namely, displayed on a front-end interface of the terminal device), and when the terminal device detects some specific operations of a user, the media application operated in the foreground is switched to the background. For example, the screen-off operation or the screen-lock operation by the user by pressing the power key, or the home screen operation by the user by pressing the home screen key, or the application switching operation by the user by screen sliding. The above exemplary operation may be a first operation capable of triggering a state switching command, and optionally, a monitoring process may be set inside the terminal device, and when the first operation is detected, the state switching command is sent.
Step 102, judging whether the interface state meets a first condition.
When the terminal device detects that the state switching command is triggered, the current interface state is detected and whether the interface state meets the first condition or not is judged.
In a specific embodiment, the step of determining whether the interface state meets the first condition may include: if the screen state of the terminal equipment is a screen extinguishing state and the running state of the media application is a playing state, determining that the interface state meets a first condition; and if the screen state of the terminal equipment is the screen locking state and the running state of the media application is the playing state, determining that the interface state meets the first condition. It can be understood that if the first operation of triggering the state switching command is a screen locking operation, the terminal device may detect that the screen state is the screen locking state when determining that the state switching command is triggered and detecting the interface state; if the first operation of triggering the state switching command is a screen-off operation, the terminal device may detect that the screen state is a screen-off state when determining that the state switching command is triggered and detecting the interface state. The terminal equipment can determine whether the first operation of switching the media application to the background is screen-off operation or screen-locking operation or not through the interface state.
Further, the terminal device may determine the screen state by invoking a screen detection process or/and an input detection process, where the screen detection process returns a first return value after running, where the first return value includes: the screen display control device comprises a first state value or a second state value, wherein the first state value is used for indicating that the screen state is a normally bright state or a screen locking state, and the second state value is used for indicating that the screen state is a screen extinguishing state. And the input detection process returns a second return value after running, wherein the second return value comprises: the third state value is used for indicating that the screen state is the screen-off state or the screen-locking state, and the fourth state value is used for indicating that the screen state is the normally-on state. It can be understood that the terminal device can directly judge whether the screen state is the screen-off state through the screen detection process, and after receiving the first return value, if the screen state is determined to be the second state value, the screen-off state can be determined, otherwise, the screen state is the normally-on state or the screen-locking state. And the screen locking state can be determined only by combining the screen detection process and the input detection process, and if the first return value is the first state value and the second return value is the third state value, the screen locking state is determined.
In a specific embodiment, if the terminal device is equipped with an android system, the screen detection process may be implemented by an isactuave method provided by the android system, and the input detection process may be implemented by an inkeyguard resuctredinputmode method provided by the android system.
And 103, if the interface state meets the first condition, switching the media application to a background and keeping the running state of the media application unchanged.
And 104, if the interface state does not meet the first condition, switching the media application to a background and setting the running state of the media application to a pause state.
In the embodiment of the invention, the terminal equipment can switch the media application from the foreground to the background through the life cycle callback method. The lifecycle callback method may vary among different applications, for example, the media application may add a play pause flow for setting the running state of the media application to a pause state while switching the media application to the background.
In particular embodiments, the following may be included: (1) if the terminal device detects that the screen state is the screen extinguishing state and the running state of the media application is the playing state, the media application is switched to the background and the running of the playing pause flow is forbidden. (2) And if the terminal equipment detects that the screen state is the screen locking state and the running state of the media application is the playing state, switching the media application to the background and forbidding the running of the playing pause flow. (3) If the terminal device detects that the screen state is a normally bright state and the running state of the media application is a playing state, the media application is switched to the background and a playing pause process is run to set the running state of the media application to a pause state. It can be understood that, when the media application runs in the foreground and is in the playing state, if the user changes the screen state of the terminal device into the screen locking state or the screen off state, it can be determined that the user wants the media application to run, and the screen is closed, so that the power is saved. Therefore, when the terminal device switches the media application to the background, the running state of the terminal device is kept unchanged. If the user causes the media application to switch to the background by returning to the home screen or launching other applications while the screen is normally on, it may be determined that the user wishes to pause interaction with the media application. For example, a certain video application runs in the foreground of the terminal device, at a certain moment, a chat message pops up at the top of the screen of the terminal device, and a user clicks the message to enter the corresponding chat application, and at the moment, the video application is switched to the background. When the terminal equipment switches the video application to the background, the running state of the video application is set to be a pause state, so that the influence of the audio on the viewing of the chat message is prevented, and meanwhile, the invalid playing of the video application can be avoided.
In the embodiment of the invention, the terminal equipment firstly determines the interface state of the terminal equipment after the first operation of triggering the state switching command is executed, then judges whether the interface state meets the first condition, if the interface state meets the first condition, the media application is switched to the background and the running state of the media application is kept unchanged, and if the interface state does not meet the first condition, the media application is switched to the background and the running state of the media application is set to be the pause state. When the method switches the media application from the foreground to the background, whether the operation of the media application is suspended is determined according to the interface state, so that the aim of saving electric energy or preventing the mutual interference among a plurality of applications is fulfilled.
Fig. 2 is a flowchart of another media playing control method according to an embodiment of the present invention. As shown in fig. 2, the method may include:
step 201, receiving a state switching command.
At step 202, the onPause method is performed.
Step 203, acquiring the interface state.
In step 204, the onsop method is executed.
The onPause method and the onStop method in the embodiment of the invention are two methods in a life cycle callback method, and are used for switching the application running on the foreground of the terminal equipment to the background. Generally, the onPause method and the onsop method are executed sequentially, the onPause method can make the foreground application lose focus, and the onsop method can further make the application losing focus invisible (i.e. go to background running). The method of the embodiment of the invention adds the interface acquiring state 203 between the onPause method and the onStop method, and adds logic judgment after the onStop method is executed.
Step 205, determining whether the interface state meets the first condition, if yes, entering step 206, otherwise, entering step 207.
Step 206, the running state of the media application is not changed.
And switching the media application to the background and keeping the running state of the media application unchanged.
Step 207, the media application is set to a paused state.
And switching the media application to the background, and setting the running state of the media application to be a pause state.
The method acquires the interface state before the execution of the onStop method and carries out logic judgment according to the interface state in the execution process of the onStop method so as to determine whether to change the running state of the media application, thereby realizing the effect of saving electric energy or preventing mutual interference among a plurality of applications.
The above flow chart is further explained by the specific embodiment. Scene one: the method comprises the steps that a user A plays a video through a smart phone (namely, the video application runs in a foreground and is in a playing state at the moment), if the user A performs screen-off operation at a certain moment when the video is continuously played, the smart phone can sequentially execute an onPause method and an onStop method, after the onPause method is executed, the smart phone can obtain the interface state at the moment through an isoInteractive method and an InKeyguardRestrictedInputMode method, the screen state can be determined to be the screen-off state, the video application is in the playing state, and the first condition is met. Based on the judgment, the smartphone does not change the running state of the video application in the process of executing the onStop method, and the purpose of playing the video in the screen-off state is achieved. Scene two: and the user B starts the audio application of the smart phone to play music, and the audio application runs in the foreground of the smart phone and is in a playing state. If the user B needs to interact with other applications, the audio application needs to be switched to the background. The smart phone obtains the interface state, and determines that the screen state is a constant state and the audio application is in a playing state at the moment. And when the smart phone switches the audio application to the background, music playing is suspended, so that the audio application is prevented from interfering the user B when the user B checks other applications.
Fig. 3 is a schematic structural diagram of a media playback control apparatus according to an embodiment of the present invention. The apparatus may be used as a specific device to implement the media playing control method provided in the embodiment of the present invention, and as shown in fig. 3, the apparatus may include:
the determining module 301 is configured to determine an interface state of the terminal device after a first operation that triggers a state switching command is executed, where the state switching command is used to instruct to switch a media application running on a foreground of the terminal device to a background.
The determining module 302 is configured to determine whether the interface state meets a first condition.
The switching module 303 is configured to switch the media application to the background and keep the running state of the media application unchanged if the interface state meets the first condition.
The switching module 303 is further configured to switch the media application to the background and set the running state of the media application to a suspended state if the interface state does not meet the first condition.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 4, the electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: one or more processors 410, a memory 430, and a communication bus 440 that connects the various system components (including the memory 430 and the processing unit 410).
Communication bus 440 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Electronic devices typically include a variety of computer system readable media. Such media may be any available media that is accessible by an electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 430 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) and/or cache Memory. The electronic device may further include other removable/non-removable, volatile/nonvolatile computer system storage media. Although not shown in FIG. 4, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 440 by one or more data media interfaces. Memory 430 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility having a set (at least one) of program modules, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in memory 430, each of which examples or some combination may include an implementation of a network environment. The program modules generally perform the functions and/or methodologies of the described embodiments of the invention.
The electronic device may also communicate with one or more external devices, may also communicate with one or more devices that enable a user to interact with the electronic device, and/or may communicate with any device (e.g., network card, modem, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may occur via communication interface 420. Furthermore, the electronic device may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via a Network adapter (not shown in FIG. 4) that may communicate with other modules of the electronic device via the communication bus 440. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape Drives, and data backup storage systems, among others.
The processor 410 executes various functional applications and data processing, for example, implementing a media playback control method according to an embodiment of the present invention, by executing programs stored in the memory 430.
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer instruction, and the computer instruction causes the computer to execute the media playing control method provided by the embodiment of the present invention.
The computer-readable storage medium described above may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable compact disc Read Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A media playback control method, the method comprising:
determining an interface state of the terminal equipment after a first operation of triggering a state switching command is executed, wherein the state switching command is used for indicating that a media application running on a foreground of the terminal equipment is switched to a background;
judging whether the interface state meets a first condition or not;
if the interface state meets the first condition, switching the media application to a background and keeping the running state of the media application unchanged;
if the interface state does not meet the first condition, switching the media application to a background and setting the running state of the media application to a pause state.
2. The method of claim 1, wherein determining whether the interface state meets a first condition comprises:
and if the screen state of the terminal equipment is the screen off state and the running state of the media application is the playing state, determining that the interface state meets the first condition.
3. The method of claim 2, wherein the determining that the screen state is the off-screen state comprises:
invoking a screen detection process, wherein the screen detection process is used for detecting the screen state and returning a first return value, and the first return value comprises: the screen display control method comprises the following steps that a first state value or a second state value is used, the first state value is used for indicating that the screen state is a normally-on state or a screen locking state, and the second state value is used for indicating that the screen state is a screen extinguishing state;
receiving the first return value;
and if the first return value is the second state value, determining that the screen state is the screen extinguishing state.
4. The method of claim 2, wherein if the interface state meets the first condition, switching the media application to a background and keeping a running state of the media application unchanged comprises:
if the screen state is the screen-off state and the running state is the playing state, switching the media application to a background and prohibiting running of a playing pause process;
wherein the play pause procedure is used to set the running state of the media application to the pause state.
5. The method of claim 1, wherein determining whether the interface state meets a first condition comprises:
and if the screen state of the terminal equipment is a screen locking state and the running state of the media application is a playing state, determining that the interface state meets the first condition.
6. The method of claim 5, wherein determining that the screen state is the lock screen state comprises:
invoking a screen detection process and an input detection process, wherein the input detection process is used for detecting the screen state and returning a second return value, and the second return value comprises: a third state value or a fourth state value, where the third state value is used to indicate that the screen state is the screen off state or the screen locking state, and the fourth state value is used to indicate that the screen state is the normally on state;
receiving a first return value and a second return value of the screen detection process;
and if the first return value is the first state value and the second return value is the third state value, determining that the screen state is the screen locking state.
7. The method of claim 5, wherein if the interface state does not meet the first condition, switching the media application to the background and setting the running state of the media application to a suspended state comprises:
if the screen state is a normally bright state and the running state is the playing state, switching the media application to a background and running a playing suspension process to set the running state of the media application to the suspension state.
8. A video playback control apparatus, characterized in that the apparatus comprises:
the determining module is used for determining the interface state of the terminal equipment after a first operation triggering a state switching command is executed, wherein the state switching command is used for indicating that a media application running on a foreground of the terminal equipment is switched to a background;
the judging module is used for judging whether the interface state meets a first condition or not;
the switching module is used for switching the media application to a background and keeping the running state of the media application unchanged if the interface state meets the first condition;
the switching module is further configured to switch the media application to a background and set the running state of the media application to a suspended state if the interface state does not meet the first condition.
9. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor being capable of invoking the program instructions to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the method of any of claims 1-7.
CN202210692226.7A 2022-06-17 2022-06-17 Media playing control method and device Pending CN114969399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210692226.7A CN114969399A (en) 2022-06-17 2022-06-17 Media playing control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210692226.7A CN114969399A (en) 2022-06-17 2022-06-17 Media playing control method and device

Publications (1)

Publication Number Publication Date
CN114969399A true CN114969399A (en) 2022-08-30

Family

ID=82963576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210692226.7A Pending CN114969399A (en) 2022-06-17 2022-06-17 Media playing control method and device

Country Status (1)

Country Link
CN (1) CN114969399A (en)

Similar Documents

Publication Publication Date Title
CN107172454B (en) Video recommendation method, medium, device and computing equipment
CN109618177B (en) Video processing method and device, electronic equipment and computer readable storage medium
JP2022031339A (en) Display method and device
CN109240107B (en) Control method and device of electrical equipment, electrical equipment and medium
RU2619089C2 (en) Method and device for multiple videos reproduction
CN107797841B (en) Window control method and device, terminal equipment and storage medium
CN108132735B (en) Terminal and application control method
CN104580884A (en) Shooting method and terminal
CN104572322A (en) Method for operating terminal screen
US11138956B2 (en) Method for controlling display of terminal, storage medium, and electronic device
JP2007035010A (en) Method for initializing instance and executing computer program by loading operation system core program from high-speed data access memory
CN110401877B (en) Video playing control method and device, electronic equipment and storage medium
US20150363091A1 (en) Electronic device and method of controlling same
US20170161098A1 (en) Method, device, and terminal for switching operating systems
CN104572071A (en) Terminal
CN111813492A (en) Display method and device of fast application, electronic equipment and storage medium
CN112394900A (en) Vehicle-mounted music system control method and device and electronic equipment
CN105807893A (en) Information processing method and electronic device
CN115469816B (en) Method, device, equipment and storage medium for switching reading and writing of memory
US20200167060A1 (en) Method, device, and computer program for displaying an icon
CN114969399A (en) Media playing control method and device
CN115934227A (en) Application program operation control method, device, equipment and storage medium
US10489192B2 (en) Method and controlling apparatus for automatically terminating an application of an electronic apparatus based on audio volume level being adjusted lower than a threshold audio volume level by a user
US11303595B2 (en) Method and device for displaying text and video in two threads
CN110225391B (en) Video playing control method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination