CN114564169A - Multimedia file playing method and device, electronic equipment and storage medium - Google Patents

Multimedia file playing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114564169A
CN114564169A CN202210153479.7A CN202210153479A CN114564169A CN 114564169 A CN114564169 A CN 114564169A CN 202210153479 A CN202210153479 A CN 202210153479A CN 114564169 A CN114564169 A CN 114564169A
Authority
CN
China
Prior art keywords
playing
volume
multimedia file
current
terminal
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
CN202210153479.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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210153479.7A priority Critical patent/CN114564169A/en
Publication of CN114564169A publication Critical patent/CN114564169A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The disclosure relates to a multimedia file playing method, a multimedia file playing device, electronic equipment and a storage medium, and relates to the technical field of multimedia. The embodiment of the disclosure at least solves the problem that playing the multimedia file interferes with other people around the multimedia file in the related art. The method comprises the following steps: responding to the playing operation aiming at the multimedia file, and acquiring the current playing environment of the terminal and the playing mode of the terminal; under the condition that a first preset condition is met, setting the current playing volume as a first volume, wherein the first preset condition is that the current playing environment is a first playing environment, and the playing mode of the terminal is a play-out mode, and the play-out mode refers to that a loudspeaker is adopted to play audio; and playing the multimedia file according to the current playing volume. Therefore, under the condition that the terminal is in the first playing environment and the playing mode is the play-out mode, the multimedia file is played according to the first volume so as to avoid interference of other people around due to overlarge sound.

Description

Multimedia file playing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of multimedia technologies, and in particular, to a method and an apparatus for playing a multimedia file, an electronic device, and a storage medium.
Background
In a scenario where a multimedia file is played, the multimedia file is usually played according to a default volume of the system. If the use environment is a library, a conference room, a movie theater, etc., there may be situations where the volume is too large corresponding to the ambient environment by the default volume level. However, although it is possible to make the adjustment manually, the first time to start playing is already emitting too loud sound, causing interference to others in the surroundings.
Disclosure of Invention
The present disclosure provides a multimedia file playing method, an apparatus, an electronic device and a storage medium, so as to at least solve the problem in the related art that playing a multimedia file interferes with other people around. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a multimedia file playing method applied to a terminal, including: responding to the playing operation aiming at the multimedia file, and acquiring the current playing environment of the terminal and the playing mode of the terminal; under the condition that a first preset condition is met, setting the current playing volume as a first volume, wherein the first preset condition is that the current playing environment is a first playing environment, and the playing mode of the terminal is a play-out mode; and playing the multimedia file according to the current playing volume.
Optionally, the method for playing a multimedia file further includes: according to the current playing volume, before the multimedia file is played, under the condition that a second preset condition is met, the current playing volume is set to be the second volume, wherein the second preset condition is as follows: the current playing environment is a first playing environment, and the playing mode of the terminal is not a play-out mode; and under the condition that a third preset condition is met, setting the current playing volume as a third volume, wherein the third preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is a play-out mode; and under the condition that a fourth preset condition is met, setting the current playing volume as a fourth volume, wherein the fourth preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is not the play-out mode.
Optionally, the method for playing a multimedia file further includes: determining the volume average value of the historical use volume meeting a first preset condition as a first volume before playing the multimedia file according to the current playing volume; determining the volume average value of the historical use volume meeting the second preset condition as a second volume; determining the volume average value of the historical use volume meeting the third preset condition as a third volume; and determining the volume average value of the historical use volume meeting the fourth preset condition as the fourth volume.
Optionally, the method for playing a multimedia file further includes: according to the current playing volume, before the multimedia file is played, under the condition that a first volume adjustment operation aiming at the playing volume is received and a second volume adjustment operation is not received within a preset time interval, the playing volume is stored and adjusted; in adjusting the playing volume, obtaining the historical using volume meeting the current preset condition, where the current preset condition may be any one of the following: a first preset condition, a second preset condition, a third preset condition and a fourth preset condition.
Optionally, the "playing the multimedia file according to the current playing volume" includes: in the process of adjusting the playing volume, acquiring the average using volume corresponding to the current time period, wherein the current time period is the time period corresponding to the receiving time of the playing operation; playing the multimedia file according to the volume obtained by the product of the first preset proportion and the current playing volume under the condition that the average using volume is smaller than the first preset volume; under the condition that the average using volume is larger than a second preset volume, playing the multimedia file according to the volume obtained by the product of a second preset proportion and the current playing volume; and under the condition that the average using volume is greater than or equal to the first preset volume and the average using volume is less than or equal to the second preset volume, playing the multimedia file according to the current playing volume.
Optionally, the obtaining the play mode of the terminal includes: under the condition that the terminal is connected with the earphone, determining that the playing mode of the terminal is a receiver mode; and under the condition that the terminal is not connected with the earphone, determining that the play mode of the terminal is a play-out mode.
Optionally, the obtaining of the current playing environment of the terminal includes: acquiring current geographical position information of a terminal; under the condition that the comparison table of the preset playing environment and the geographic position comprises the current geographic position information, determining the current playing environment as a first playing environment; and under the condition that the preset playing environment and the geographic position comparison table do not contain the current geographic position information, determining the current playing environment as a second playing environment.
Optionally, the obtaining of the current playing environment of the terminal includes: acquiring a current wireless network name currently connected with a terminal; under the condition that the preset network name list comprises the current wireless network name, determining the current playing environment as a first playing environment; and under the condition that the current wireless network name is not included in the preset network name list, determining the current playing environment as a second playing environment.
According to a second aspect of the embodiments of the present disclosure, there is provided a multimedia file playing apparatus, applied to a terminal, including an obtaining unit, a setting unit, and a playing unit; the terminal comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for responding to the playing operation aiming at the multimedia file, and acquiring the current playing environment of the terminal and the playing mode of the terminal; the setting unit is used for setting the current playing volume to be the first volume under the condition that a first preset condition is met, wherein the first preset condition is that the current playing environment acquired by the acquisition unit is the first playing environment, and the playing mode of the terminal is the play-out mode; and the playing unit is used for playing the multimedia file according to the current playing volume set by the setting unit.
Optionally, the multimedia file playing apparatus further includes: a setting unit further configured to: the playing unit sets the current playing volume as a second volume according to the current playing volume before playing the multimedia file under the condition of meeting a second preset condition, wherein the second preset condition is as follows: the current playing environment is a first playing environment, and the playing mode of the terminal is not a play-out mode; a setting unit further configured to: the playing unit sets the current playing volume as a third volume according to the current playing volume before playing the multimedia file and under the condition that a third preset condition is met, wherein the third preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is a play-out mode; a setting unit further configured to: the playing unit sets the current playing volume to be the fourth volume according to the current playing volume before playing the multimedia file and under the condition that the fourth preset condition is met, wherein the fourth preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is not a play-out mode.
Optionally, the multimedia file playing apparatus further includes: a determination unit; the determining unit is used for determining the volume average value of the historical use volume meeting the first preset condition as the first volume before the playing unit plays the multimedia file according to the current playing volume; the determining unit is further used for determining the volume average value of the historical use volume meeting the second preset condition as the second volume by the playing unit according to the current playing volume before the multimedia file is played; the determining unit is further used for determining the volume average value of the historical use volume meeting a third preset condition as a third volume by the playing unit according to the current playing volume before the multimedia file is played; and the determining unit is further used for determining the volume average value of the historical use volume meeting the fourth preset condition as the fourth volume by the playing unit according to the current playing volume before the multimedia file is played.
Optionally, the multimedia file playing apparatus further includes: a storage unit; the storage unit is used for storing and adjusting the playing volume when a first volume adjustment operation aiming at the playing volume is received and a second volume adjustment operation is not received within a preset time interval before the playing unit plays the multimedia file according to the current playing volume; the obtaining unit is further configured to obtain, in the adjusted playback volume stored in the storage unit, a historical usage volume that meets a current preset condition, where the current preset condition may be any one of: a first preset condition, a second preset condition, a third preset condition and a fourth preset condition.
Optionally, the playing unit is specifically configured to: in the adjustment of the playing volume, acquiring the average using volume corresponding to the current time period, wherein the current time period is the time period corresponding to the receiving time of the playing operation; playing the multimedia file according to the volume obtained by the product of the first preset proportion and the current playing volume under the condition that the average using volume is smaller than the first preset volume; under the condition that the average using volume is larger than a second preset volume, playing the multimedia file according to the volume obtained by the product of a second preset proportion and the current playing volume; and under the condition that the average using volume is greater than or equal to the first preset volume and the average using volume is less than or equal to the second preset volume, playing the multimedia file according to the current playing volume.
Optionally, the obtaining unit is specifically configured to: under the condition that the terminal is connected with the earphone, determining that the playing mode of the terminal is a receiver mode; and under the condition that the terminal is not connected with the earphone, determining that the play mode of the terminal is a play-out mode.
Optionally, the obtaining unit is specifically configured to: acquiring current geographical position information of a terminal; under the condition that the preset playing environment and the geographic position comparison table comprise the current geographic position information, determining the current playing environment as a first playing environment; and under the condition that the preset playing environment and the geographic position comparison table do not contain the current geographic position information, determining the current playing environment as a second playing environment.
Optionally, the obtaining unit is specifically configured to: acquiring a current wireless network name currently connected with a terminal; under the condition that the preset network name list comprises the current wireless network name, determining the current playing environment as a first playing environment; and under the condition that the current wireless network name is not included in a preset network name list, determining the current playing environment as the second playing environment.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the above instructions to implement the multimedia file playing method as provided in the first aspect and any one of its possible design manners.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a readable storage medium, wherein instructions of the readable storage medium, when executed by a processor, can implement the multimedia file playing method as provided in the first aspect and any one of the possible design manners thereof.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, which includes computer programs/instructions, and when the computer programs/instructions are executed by a processor, the method for playing a multimedia file as provided in the first aspect and any one of the possible design manners thereof is implemented.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the method comprises the steps of firstly responding to the playing operation aiming at the multimedia file, obtaining the current playing environment of the terminal and the playing mode of the terminal, then setting the current playing volume as a first volume under the condition that a first preset condition is met, wherein the first preset condition is that the current playing environment is the first playing environment and the playing mode of the terminal is a play-out mode, and finally playing the multimedia file according to the current playing volume. Therefore, under the condition that the terminal is in the first playing environment and the playing mode is the play-out mode, the multimedia file is played according to the first volume so as to avoid interference of other people around due to overlarge sound.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is one of the flow diagrams illustrating a method of playing a multimedia file according to an exemplary embodiment;
FIG. 2 is a second flowchart illustrating a method for playing a multimedia file according to an exemplary embodiment;
FIG. 3 is a third flowchart illustrating a method for playing a multimedia file according to an exemplary embodiment;
FIG. 4 is a fourth flowchart illustrating a method of playing a multimedia file according to an exemplary embodiment;
FIG. 5 is a fifth flowchart illustrating a method for playing a multimedia file according to an exemplary embodiment;
FIG. 6 is a block diagram illustrating a multimedia file playback device in accordance with an exemplary embodiment;
fig. 7 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In addition, in the description of the embodiments of the present disclosure, "/" indicates an OR meaning, for example, A/B may indicate A or B, unless otherwise specified. "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "a plurality" means two or more than two.
The multimedia file refers to a file which combines various media such as images, sounds, images, characters, texts, animations and the like to form an organic whole and can realize a certain function. The multimedia file can be played through an application program (such as a video player), the application program is installed on the terminal, and then the application program is started from the terminal, so that the multimedia file can be played. The terminal may be a personal intelligent device such as a mobile phone, an intelligent watch, a video camera, a tablet computer, an Augmented Reality (AR), a Virtual Reality (VR), or an electronic device such as a notebook computer, a desktop computer, a television, or another electronic device capable of shooting, displaying, or storing multimedia files, and the device form of the terminal is not limited herein.
The following describes a multimedia file playing method provided by the embodiment of the present disclosure with reference to the drawings, and the following exemplarily describes the method by taking an execution subject as a multimedia file playing device as an example. Fig. 1 is a schematic flowchart of a multimedia file playing method according to an embodiment of the disclosure. As shown in fig. 1, a multimedia file playing method provided by the embodiment of the present disclosure includes the following steps 101 to 103.
Step 101, the multimedia file playing device responds to the playing operation for the multimedia file, and obtains the current playing environment of the terminal and the playing mode of the terminal.
In the embodiment of the present disclosure, the playing operation may be a playing operation of a multimedia file in a certain application program, or may be a playing operation directly for a multimedia file. Illustratively, a double click (play operation) is made on the multimedia file for playing the multimedia file.
In the embodiment of the present disclosure, the current playing environment refers to an external environment where the terminal is located, such as a library, a mall, an office, and the like.
Optionally, in this embodiment of the present disclosure, the multimedia file playing apparatus may determine the current playing environment through the geographic location of the terminal; the current playing environment can be judged according to street view information corresponding to the geographic position of the terminal.
In the embodiment of the present disclosure, the playing mode includes an earphone mode and a play-out mode, where the earphone mode refers to playing audio by using an earphone mode, and the play-out mode refers to playing audio by using a speaker.
Optionally, in this disclosure, the multimedia file playing apparatus may determine the playing mode of the terminal by detecting an earphone interface.
And 102, setting the current playing volume as a first volume by the multimedia file playing device under the condition that a first preset condition is met.
In the embodiment of the present disclosure, the first preset condition is that the current playing environment is the first playing environment, and the playing mode of the terminal is the play-out mode, where the play-out mode refers to playing audio by using a speaker.
In the embodiment of the disclosure, when the multimedia file is played, if the terminal is in a public place, the probability of interfering with other people around is high. Thus, the first playback environment may be a public place.
Optionally, in this embodiment of the present disclosure, since the terminal may further meet other preset conditions in the actual playing environment, the method for playing a multimedia file provided in this embodiment of the present disclosure further includes: and under the condition that a second preset condition is met, setting the current playing volume as a second volume, wherein the second preset condition is as follows: the current playing environment is a first playing environment, and the playing mode of the terminal is not a play-out mode; and under the condition that a third preset condition is met, setting the current playing volume as a third volume, wherein the third preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is a play-out mode; and under the condition that a fourth preset condition is met, setting the current playing volume as a fourth volume, wherein the fourth preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is not a play-out mode.
The technical scheme provided by the disclosure at least brings the following beneficial effects: according to different situations of the current playing environment and the playing mode, the preset conditions can be specifically summarized into four preset conditions, namely, a first preset condition, a second preset condition, a third preset condition and a fourth preset condition. And correspondingly setting the current playing volume to be the first volume, the second volume, the third volume and the fourth volume under different preset conditions, so that the current playing volume of the terminal can be set under different preset conditions.
Optionally, in this embodiment of the present disclosure, in order to determine the current playing volume set under different preset conditions, the method for playing a multimedia file provided in this embodiment of the present disclosure further includes: determining the volume average value of the historical use volume meeting the first preset condition as a first volume; determining the volume average value of the historical use volume meeting the second preset condition as a second volume; determining the volume average value of the historical use volume meeting the third preset condition as a third volume; and determining the volume average value of the historical use volume meeting the fourth preset condition as the fourth volume.
In the embodiment of the present disclosure, the history use volume is a play volume used when the terminal plays the multimedia file. While the historical usage volume is stored, the corresponding current playing environment and playing mode also need to be recorded. In the process of determining the first volume, the second volume, the third volume and the fourth volume, it is necessary to search for a history use volume meeting each preset condition according to the first preset condition, the second preset condition, the third preset condition and the fourth preset condition, and the method specifically includes: the volume average value of the historical use volume corresponding to each preset condition is calculated to obtain the first volume, the second volume, the third volume and the fourth volume.
The technical scheme provided by the disclosure at least brings the following beneficial effects: and respectively determining corresponding first volume, second volume, third volume and fourth volume according to the historical use volume corresponding to each preset condition met by the terminal, so that the multimedia file is played by adopting different volumes under the condition that the terminal meets different preset conditions, and the current playing volume can adapt to different current playing environments and playing modes.
Optionally, in this disclosure, since the playback operation for the multimedia file may last for tens of seconds, minutes, tens of minutes, or even hours, and the playback volume may change during the process of continuously playing the multimedia file, in order to obtain the prepared playback volume, the method for playing the multimedia file provided in this disclosure further includes: under the condition that a first volume adjustment operation aiming at the playing volume is received and a second volume adjustment operation is not received within a preset time interval, the playing volume is stored and adjusted; in adjusting the playing volume, obtaining the historical using volume meeting the current preset condition, where the current preset condition may be any one of the following: a first preset condition, a second preset condition, a third preset condition and a fourth preset condition.
In the embodiment of the present disclosure, after receiving the first volume adjustment operation, within a preset time interval, the second volume adjustment operation is not received, which may be understood that the playing volume after responding to the first volume adjustment operation meets the requirements of the current playing environment and the playing mode.
In the embodiment of the present disclosure, for a single play operation of a multimedia file, a current play environment and a play mode of a terminal may change during a play process, and because a difference in content of the multimedia file itself may cause a change in a volume output by the terminal under the same current play volume, a plurality of adjusted play volumes may be stored for the single play operation of the multimedia file.
In this disclosure, adjusting the playing volume includes adjusting the playing volume of the terminal and adjusting the playing volume of the application program, the first volume adjustment operation may adjust the playing volume of the terminal or adjust the playing volume of the application program, and the second volume adjustment operation may adjust the playing volume of the terminal or adjust the playing volume of the application program. And the historical use volume and the current play volume corresponding to the adjusted play volume respectively comprise the historical use volume of the terminal, the historical use volume of the application program, the current play volume of the terminal and the current play volume of the application program.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the method comprises the steps of storing and adjusting the playing volume when a first volume adjustment operation aiming at the playing volume is received and a second volume adjustment operation is not received within a preset time interval so as to avoid obtaining the used volume in the volume adjustment process, not only storing the historical used volume under the current preset condition, but also reducing the stored data volume for adjusting the playing volume.
And 103, playing the multimedia file by the multimedia file playing device according to the current playing volume.
In the embodiment of the present disclosure, according to the current playing volume, the volume of the terminal is set as the current playing volume, and the multimedia file is played.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the method comprises the steps of firstly responding to the playing operation aiming at the multimedia file, obtaining the current playing environment of the terminal and the playing mode of the terminal, then setting the current playing volume as a first volume under the condition that a first preset condition is met, wherein the first preset condition is that the current playing environment is the first playing environment and the playing mode of the terminal is a play-out mode, and finally playing the multimedia file according to the current playing volume. Therefore, under the condition that the terminal is in the first playing environment and the playing mode is the play-out mode, the multimedia file is played according to the first volume so as to avoid interference of other people around due to overlarge sound.
Optionally, as shown in fig. 2, step 103 may also be implemented by steps 201 to 204.
Step 201, the multimedia file playing device obtains the average volume of use corresponding to the current time period in adjusting the playing volume.
Step 202, under the condition that the average volume of use is less than the first preset volume, the multimedia file playing device plays the multimedia file according to the volume obtained by the product of the first preset proportion and the current playing volume.
Step 203, under the condition that the average volume is larger than the second preset volume, the multimedia file playing device plays the multimedia file according to the volume obtained by multiplying the second preset proportion by the current playing volume.
And 204, under the condition that the average using volume is greater than or equal to the first preset volume and the average using volume is less than or equal to the second preset volume, the multimedia file playing device plays the multimedia file according to the current playing volume.
In the embodiment of the present disclosure, the current time period is a time period corresponding to the receiving time of the play operation. The time period can be divided into a sleep time period (22-5 o 'clock), a wake-up time period (5-7 o' clock), a commute time period (7-9 o 'clock, 18-19 o' clock), a work time period (8-12 o 'clock), a lunch break time period (12-13 o' clock), and the like.
In the embodiment of the present disclosure, the time period may be used to distinguish the personalized use requirements of the user, for example, from 5 to 7 in the morning, the user corresponding to the terminal is in a home environment, and in a general case, when the family member is in a rest, the currently played sound is adjusted according to the played sound in the time period, so as to reduce the influence of playing the multimedia file on other family members.
For example, assuming that the first preset volume is 10% of the maximum value of the playable volume, the first preset proportion may be set to 90% based on the current playback volume, and the current playback volume may be further reduced to play the multimedia file with a smaller sound.
For example, assuming that the second preset volume is 20% of the maximum value of the playable volume, the second preset proportion may be set to 120% based on the current playback volume, so as to further increase the current playback volume and play the multimedia file with a larger sound.
In the embodiment of the present disclosure, the first preset volume and the second preset volume may be the same.
The technical scheme provided by the disclosure at least brings the following beneficial effects: and adjusting the playing volume of the multimedia file again through the current time period, namely determining the playing volume of the played multimedia file according to three parameters of time, the current playing environment and the playing mode so as to ensure the playing volume adopted by the played multimedia file and not to interfere other people around.
Optionally, as shown in fig. 3, the obtaining of the play mode of the terminal in step 101 may also be implemented through step 301 and step 302.
Step 301, under the condition that the terminal is connected with the earphone, the multimedia file playing device determines that the playing mode of the terminal is the earphone mode.
Step 302, under the condition that the terminal is not connected with the earphone, the multimedia file playing device determines that the playing mode of the terminal is the play-out mode.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the playing mode of the terminal is determined by detecting whether the terminal is connected with the earphone, so that the accuracy of the determined playing mode can be improved.
Optionally, as shown in fig. 4, the obtaining of the current playing environment of the terminal in step 101 may also be implemented through steps 401 to 403.
Step 401, the multimedia file playing device obtains the current geographic location information of the terminal.
Step 402, under the condition that the comparison table of the preset playing environment and the geographic position includes the current geographic position information, the multimedia file playing device determines that the current playing environment is the first playing environment.
Step 403, under the condition that the preset playing environment and the geographic position comparison table do not include the current geographic position information, the multimedia file playing device determines that the current playing environment is the second playing environment.
In the embodiment of the present disclosure, the preset play environment and geographic location comparison table may be preset, and may be set by a user according to an actual play environment. The current geographic location information may include latitude and longitude information.
Illustratively, the first playback environment is a public place and the second playback environment is a private place.
The technical scheme provided by the disclosure at least brings the following beneficial effects: and determining the current playing environment by presetting whether the current playing environment and the geographic position comparison table comprise the current geographic position information or not so as to improve the probability that the current playing environment is the same as the actual environment of the terminal.
Optionally, as shown in fig. 5, the obtaining of the current playing environment of the terminal in step 101 may also be implemented through steps 501 to 503.
Step 501, the multimedia file playing device obtains the current wireless network name of the terminal currently connected.
Step 502, under the condition that the preset network name list includes the current wireless network name, the multimedia file playing device determines that the current playing environment is the first playing environment.
Step 503, under the condition that the preset network name list does not include the current wireless network name, the multimedia file playing apparatus determines that the current playing environment is the second playing environment.
In the embodiment of the present disclosure, the preset network name list may be preset, and may be set by a user according to an actual network use environment.
The technical scheme provided by the disclosure at least brings the following beneficial effects: and determining the current playing environment by judging whether the preset network name list comprises the current geographical position information or not so as to improve the probability that the current playing environment is the same as the actual environment of the terminal.
The foregoing has described aspects of embodiments of the present disclosure primarily from a methodological perspective. It is to be understood that the multimedia file playing apparatus includes at least one of a hardware structure and a software module corresponding to each function in order to implement the above-described functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The embodiment of the present disclosure may perform the division of the functional units for the multimedia file playing device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that, the division of the units in the embodiment of the present disclosure is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a schematic structural diagram of a multimedia file playing apparatus according to an exemplary embodiment. Referring to fig. 6, the multimedia file playing apparatus provided in the embodiment of the present disclosure is applied to a terminal, and includes an obtaining unit 61, a setting unit 62, and a playing unit 63;
an obtaining unit 61, configured to obtain, in response to a play operation for a multimedia file, a current play environment of a terminal and a play mode of the terminal; for example, as shown in fig. 1, the obtaining unit 61 may be configured to perform step 101.
The setting unit 62 is configured to set a current playing volume to a first volume when a first preset condition is met, where the first preset condition is that the current playing environment acquired by the acquiring unit 61 is a first playing environment, and a playing mode of the terminal is a play-out mode, where the play-out mode is to play audio by using a loudspeaker; for example, as shown in fig. 1, the setting unit 61 may be configured to perform step 102.
And a playing unit 63, configured to play the multimedia file according to the current playing volume set by the setting unit 62. For example, as shown in fig. 1, the playing unit 63 may be configured to perform step 103.
Optionally, as shown in fig. 6, the multimedia file playing apparatus further includes:
the setting unit 62 is further configured to set, by the playing unit 63, the current playing volume to a second volume before the multimedia file is played according to the current playing volume and under a condition that a second preset condition is met, where the second preset condition is: the current playing environment is a first playing environment, and the playing mode of the terminal is not a play-out mode;
the setting unit 62 is further configured to set, by the playing unit 63, the current playing volume to a third volume before the multimedia file is played according to the current playing volume and under a condition that a third preset condition is met, where the third preset condition is: the current playing environment is a second playing environment, and the playing mode of the terminal is a play-out mode;
the setting unit 62 is further configured to set, by the playing unit 63, the current playing volume to a fourth volume before playing the multimedia file according to the current playing volume and under a condition that a fourth preset condition is met, where the fourth preset condition is: the current playing environment is a second playing environment, and the playing mode of the terminal is not the play-out mode.
Optionally, as shown in fig. 6, the multimedia file playing apparatus further includes: a determination unit 64;
a determining unit 64, configured to determine, by the playing unit 63 according to the current playing volume, a volume average value of the historical use volumes that meet the first preset condition as a first volume before the multimedia file is played;
the determining unit 64 is further configured to determine, by the playing unit 63 according to the current playing volume, the average volume value of the historical use volumes meeting the second preset condition as the second volume before the multimedia file is played;
the determining unit 64 is further configured to determine, by the playing unit 63, the average value of the volume of the historical use volume meeting the third preset condition as a third volume before the multimedia file is played according to the current playing volume;
the determining unit 64 is further configured to determine, by the playing unit 63 according to the current playing volume, the average volume value of the historical use volumes meeting the fourth preset condition as the fourth volume before the multimedia file is played.
Optionally, as shown in fig. 6, the multimedia file playing apparatus further includes: a storage unit 65;
a storage unit 65, configured to store and adjust the playing volume when the playing unit 63 receives a first volume adjustment operation for the playing volume and does not receive a second volume adjustment operation within a preset time interval before playing the multimedia file according to the current playing volume;
the obtaining unit 61 is further configured to obtain, in the adjusted playback volume stored in the storage unit 65, a historical usage volume that meets a current preset condition, where the current preset condition may be any one of: a first preset condition, a second preset condition, a third preset condition and a fourth preset condition.
Optionally, as shown in fig. 6, the playing unit 63 is specifically configured to: in the process of adjusting the playing volume, acquiring the average using volume corresponding to the current time period, wherein the current time period is the time period corresponding to the receiving time of the playing operation; playing the multimedia file according to the volume obtained by the product of the first preset proportion and the current playing volume under the condition that the average using volume is smaller than the first preset volume; under the condition that the average using volume is larger than a second preset volume, playing the multimedia file according to the volume obtained by the product of a second preset proportion and the current playing volume; and under the condition that the average using volume is greater than or equal to the first preset volume and the average using volume is less than or equal to the second preset volume, playing the multimedia file according to the current playing volume. For example, as shown in fig. 2, the playing unit 63 may be configured to perform steps 201 to 204.
Optionally, as shown in fig. 6, the obtaining unit 61 is specifically configured to: under the condition that the terminal is connected with the earphone, determining that the playing mode of the terminal is a receiver mode; and under the condition that the terminal is not connected with the earphone, determining that the play mode of the terminal is a play-out mode. For example, as shown in fig. 3, the obtaining unit 61 may be configured to perform step 301 to step 302.
Optionally, as shown in fig. 6, the obtaining unit 61 is specifically configured to: acquiring current geographical position information of a terminal; under the condition that the preset playing environment and the geographic position comparison table comprise the current geographic position information, determining the current playing environment as a first playing environment; and under the condition that the preset playing environment and the geographic position comparison table do not contain the current geographic position information, determining the current playing environment as a second playing environment. For example, as shown in fig. 4, the obtaining unit 61 may be configured to perform steps 401 to 403.
Optionally, as shown in fig. 6, the obtaining unit 61 is specifically configured to: acquiring a current wireless network name of a terminal currently connected; under the condition that the preset network name list comprises the current wireless network name, determining the current playing environment as a first playing environment; and under the condition that the current wireless network name is not included in a preset network name list, determining the current playing environment as the second playing environment. For example, as shown in fig. 5, the obtaining unit 61 may be configured to perform steps 501 to 503.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 7 is a schematic structural diagram of an electronic device provided by the present disclosure. As in fig. 7, the electronic device may include a processor 71, a memory 72 for storing instructions executable by the processor 71; wherein, the processor 71 is configured to execute the above instructions to implement the multimedia file playing method in the above embodiment.
In addition, the electronic device may also include a communication bus 73 and at least one communication interface 74.
The processor 71 may be a Central Processing Unit (CPU), a micro-processing unit, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits for controlling the execution of programs in accordance with the disclosed aspects.
The communication bus 73 is a signal path for transmitting information between the above components.
The communication interface 74 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The memory 72 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 72 may be separate and coupled to the processor 71 via a communication bus 74. The memory 72 may also be integrated with the processor 71.
The memory 72 is used for storing instructions for executing the disclosed solution, and is controlled by the processor 71. The processor 71 is configured to execute programs or instructions stored in the memory 72 to implement the functions in the method of the present disclosure.
As an example, in conjunction with fig. 6, the functions implemented by the acquisition unit 61, the setting unit 62, and the playing unit 63 in the multimedia file playing apparatus are the same as those of the processor 71 in fig. 7.
In particular implementations, processor 71 may include one or more CPUs such as CPU0 and CPU1 in fig. 7 as an example.
In a specific implementation, as an embodiment, the electronic device may include a plurality of processors 71, and each of the processors 71 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Processor 71 herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, electronic device may also include an output device 75 and an input device 76, as one embodiment. The output device 75 is in communication with the processor 71 and may display information in a variety of ways. For example, the output device 75 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 76 is in communication with the processor 71 and can accept user input in a variety of ways. For example, the input device 76 may be a mouse, keyboard, touch screen device or sensing device, and the like.
Those skilled in the art will appreciate that the configuration shown in fig. 7 does not constitute a limitation of the electronic device, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components. The electronic device in fig. 7 may be a server, a client, or other devices.
In addition, the present disclosure also provides a readable storage medium, on which a program or instructions are stored, and when the instructions in the readable storage medium are executed by a processor, the electronic device is enabled to execute the multimedia file playing method provided in the above embodiment. Alternatively, the readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In addition, the present disclosure also provides a computer program product comprising computer programs/instructions, the computer program product being stored in a non-volatile readable storage medium, the computer program product, when executed by at least one processor, causing an electronic device to perform the multimedia file playing method as provided in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A multimedia file playing method is applied to a terminal and comprises the following steps:
responding to the playing operation aiming at the multimedia file, and acquiring the current playing environment of the terminal and the playing mode of the terminal;
under the condition that a first preset condition is met, setting the current playing volume as a first volume, wherein the first preset condition is that the current playing environment is a first playing environment, and the playing mode of the terminal is a play-out mode;
and playing the multimedia file according to the current playing volume.
2. The method of claim 1, wherein before playing the multimedia file at the current playing volume, the method further comprises:
and under the condition that a second preset condition is met, setting the current playing volume as a second volume, wherein the second preset condition is as follows: the current playing environment is a first playing environment, and the playing mode of the terminal is not a play-out mode;
and under the condition that a third preset condition is met, setting the current playing volume as a third volume, wherein the third preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is a play-out mode;
and under the condition that a fourth preset condition is met, setting the current playing volume as a fourth volume, wherein the fourth preset condition is as follows: the current playing environment is a second playing environment, and the playing mode of the terminal is not a play-out mode.
3. The method of claim 2, wherein before playing the multimedia file at the current playing volume, the method further comprises at least one of:
determining the volume average value of the historical use volume meeting the first preset condition as the first volume;
determining the volume average value of the historical use volume meeting the second preset condition as the second volume;
determining the volume average value of the historical use volume meeting the third preset condition as the third volume;
and determining the volume average value of the historical use volume meeting the fourth preset condition as the fourth volume.
4. The method for playing the multimedia file according to claim 3, wherein before playing the multimedia file according to the current playing volume, the method further comprises:
under the condition that a first volume adjustment operation aiming at the playing volume is received and a second volume adjustment operation is not received within a preset time interval, the playing volume is stored and adjusted;
in the adjusting of the playing volume, obtaining a historical use volume meeting a current preset condition, where the current preset condition may be any one of: the first preset condition, the second preset condition, the third preset condition and the fourth preset condition.
5. The method for playing the multimedia file according to claim 4, wherein the playing the multimedia file according to the current playing volume comprises:
in the adjustment of the playing volume, obtaining the average using volume corresponding to the current time period, wherein the current time period is the time period corresponding to the receiving time of the playing operation;
under the condition that the average using volume is smaller than a first preset volume, playing the multimedia file according to the volume obtained by multiplying a first preset proportion by the current playing volume;
under the condition that the average using volume is larger than a second preset volume, playing the multimedia file according to the volume obtained by multiplying a second preset proportion by the current playing volume;
and playing the multimedia file according to the current playing volume under the condition that the average using volume is greater than or equal to a first preset volume and the average using volume is less than or equal to a second preset volume.
6. The method for playing the multimedia file according to claim 1, wherein the obtaining the playing mode of the terminal comprises:
under the condition that the terminal is connected with an earphone, determining that the playing mode of the terminal is a receiver mode;
and under the condition that the terminal is not connected with the earphone, determining that the play mode of the terminal is a play-out mode.
7. A multimedia file playing device is characterized in that the multimedia file playing device is applied to a terminal and comprises an acquisition unit, a setting unit and a playing unit;
the acquisition unit is used for responding to the playing operation of the multimedia file, and acquiring the current playing environment of the terminal and the playing mode of the terminal;
the setting unit is configured to set the current playing volume to a first volume when a first preset condition is met, where the first preset condition is that the current playing environment acquired by the acquiring unit is a first playing environment, and a playing mode of the terminal is a play-out mode;
and the playing unit is used for playing the multimedia file according to the current playing volume set by the setting unit.
8. An electronic device, comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the multimedia file playing method according to any one of claims 1-6.
9. A readable storage medium, wherein instructions in the readable storage medium, when executed by a processor, enable a multimedia file playing method according to any one of claims 1 to 6.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the multimedia file playing method according to any of claims 1-6.
CN202210153479.7A 2022-02-18 2022-02-18 Multimedia file playing method and device, electronic equipment and storage medium Pending CN114564169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210153479.7A CN114564169A (en) 2022-02-18 2022-02-18 Multimedia file playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210153479.7A CN114564169A (en) 2022-02-18 2022-02-18 Multimedia file playing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114564169A true CN114564169A (en) 2022-05-31

Family

ID=81714122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210153479.7A Pending CN114564169A (en) 2022-02-18 2022-02-18 Multimedia file playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114564169A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872746A (en) * 2015-11-26 2016-08-17 乐视网信息技术(北京)股份有限公司 Muting method according to use scenes and terminal device
CN105898573A (en) * 2016-05-03 2016-08-24 北京小米移动软件有限公司 Method and device for multimedia file playing
CN105975245A (en) * 2016-05-03 2016-09-28 北京小米移动软件有限公司 Multimedia file playing method and apparatus
CN106060261A (en) * 2016-06-22 2016-10-26 努比亚技术有限公司 Audio playing device and method
CN107493500A (en) * 2017-08-03 2017-12-19 北京小米移动软件有限公司 Multimedia resource player method and device
CN107786751A (en) * 2017-10-31 2018-03-09 维沃移动通信有限公司 A kind of method for broadcasting multimedia file and mobile terminal
CN108200486A (en) * 2017-12-25 2018-06-22 出门问问信息科技有限公司 The dynamic adjusting method and device of a kind of volume
CN111586234A (en) * 2019-02-18 2020-08-25 奇酷互联网络科技(深圳)有限公司 Intelligent terminal, volume control method thereof and device with storage function
CN113055784A (en) * 2021-03-15 2021-06-29 北京达佳互联信息技术有限公司 Volume adjusting method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872746A (en) * 2015-11-26 2016-08-17 乐视网信息技术(北京)股份有限公司 Muting method according to use scenes and terminal device
CN105898573A (en) * 2016-05-03 2016-08-24 北京小米移动软件有限公司 Method and device for multimedia file playing
CN105975245A (en) * 2016-05-03 2016-09-28 北京小米移动软件有限公司 Multimedia file playing method and apparatus
CN106060261A (en) * 2016-06-22 2016-10-26 努比亚技术有限公司 Audio playing device and method
CN107493500A (en) * 2017-08-03 2017-12-19 北京小米移动软件有限公司 Multimedia resource player method and device
CN107786751A (en) * 2017-10-31 2018-03-09 维沃移动通信有限公司 A kind of method for broadcasting multimedia file and mobile terminal
CN108200486A (en) * 2017-12-25 2018-06-22 出门问问信息科技有限公司 The dynamic adjusting method and device of a kind of volume
CN111586234A (en) * 2019-02-18 2020-08-25 奇酷互联网络科技(深圳)有限公司 Intelligent terminal, volume control method thereof and device with storage function
CN113055784A (en) * 2021-03-15 2021-06-29 北京达佳互联信息技术有限公司 Volume adjusting method and device

Similar Documents

Publication Publication Date Title
US11798566B2 (en) Data transmission method and apparatus, terminal, and storage medium
CN109791763A (en) Hot word detection in more equipment
US9544346B1 (en) Systems and methods for selecting a node for media streaming
CN102904990A (en) Adjustable mobile telephone settings based on environmental conditions
US20090062943A1 (en) Methods and apparatus for automatically controlling the sound level based on the content
CN110633151A (en) Method, device and storage medium for balancing distributed message issuing cluster partitions
CN111866433B (en) Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium
US20110026737A1 (en) Method and apparatus for controlling volume in an electronic machine
CN110035318B (en) Video playing method and device and multimedia data playing method
JP2016524867A (en) Content delivery method and apparatus for multi-screen viewing
CN111147906B (en) Synchronous playing system and synchronous playing method
US20130281123A1 (en) Information-processing device, method, information-processing system, and computer-readable non-transitory storage medium
US9112917B2 (en) Controller system and method therefor
US10911514B2 (en) Synchronized wireless and video operations
WO2020206688A1 (en) Video playback method and apparatus, storage medium and electronic device
CN112188342A (en) Equalization parameter determination method and device, electronic equipment and storage medium
CN114564169A (en) Multimedia file playing method and device, electronic equipment and storage medium
US10630750B2 (en) Electronic device and content reproduction method controlled by the electronic device
WO2021258608A1 (en) Bandwidth determination method and apparatus, and terminal, and storage medium
CN113965768A (en) Live broadcast room information display method and device, electronic equipment and server
WO2023024894A1 (en) Multi-device synchronous playback method and apparatus
CN116095230B (en) Application program recommendation method, terminal device and readable storage medium
US20220060797A1 (en) Method and apparatus for modifying output characteristics of proximate devices
US11006183B2 (en) Method and apparatus for modifying output characteristics of proximate devices
WO2024051638A1 (en) Sound-field calibration method, and electronic device and system

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