CN114564169A - Multimedia file playback method, device, electronic device and storage medium - Google Patents
Multimedia file playback method, device, electronic device and storage medium Download PDFInfo
- 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
- volume
- playing
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Reverberation, Karaoke And Other Acoustics (AREA)
Abstract
Description
技术领域technical field
本公开涉及多媒体技术领域,尤其涉及一种多媒体文件播放方法、装置、电子设备以及存储介质。The present disclosure relates to the field of multimedia technologies, and in particular, to a method, device, electronic device, and storage medium for playing a multimedia file.
背景技术Background technique
在播放多媒体文件的场景中,通常按照系统的默认音量大小进行播放。如果图书馆、会议室、电影院等使用环境,那么默认音量大小相对应周围环境可能也存在音量过大的情况。然而,虽然可以通过手动方式进行调整,但是开始播放的第一时间已经发出过大的声音,对周围其他人造成干扰。In the scenario of playing multimedia files, it is usually played according to the default volume of the system. If the library, conference room, movie theater, etc. are used in an environment, the default volume may also be too loud for the surrounding environment. However, although it can be adjusted manually, it is too loud when it starts playing, causing disturbance to others around.
发明内容SUMMARY OF THE INVENTION
本公开提供一种多媒体文件播放方法、装置、电子设备以及存储介质,以至少解决相关技术中,播放多媒体文件干扰周围其他人的问题。本公开的技术方案如下:The present disclosure provides a method, device, electronic device and storage medium for playing a multimedia file, so as to at least solve the problem in the related art that playing a multimedia file interferes with other people around. The technical solutions of the present disclosure are as follows:
根据本公开实施例的第一方面,提供一种多媒体文件播放方法,应用于终端,包括:响应于针对多媒体文件的播放操作,获取终端的当前播放环境,以及终端的播放模式;在满足第一预置条件的情况下,将当前播放音量设置为第一音量,第一预置条件为当前播放环境为第一播放环境,且终端的播放模式为外放模式;按照当前播放音量,播放多媒体文件。According to a first aspect of the embodiments of the present disclosure, there is provided a method for playing a multimedia file, which is applied to a terminal, including: in response to a playing operation for a multimedia file, obtaining a current playing environment of the terminal and a playing mode of the terminal; In the case of preset conditions, the current playback volume is set to the first volume, the first preset condition is that the current playback environment is the first playback environment, and the playback mode of the terminal is the external playback mode; according to the current playback volume, the multimedia file is played. .
可选的,上述多媒体文件播放方法还包括:按照当前播放音量,播放多媒体文件之前,在满足第二预置条件的情况下,将当前播放音量设置为第二音量,第二预置条件为:当前播放环境为第一播放环境,且终端的播放模式不为外放模式;在满足第三预置条件的情况下,将当前播放音量设置为第三音量,第三预置条件为:当前播放环境为第二播放环境,且终端的播放模式为外放模式;在满足第四预置条件的情况下,将当前播放音量设置为第四音量,第四预置条件为:当前播放环境为第二播放环境,且终端的播放模式不为外放模式。Optionally, the method for playing a multimedia file further includes: according to the current playing volume, before playing the multimedia file, under the condition that a second preset condition is satisfied, setting the current playing volume to the second volume, and the second preset condition is: The current playback environment is the first playback environment, and the playback mode of the terminal is not the external playback mode; if the third preset condition is met, the current playback volume is set to the third volume, and the third preset condition is: the current playback The environment is the second playback environment, and the playback mode of the terminal is the external playback mode; if the fourth preset condition is met, the current playback volume is set to the fourth volume, and the fourth preset condition is: the current playback environment is the first 2. The playback environment, and the playback mode of the terminal is not the external playback mode.
可选的,上述多媒体文件播放方法还包括:按照当前播放音量,播放多媒体文件之前,将满足第一预置条件的历史使用音量的音量平均值,确定为第一音量;将满足第二预置条件的历史使用音量的音量平均值,确定为第二音量;将满足第三预置条件的历史使用音量的音量平均值,确定为第三音量;将满足第四预置条件的历史使用音量的音量平均值,确定为第四音量。Optionally, the method for playing a multimedia file further includes: according to the current playing volume, before playing the multimedia file, determining the volume average value of the historically used volume that satisfies the first preset condition as the first volume; The volume average value of the historically used volume of the condition is determined as the second volume; the volume average of the historically used volume that satisfies the third preset condition is determined to be the third volume; the historically used volume that meets the fourth preset condition is determined as the third volume. The average volume is determined as the fourth volume.
可选的,上述多媒体文件播放方法还包括:按照当前播放音量,播放多媒体文件之前,在接收到针对播放音量的第一音量调整操作,且在预置时间间隔内未接收到第二音量调整操作的情况下,存储调整播放音量;在调整播放音量中,获取满足当前预置条件的历史使用音量,当前预置条件可以为以下任一项:第一预置条件,第二预置条件、第三预置条件和第四预置条件。Optionally, the above-mentioned multimedia file playing method further includes: according to the current playing volume, before playing the multimedia file, a first volume adjustment operation for the playing volume is received, and a second volume adjustment operation is not received within a preset time interval. In the case of adjusting the playback volume, store and adjust the playback volume; in adjusting the playback volume, obtain the historically used volume that satisfies the current preset condition, and the current preset condition can be any of the following: the first preset condition, the second preset condition, the first preset condition Three preset conditions and fourth preset conditions.
可选的,上述“按照当前播放音量,播放多媒体文件”,包括:在调整播放音量中,获取当前时间段对应的平均使用音量,当前时间段为播放操作的接收时间对应的时间段;在平均使用音量小于第一预置音量的情况下,按照第一预置比例与当前播放音量的乘积得到的音量,播放多媒体文件;在平均使用音量大于第二预置音量的情况下,按照第二预置比例与当前播放音量的乘积得到的音量,播放多媒体文件;在平均使用音量大于或等于第一预置音量,且,平均使用音量小于或等于第二预置音量的情况下,按照当前播放音量,播放多媒体文件。Optionally, the above-mentioned "playing multimedia files according to the current playback volume" includes: in adjusting the playback volume, obtaining the average used volume corresponding to the current time period, and the current time period is the time period corresponding to the receiving time of the playback operation; When the used volume is lower than the first preset volume, play the multimedia file according to the volume obtained by multiplying the first preset ratio and the current playback volume; when the average used volume is greater than the second preset volume, according to the second preset volume. The volume obtained by the product of the preset ratio and the current playback volume is used to play the multimedia file; when the average volume used is greater than or equal to the first preset volume, and the average volume used is less than or equal to the second preset volume, the current playback volume will be used according to the current playback volume. , to play multimedia files.
可选的,上述“获取终端的播放模式”,包括:在终端与耳机连接的情况下,确定终端的播放模式为听筒模式;在终端不与耳机连接的情况下,确定终端的播放模式为外放模式。Optionally, the above-mentioned "obtaining the playback mode of the terminal" includes: when the terminal is connected to an earphone, determining that the playback mode of the terminal is the earpiece mode; when the terminal is not connected to the earphone, determining that the playback mode of the terminal is external. play mode.
可选的,上述“获取终端的当前播放环境”,包括:获取终端的当前地理位置信息;在预置播放环境与地理位置对照表中包括当前地理位置信息的情况下,确定当前播放环境为第一播放环境;在预置播放环境与地理位置对照表中不包括当前地理位置信息的情况下,确定当前播放环境为第二播放环境。Optionally, the above-mentioned "obtaining the current playback environment of the terminal" includes: acquiring the current geographic location information of the terminal; in the case where the preset playback environment and geographic location comparison table includes the current geographic location information, determining that the current playback environment is the first A playback environment; in the case that the preset playback environment and geographic location comparison table does not include current geographic location information, determine the current playback environment as the second playback environment.
可选的,上述“获取终端的当前播放环境”,包括:获取终端当前连接的当前无线网络名称;在预置网络名称列表中包括当前无线网络名称的情况下,确定当前播放环境为第一播放环境;在预置网络名称列表中不包括当前无线网络名称的情况下,确定当前播放环境为第二播放环境。Optionally, the above-mentioned "obtaining the current playback environment of the terminal" includes: acquiring the current wireless network name that the terminal is currently connected to; in the case where the current wireless network name is included in the preset network name list, determining that the current playback environment is the first playback environment. environment; in the case that the current wireless network name is not included in the preset network name list, determine that the current playback environment is the second playback environment.
根据本公开实施例的第二方面,提供一种多媒体文件播放装置,应用于终端,包括获取单元、设置单元以及播放单元;获取单元,用于响应于针对多媒体文件的播放操作,获取终端的当前播放环境,以及终端的播放模式;设置单元,用于在满足第一预置条件的情况下,将当前播放音量设置为第一音量,第一预置条件为获取单元获取的当前播放环境为第一播放环境,且终端的播放模式为外放模式;播放单元,用于按照设置单元设置的当前播放音量,播放多媒体文件。According to a second aspect of the embodiments of the present disclosure, there is provided a device for playing a multimedia file, which is applied to a terminal and includes an obtaining unit, a setting unit, and a playing unit; A playback environment, and a playback mode of the terminal; a setting unit is used to set the current playback volume to the first volume when the first preset condition is met, and the first preset condition is that the current playback environment acquired by the acquisition unit is the first volume A playing environment, and the playing mode of the terminal is the external playing mode; the playing unit is used for playing the multimedia file according to the current playing volume set by the setting unit.
可选的,上述多媒体文件播放装置还包括:设置单元,还用于:播放单元按照当前播放音量,播放多媒体文件之前,在满足第二预置条件的情况下,将当前播放音量设置为第二音量,第二预置条件为:当前播放环境为第一播放环境,且终端的播放模式不为外放模式;设置单元,还用于:播放单元按照当前播放音量,播放多媒体文件之前,在满足第三预置条件的情况下,将当前播放音量设置为第三音量,第三预置条件为:当前播放环境为第二播放环境,且终端的播放模式为外放模式;设置单元,还用于:播放单元按照当前播放音量,播放多媒体文件之前,在满足第四预置条件的情况下,将当前播放音量设置为第四音量,第四预置条件为:当前播放环境为第二播放环境,且终端的播放模式不为外放模式。Optionally, the above-mentioned multimedia file playing device further includes: a setting unit, which is further configured to: the playing unit, according to the current playing volume, before playing the multimedia file, set the current playing volume to the second when the second preset condition is satisfied. volume, the second preset condition is: the current playback environment is the first playback environment, and the playback mode of the terminal is not the external playback mode; the setting unit is also used for: the playback unit plays the multimedia file according to the current playback volume, and meets the In the case of the third preset condition, the current playback volume is set to the third volume, and the third preset condition is: the current playback environment is the second playback environment, and the playback mode of the terminal is the external playback mode; the setting unit also uses In: before the playback unit plays the multimedia file according to the current playback volume, under the condition that the fourth preset condition is satisfied, the current playback volume is set to the fourth volume, and the fourth preset condition is: the current playback environment is the second playback environment , and the playback mode of the terminal is not the external playback mode.
可选的,上述多媒体文件播放装置还包括:确定单元;确定单元,用于播放单元按照当前播放音量,播放多媒体文件之前,将满足第一预置条件的历史使用音量的音量平均值,确定为第一音量;确定单元,还用于播放单元按照当前播放音量,播放多媒体文件之前,将满足第二预置条件的历史使用音量的音量平均值,确定为第二音量;确定单元,还用于播放单元按照当前播放音量,播放多媒体文件之前,将满足第三预置条件的历史使用音量的音量平均值,确定为第三音量;确定单元,还用于播放单元按照当前播放音量,播放多媒体文件之前,将满足第四预置条件的历史使用音量的音量平均值,确定为第四音量。Optionally, the above-mentioned multimedia file playing device further includes: a determining unit; a determining unit, used for the playing unit to determine, according to the current playing volume, before playing the multimedia file, the volume average value of the historically used volume that satisfies the first preset condition as The first volume; the determining unit is also used for the playback unit to determine the volume average value of the historically used volume that satisfies the second preset condition as the second volume before playing the multimedia file according to the current playback volume; the determining unit is also used for According to the current playback volume, before playing the multimedia file, the playback unit determines the volume average value of the historical use volume that satisfies the third preset condition as the third volume; the determining unit is also used for the playback unit to play the multimedia file according to the current playback volume. Before, the volume average value of the historically used volume that satisfies the fourth preset condition is determined as the fourth volume.
可选的,上述多媒体文件播放装置还包括:存储单元;存储单元,用于播放单元按照当前播放音量,播放多媒体文件之前,在接收到针对播放音量的第一音量调整操作,且在预置时间间隔内未接收到第二音量调整操作的情况下,存储调整播放音量;获取单元,还用于在存储单元存储的调整播放音量中,获取满足当前预置条件的历史使用音量,当前预置条件可以为以下任一项:第一预置条件,第二预置条件、第三预置条件和第四预置条件。Optionally, the above-mentioned multimedia file playback device further includes: a storage unit; a storage unit for the playback unit to play the multimedia file according to the current playback volume, before receiving the first volume adjustment operation for the playback volume, and at a preset time. In the case where the second volume adjustment operation is not received within the interval, the adjusted playback volume is stored; the acquiring unit is further configured to acquire, from the adjusted playback volume stored in the storage unit, the historically used volume that satisfies the current preset condition, the current preset condition It can be any one of the following: the first preset condition, the second preset condition, the third preset condition and the fourth preset condition.
可选的,上述播放单元,具体用于:在调整播放音量中,获取当前时间段对应的平均使用音量,当前时间段为播放操作的接收时间对应的时间段;在平均使用音量小于第一预置音量的情况下,按照第一预置比例与当前播放音量的乘积得到的音量,播放多媒体文件;在平均使用音量大于第二预置音量的情况下,按照第二预置比例与当前播放音量的乘积得到的音量,播放多媒体文件;在平均使用音量大于或等于第一预置音量,且,平均使用音量小于或等于第二预置音量的情况下,按照当前播放音量,播放多媒体文件。Optionally, the above-mentioned playback unit is specifically used to: in adjusting the playback volume, obtain the average used volume corresponding to the current time period, where the current time period is the time period corresponding to the reception time of the playback operation; In the case of setting the volume, the multimedia file is played according to the volume obtained by multiplying the first preset ratio and the current playing volume; when the average used volume is greater than the second preset volume, the multimedia file is played according to the second preset ratio and the current playing volume. Play the multimedia file according to the volume obtained by multiplying the product of , and play the multimedia file according to the current playing volume when the average used volume is greater than or equal to the first preset volume, and the average used volume is less than or equal to the second preset volume.
可选的,上述获取单元,具体用于:在终端与耳机连接的情况下,确定终端的播放模式为听筒模式;在终端不与耳机连接的情况下,确定终端的播放模式为外放模式。Optionally, the above obtaining unit is specifically configured to: when the terminal is connected to the earphone, determine that the playback mode of the terminal is the earpiece mode; when the terminal is not connected to the earphone, determine that the playback mode of the terminal is the external playback mode.
可选的,上述获取单元,具体用于:获取终端的当前地理位置信息;在预置播放环境与地理位置对照表中包括当前地理位置信息的情况下,确定当前播放环境为第一播放环境;在预置播放环境与地理位置对照表中不包括当前地理位置信息的情况下,确定当前播放环境为第二播放环境。Optionally, the above-mentioned obtaining unit is specifically configured to: obtain the current geographic location information of the terminal; in the case that the preset playback environment and geographic location comparison table includes the current geographic location information, determine the current playback environment as the first playback environment; In the case that the preset playback environment and geographic location comparison table does not include the current geographic location information, it is determined that the current playback environment is the second playback environment.
可选的,上述获取单元,具体用于:获取终端当前连接的当前无线网络名称;在预置网络名称列表中包括当前无线网络名称的情况下,确定当前播放环境为第一播放环境;在预置网络名称列表中不包括所述当前无线网络名称的情况下,确定所述当前播放环境为所述第二播放环境。Optionally, the above obtaining unit is specifically configured to: obtain the current wireless network name currently connected to the terminal; in the case that the current wireless network name is included in the preset network name list, determine that the current playback environment is the first playback environment; In the case that the current wireless network name is not included in the set network name list, it is determined that the current playback environment is the second playback environment.
根据本公开实施例的第三方面,提供一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行上述指令,以实现如第一方面及其任一种可能的设计方式所提供的多媒体文件播放方法。According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the above-mentioned instructions to implement the first aspect and the A multimedia file playback method provided by any of its possible design manners.
根据本公开实施例的第四方面,提供一种可读存储介质,当可读存储介质中的指令被处理器执行时,能够实现如第一方面及其任一种可能的设计方式所提供的多媒体文件播放方法。According to a fourth aspect of the embodiments of the present disclosure, a readable storage medium is provided. When the instructions in the readable storage medium are executed by a processor, the first aspect and any possible design manner thereof can be implemented. Multimedia file playback method.
根据本公开实施例的第五方面,提供一种计算机程序产品,包括计算机程序/指令,计算机程序/指令被处理器执行时实现如第一方面及其任一种可能的设计方式所提供的多媒体文件播放方法。According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including a computer program/instruction, and when the computer program/instruction is executed by a processor, realizes the multimedia provided by the first aspect and any possible design manner thereof File playback method.
本公开提供的技术方案至少带来以下有益效果:首先响应于针对多媒体文件的播放操作,获取终端的当前播放环境,以及终端的播放模式,然后在满足第一预置条件的情况下,将当前播放音量设置为第一音量,第一预置条件为当前播放环境为第一播放环境,且终端的播放模式为外放模式,最后按照当前播放音量,播放多媒体文件。如此,在终端处于第一播放环境,且播放模式为外放模式的情况下,按照第一音量播放多媒体文件,以避免声音过大而干扰周围其他人。The technical solution provided by the present disclosure brings at least the following beneficial effects: first, in response to a playback operation for a multimedia file, the current playback environment of the terminal and the playback mode of the terminal are acquired, and then when the first preset condition is satisfied, the current playback environment is The playback volume is set to the first volume, the first preset condition is that the current playback environment is the first playback environment, and the playback mode of the terminal is the external playback mode, and finally the multimedia file is played according to the current playback volume. In this way, when the terminal is in the first playing environment and the playing mode is the external playing mode, the multimedia file is played according to the first volume, so as to avoid the sound being too loud and disturbing other people around.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。The accompanying drawings, which are incorporated into 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 present disclosure and do not unduly limit the present disclosure.
图1是根据一示例性实施例示出的一种多媒体文件播放方法的流程示意图之一;1 is one of the schematic flowcharts of a method for playing a multimedia file according to an exemplary embodiment;
图2是根据一示例性实施例示出的一种多媒体文件播放方法的流程示意图之二;2 is a second schematic flowchart of a method for playing a multimedia file according to an exemplary embodiment;
图3是根据一示例性实施例示出的一种多媒体文件播放方法的流程示意图之三;3 is a third schematic flowchart of a method for playing a multimedia file according to an exemplary embodiment;
图4是根据一示例性实施例示出的一种多媒体文件播放方法的流程示意图之四;4 is a fourth schematic flowchart of a method for playing a multimedia file according to an exemplary embodiment;
图5是根据一示例性实施例示出的一种多媒体文件播放方法的流程示意图之五;5 is a fifth schematic flowchart of a method for playing a multimedia file according to an exemplary embodiment;
图6是根据一示例性实施例示出的一种多媒体文件播放装置的框图;6 is a block diagram of an apparatus for playing a multimedia file according to an exemplary embodiment;
图7是根据一示例性实施例示出的一种电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the technical solutions of the present disclosure, 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 the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
另外,在本公开实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本公开实施例的描述中,“多个”是指两个或多于两个。In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, "/" means or means, for example, A/B may mean A or B. In this article, "and/or" is only an association relationship to describe the associated objects, which means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone these three situations. In addition, in the description of the embodiments of the present disclosure, "plurality" refers to two or more than two.
多媒体文件是指将影像、声音、图像、文字、文本、动画等多种媒体结合在一起,形成一个有机的整体,能实现一定的功能的文件。多媒体文件可以通过应用程序(如视频播放器)进行播放,在终端安装上述应用程序,然后从终端启动应用程序,并实现播放多媒体文件。上述终端可以是手机、智能手表、摄像机、平板电脑、增强现实(augmented reality,AR)、虚拟现实(virtual reality,VR)等个人智能设备,或者,也可以是笔记本电脑、台式计算机、电视等电子设备,又或者,还可以是其他可以拍摄、显示或存储多媒体文件的电子设备,在此对终端的设备形态不做限制。Multimedia files refer to files that combine images, sounds, images, text, text, animation and other media to form an organic whole that can achieve certain functions. Multimedia files can be played through an application program (such as a video player), the above-mentioned application program is installed on the terminal, and then the application program is started from the terminal, and the multimedia file can be played. The above-mentioned terminal may be a personal smart device such as a mobile phone, a smart watch, a camera, a tablet computer, an augmented reality (AR), a virtual reality (VR), or the like, or an electronic device such as a notebook computer, a desktop computer, and a TV. The device, or alternatively, can also be other electronic devices that can photograph, display or store multimedia files, and the device form of the terminal is not limited herein.
下面结合附图,对本公开实施例提供的多媒体文件播放方法进行描述,下面以执行主体为多媒体文件播放装置为例对该方法进行示例性说明。图1为本公开实施例提供的多媒体文件播放方法的流程示意图。如图1所示,本公开实施例提供的多媒体文件播放方法包括下述步骤101至步骤103。The method for playing a multimedia file provided by the embodiments of the present disclosure will be described below with reference to the accompanying drawings, and the method will be exemplarily described below by taking the execution subject as an apparatus for playing a multimedia file as an example. FIG. 1 is a schematic flowchart of a method for playing a multimedia file provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method for playing a multimedia file provided by an embodiment of the present disclosure includes the following
步骤101、多媒体文件播放装置响应于针对多媒体文件的播放操作,获取终端的当前播放环境,以及终端的播放模式。Step 101: The multimedia file playing apparatus acquires the current playing environment of the terminal and the playing mode of the terminal in response to the playing operation for the multimedia file.
在本公开实施例中,播放操作可以是在某一应用程序中对多媒体文件的播放操作,还可以是直接针对多媒体文件的播放操作。示例性的,对多媒体文件进行双击(播放操作),用于播放多媒体文件。In the embodiment of the present disclosure, the play operation may be a play operation of a multimedia file in a certain application program, or may be a play operation of a multimedia file directly. Exemplarily, the multimedia file is double-clicked (playing operation) to play the multimedia file.
在本公开实施例中,当前播放环境是指终端所处的外部环境,如图书馆、商场、办公室等等。In this embodiment of the present disclosure, the current playback environment refers to an external environment where the terminal is located, such as a library, a shopping mall, an office, and the like.
可选的,在本公开实施例中,多媒体文件播放装置可以通过终端所处的地理位置,判断当前播放环境;还可以通过终端所处的地理位置对应的街景信息,判断当前播放环境。Optionally, in this embodiment of the present disclosure, the multimedia file playback apparatus may determine the current playback environment according to the geographic location of the terminal; and may also determine the current playback environment according to the street view information corresponding to the geographic location of the terminal.
在本公开实施例中,播放模式包括听筒模式和外放模式,听筒模式是指采用耳机方式播放音频,外放模式是指采用喇叭播放音频。In the embodiment of the present disclosure, the playback mode includes an earpiece mode and an external playback mode. The earpiece mode refers to using an earphone to play audio, and the external playback mode refers to using a speaker to play audio.
可选的,在本公开实施例中,多媒体文件播放装置可以采用检测耳机接口方式判断终端的播放模式。Optionally, in the embodiment of the present disclosure, the apparatus for playing a multimedia file may determine the playing mode of the terminal by detecting the headphone interface.
步骤102、多媒体文件播放装置在满足第一预置条件的情况下,将当前播放音量设置为第一音量。Step 102: The multimedia file playback device sets the current playback volume to the first volume when the first preset condition is satisfied.
在本公开实施例中,第一预置条件为当前播放环境为第一播放环境,且终端的播放模式为外放模式,外放模式是指采用喇叭播放音频。In the embodiment of the present disclosure, the first preset condition is that the current playback environment is the first playback environment, and the playback mode of the terminal is the external playback mode, and the external playback mode refers to using a speaker to play audio.
在本公开实施例中,由于播放多媒体文件时,如果终端处于公共场所,则干扰周围其他人的概率较高。因此,第一播放环境可以为公开场所。In the embodiment of the present 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. Therefore, the first playback environment may be a public place.
可选的,在本公开实施例中,由于在实际播放环境中终端还可以满足其他预置条件,本公开实施例提供的多媒体文件播放方法,还包括:在满足第二预置条件的情况下,将当前播放音量设置为第二音量,第二预置条件为:当前播放环境为第一播放环境,且终端的播放模式不为外放模式;在满足第三预置条件的情况下,将当前播放音量设置为第三音量,第三预置条件为:当前播放环境为第二播放环境,且终端的播放模式为外放模式;在满足第四预置条件的情况下,将当前播放音量设置为第四音量,第四预置条件为:当前播放环境为第二播放环境,且终端的播放模式不为外放模式。Optionally, in the embodiment of the present disclosure, since the terminal can also meet other preset conditions in the actual playing environment, the multimedia file playing method provided in the embodiment of the present disclosure further includes: in the case where the second preset condition is met , set the current playback volume to the second volume, and the second preset condition is: the current playback environment is the first playback environment, and the playback mode of the terminal is not the external playback mode; when the third preset condition is satisfied, set the The current playback volume is set to the third volume, and the third preset condition is: the current playback environment is the second playback environment, and the playback mode of the terminal is the external playback mode; when the fourth preset condition is satisfied, the current playback volume The fourth volume is set as the fourth preset condition: the current playback environment is the second playback environment, and the playback mode of the terminal is not the external playback mode.
本公开提供的技术方案至少带来以下有益效果:根据当前播放环境和播放模式的不同情况,具体可以归纳为四个预置条件,即,第一预置条件、第二预置条件、第三预置条件和第四预置条件。在不同的预置条件下,将当前播放音量对应设置为第一音量、第二音量、第三音量和第四音量,以使得在不同的预置条件下都可以设置终端的当前播放音量。The technical solution provided by the present disclosure brings at least the following beneficial effects: according to different situations of the current playback environment and playback mode, it can be specifically classified into four preset conditions, namely, the first preset condition, the second preset condition, the third preset condition Precondition and Fourth Precondition. Under different preset conditions, the current playback volume is correspondingly set to the first volume, the second volume, the third volume and the fourth volume, so that the current playback volume of the terminal can be set under different preset conditions.
可选的,在本公开实施例中,为了确定在不同的预置条件下设置的当前播放音量,本公开实施例提供的多媒体文件播放方法,还包括:将满足第一预置条件的历史使用音量的音量平均值,确定为第一音量;将满足第二预置条件的历史使用音量的音量平均值,确定为第二音量;将满足第三预置条件的历史使用音量的音量平均值,确定为第三音量;将满足第四预置条件的历史使用音量的音量平均值,确定为第四音量。Optionally, in the embodiment of the present disclosure, in order to determine the current playback volume set under different preset conditions, the multimedia file playback method provided by the embodiment of the present disclosure further includes: using a history that satisfies the first preset condition The volume average value of the volume is determined as the first volume; the volume average value of the historically used volume that satisfies the second preset condition is determined to be the second volume; the volume average value of the historically used volume that satisfies the third preset condition, It is determined as the third volume; the volume average value of the historically used volume that satisfies the fourth preset condition is determined as the fourth volume.
在本公开实施例中,历史使用音量是终端播放多媒体文件时使用的播放音量。在存储历史使用音量的同时,还需要记录对应的当前播放环境和播放模式。在确定第一音量、第二音量、第三音量和第四音量的过程中,需要根据第一预置条件、第二预置条件、第三预置条件和第四预置条件,查找满足每种预置条件对应的历史使用音量,具体包括:满足第一预置条件的历史使用音量、满足第二预置条件的历史使用音量、满足第三预置条件的历史使用音量和满足第四预置条件的历史使用音量,然后分别计算满足每种预置条件对应的历史使用音量的音量平均值,得到第一音量、第二音量、第三音量和第四音量。In the embodiment of the present disclosure, the historically used volume is the playback volume used by the terminal when playing the multimedia file. While storing the historical usage volume, it is also necessary to record the corresponding current playback environment and playback mode. In the process of determining the first volume, the second volume, the third volume and the fourth volume, it is necessary to search for the The historical use volume corresponding to a preset condition specifically includes: the historical use volume that satisfies the first preset condition, the historical use volume that satisfies the second preset condition, the historical use volume that satisfies the third preset condition, and the historical use volume that satisfies the fourth preset condition. The historical usage volume of the preset condition is calculated, and then the average volume of the historical usage volume corresponding to each preset condition is calculated respectively to obtain the first volume, the second volume, the third volume and the fourth volume.
本公开提供的技术方案至少带来以下有益效果:根据终端满足的每种预置条件对应的历史使用音量,分别确定对应的第一音量、第二音量、第三音量和第四音量,以使得在终端满足不同预置条件的情况下,采用不同的音量播放多媒体文件,以使得当前播放音量可以适应不同的当前播放环境和播放模式。The technical solution provided by the present disclosure brings at least the following beneficial effects: according to the historical usage volume corresponding to each preset condition satisfied by the terminal, the corresponding first volume, second volume, third volume and fourth volume are respectively determined, so that the corresponding first volume, second volume, third volume and fourth volume are respectively determined so that Under the condition that the terminal satisfies different preset conditions, the multimedia file is played with different volume, so that the current playback volume can adapt to different current playback environments and playback modes.
可选的,在本公开实施例中,由于响应于针对多媒体文件的播放操作,可能持续几十秒、几分钟、十几分钟、甚至几小时,在持续播放多媒体文件的过程中,播放音量可能会发生改变,为了获取准备的播放音量,本公开实施例提供的多媒体文件播放方法,还包括:在接收到针对播放音量的第一音量调整操作,且在预置时间间隔内未接收到第二音量调整操作的情况下,存储调整播放音量;在调整播放音量中,获取满足当前预置条件的历史使用音量,当前预置条件可以为以下任一项:第一预置条件,第二预置条件、第三预置条件和第四预置条件。Optionally, in the embodiment of the present disclosure, since the response to the playback operation for the multimedia file may last for tens of seconds, several minutes, ten minutes, or even several hours, during the continuous playback of the multimedia file, the playback volume may Changes may occur. In order to obtain the prepared playback volume, the multimedia file playback method provided by the embodiment of the present disclosure further includes: when a first volume adjustment operation for playback volume is received, and a second volume adjustment operation is not received within a preset time interval. In the case of a volume adjustment operation, store and adjust the playback volume; in adjusting the playback volume, obtain the historically used volume that satisfies the current preset condition, and the current preset condition can be any of the following: the first preset condition, the second preset condition, the third preset condition and the fourth preset condition.
在本公开实施例中,当接收到第一音量调整操作之后,经过预置时间间隔内,未接收到第二音量调整操作,可以理解为,在响应于第一音量调整操作后的播放音量,符合当前播放环境和播放模式的需求。In the embodiment of the present disclosure, after the first volume adjustment operation is received, within a preset time interval, the second volume adjustment operation is not received. It can be understood that in response to the playback volume after the first volume adjustment operation, Meet the needs of the current playback environment and playback mode.
在本公开实施例中,针对多媒体文件的一次播放操作,在播放过程中终端的当前播放环境和播放模式可能发生变化,由于多媒体文件本身内容的差别可能导致在同样的当前播放音量的情况下,终端输出的音量也可能发生变化,因此,针对多媒体文件的一次播放操作可能会存储多个调整播放音量。In the embodiment of the present disclosure, for a playback operation of a multimedia file, the current playback environment and playback mode of the terminal may change during the playback process. The volume output by the terminal may also change. Therefore, a playback operation for a multimedia file may store multiple adjusted playback volumes.
在本公开实施例中,调整播放音量包括终端的调整播放音量和应用程序的调整播放音量,第一音量调整操作可以调整终端调整播放音量或应用程序调整播放音量,第二音量调整操作可以为调整终端调整播放音量或应用程序调整播放音量。与调整播放音量对应的,历史使用音量和当前播放音量,分别包括终端的历史使用音量、应用程序的历史使用音量、终端的当前播放音量和应用程序的当前播放音量。In this embodiment of the present disclosure, adjusting the playback volume includes adjusting the playback volume of the terminal and adjusting the playback volume of the application. The first volume adjustment operation may adjust the terminal to adjust the playback volume or the application to adjust the playback volume, and the second volume adjustment operation may be to adjust the playback volume. The terminal adjusts the playback volume or the application adjusts the playback volume. Corresponding to adjusting the playback volume, the historical usage volume and the current playback volume respectively include the historical usage volume of the terminal, the historical usage volume of the application, the current playback volume of the terminal, and the current playback volume of the application.
本公开提供的技术方案至少带来以下有益效果:采用在接收到针对播放音量的第一音量调整操作,且在预置时间间隔内未接收到第二音量调整操作的情况下存储调整播放音量,以避免获取到音量调整过程中的使用音量,既能够存储当前预置条件下的历史使用音量,又能够减少存储的调整播放音量的数据量。The technical solution provided by the present disclosure brings at least the following beneficial effects: adopting the method of storing and adjusting the playback volume when the first volume adjustment operation for the playback volume is received and the second volume adjustment operation is not received within a preset time interval, In order to avoid obtaining the used volume during the volume adjustment process, it can not only store the historical used volume under the current preset condition, but also reduce the amount of stored data for adjusting the playback volume.
步骤103、多媒体文件播放装置按照当前播放音量,播放多媒体文件。Step 103: The multimedia file playing device plays the multimedia file 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 solution provided by the present disclosure brings at least the following beneficial effects: first, in response to a playback operation for a multimedia file, the current playback environment of the terminal and the playback mode of the terminal are acquired, and then when the first preset condition is satisfied, the current playback environment is The playback volume is set to the first volume, the first preset condition is that the current playback environment is the first playback environment, and the playback mode of the terminal is the external playback mode, and finally the multimedia file is played according to the current playback volume. In this way, when the terminal is in the first playing environment and the playing mode is the external playing mode, the multimedia file is played according to the first volume, so as to avoid the sound being too loud and disturbing other people around.
可选的,如图2所示,上述步骤103还可以通过步骤201至步骤204实现。Optionally, as shown in FIG. 2 , the foregoing
步骤201、多媒体文件播放装置在调整播放音量中,获取当前时间段对应的平均使用音量。In
步骤202、在平均使用音量小于第一预置音量的情况下,多媒体文件播放装置按照第一预置比例与当前播放音量的乘积得到的音量,播放多媒体文件。Step 202: When the average used volume is less than the first preset volume, the multimedia file playback device plays the multimedia file according to the volume obtained by multiplying the first preset ratio and the current playing volume.
步骤203、在平均使用音量大于第二预置音量的情况下,多媒体文件播放装置按照第二预置比例与当前播放音量的乘积得到的音量,播放多媒体文件。Step 203: When the average used volume is greater than the second preset volume, the multimedia file playback device plays the multimedia file according to the volume obtained by multiplying the second preset ratio and the current playing volume.
步骤204、在平均使用音量大于或等于第一预置音量,且,平均使用音量小于或等于第二预置音量的情况下,多媒体文件播放装置按照当前播放音量,播放多媒体文件。Step 204: When the average used volume is greater than or equal to the first preset volume, and the average used volume is less than or equal to the second preset volume, the multimedia file playback device plays the multimedia file according to the current playback volume.
在本公开实施例中,当前时间段为播放操作的接收时间对应的时间段。时间段可以分为睡眠时间段(22点-5点),起床时间段(5点-7点)通勤时间段(7点-9点,18点-19点),工作时间段(8点-12点),午休时间段(12点-13点)等等。In the embodiment of the present disclosure, the current time period is the time period corresponding to the reception time of the playback operation. The time period can be divided into sleep time period (22:00-5:00), wake-up time period (5:00-7:00), commuting time period (7:00-9:00, 18:00-19:00), working time period (8:00- 12:00), lunch break (12:00-13:00), etc.
在本公开实施例中,时间段可以用于区分用户个性化的使用需求,例如,在早晨5点到7点,该终端对应的用户处于居家环境,在一般情况下家庭成员处于休息中,那么将当前播放声音针对该时段的播放声音进行调整,以减少播放多媒体文件对其他家庭成员的影响。In the embodiment of the present disclosure, the time period can be used to distinguish the user's personalized usage requirements. For example, from 5:00 to 7:00 in the morning, the user corresponding to the terminal is in a home environment, and in general, family members are resting, then The currently playing sound is adjusted according to the playing sound in this period, so as to reduce the influence of playing the multimedia file on other family members.
示例性的,假设第一预置音量为可播放音量最大值的10%,那么可以在当播放音量的基础上,将第一预置比例设置为90%,进一步降低当前播放音量,采用更小的声音播放多媒体文件。Exemplarily, assuming that the first preset volume is 10% of the maximum playable volume, then on the basis of the current playback volume, the first preset ratio can be set to 90% to further reduce the current playback volume, and use a smaller volume. sound to play multimedia files.
示例性的,假设第二预置音量为可播放音量最大值的20%,那么可以在当播放音量的基础上,将第二预置比例设置为120%,进一步提高当前播放音量,采用更大的声音播放多媒体文件。Exemplarily, assuming that the second preset volume is 20% of the maximum playable volume, then on the basis of the current playback volume, the second preset ratio can be set to 120% to further increase the current playback volume, and use a higher volume. sound to play multimedia files.
在本公开实施例中,第一预置音量与第二预置音量可以相同。In this embodiment of the present disclosure, the first preset volume and the second preset volume may be the same.
本公开提供的技术方案至少带来以下有益效果:通过当前时间段再次调整多媒体文件的播放音量,即,根据时间、当前播放环境和播放模式三种参数,确定播放多媒体文件的播放音量,以确保播放多媒体文件采用的播放音量,不干扰周围其他人。The technical solution provided by the present disclosure brings at least the following beneficial effects: adjusting the playback volume of the multimedia file again through the current time period, that is, determining the playback volume of the multimedia file according to the three parameters of time, current playback environment and playback mode to ensure The playback volume used to play multimedia files without disturbing others around.
可选的,如图3所示,上述步骤101中的获取终端的播放模式还可以通过步骤301和步骤302实现。Optionally, as shown in FIG. 3 , the obtaining of the playing mode of the terminal in the foregoing
步骤301、在终端与耳机连接的情况下,多媒体文件播放装置确定终端的播放模式为听筒模式。
步骤302、在终端不与耳机连接的情况下,多媒体文件播放装置确定终端的播放模式为外放模式。Step 302: In the case that the terminal is not connected to the earphone, the apparatus for playing multimedia files determines that the playing mode of the terminal is the external playing mode.
本公开提供的技术方案至少带来以下有益效果:通过检测终端是否与耳机连接的方式确定终端的播放模式,能够提高确定的播放模式的准确性。The technical solution provided by the present disclosure brings at least the following beneficial effects: determining the play mode of the terminal by detecting whether the terminal is connected to the earphone can improve the accuracy of the determined play mode.
可选的,如图4所示,上述步骤101中的获取终端的当前播放环境还可以通过步骤401至步骤403实现。Optionally, as shown in FIG. 4 , obtaining the current playback environment of the terminal in the foregoing
步骤401、多媒体文件播放装置获取终端的当前地理位置信息。Step 401: The apparatus for playing a multimedia file acquires the current geographic location information of the terminal.
步骤402、在预置播放环境与地理位置对照表中包括当前地理位置信息的情况下,多媒体文件播放装置确定当前播放环境为第一播放环境。Step 402: In the case that the preset playback environment and geographic location comparison table includes the current geographic location information, the multimedia file playback apparatus determines that the current playback environment is the first playback environment.
步骤403、在预置播放环境与地理位置对照表中不包括当前地理位置信息的情况下,多媒体文件播放装置确定当前播放环境为第二播放环境。Step 403: In the case that the preset playback environment and geographic location comparison table does not include the current geographic location information, the multimedia file playback apparatus determines that the current playback environment is the second playback environment.
在本公开实施例中,预置播放环境与地理位置对照表,可以是预先设置的,可以有用户根据实际的播放环境设置的。当前地理位置信息可以包括经纬度信息。In the embodiment of the present disclosure, the preset playback environment and geographic location comparison table may be preset, or may be set by the user according to the actual playback environment. The current geographic location information may include longitude and latitude information.
示例性的,第一播放环境为公共场合,第二播放环境为私人场合。Exemplarily, the first playing environment is a public place, and the second playing environment is a private place.
本公开提供的技术方案至少带来以下有益效果:通过预置播放环境与地理位置对照表中是否包括当前地理位置信息,确定当前播放环境,以便于提高当前播放环境与终端实际所处环境相同的概率。The technical solution provided by the present disclosure brings at least the following beneficial effects: determining the current playback environment by determining whether the current location information is included in the preset playback environment and geographic location comparison table, so as to improve the consistency between the current playback environment and the actual environment of the terminal. probability.
可选的,如图5所示,上述步骤101中的获取终端的当前播放环境还可以通过步骤501至步骤503实现。Optionally, as shown in FIG. 5 , the obtaining of the current playing environment of the terminal in the foregoing
步骤501、多媒体文件播放装置获取终端当前连接的当前无线网络名称。Step 501: The multimedia file playing apparatus obtains the current wireless network name to which the terminal is currently connected.
步骤502、在预置网络名称列表中包括当前无线网络名称的情况下,多媒体文件播放装置确定当前播放环境为第一播放环境。Step 502: In the case that the current wireless network name is included in the preset network name list, the multimedia file playback apparatus determines that the current playback environment is the first playback environment.
步骤503、在预置网络名称列表中不包括当前无线网络名称的情况下,多媒体文件播放装置确定当前播放环境为第二播放环境。Step 503: In the case that the current wireless network name is not included in the preset network name list, the multimedia file playback apparatus determines that the current playback environment is the second playback environment.
在本公开实施例中,预置网络名称列表,可以是预先设置的,可以有用户根据实际的网络使用环境设置的。In this embodiment of the present disclosure, the preset network name list may be preset, or may be set by a user according to an actual network usage environment.
本公开提供的技术方案至少带来以下有益效果:通过预置网络名称列表中是否包括当前地理位置信息,确定当前播放环境,以便于提高当前播放环境与终端实际所处环境相同的概率。The technical solution provided by the present disclosure brings at least the following beneficial effects: determining the current playback environment by presetting whether the current geographical location information is included in the network name list, so as to improve the probability that the current playback environment is the same as the actual environment of the terminal.
上述主要从方法的角度对本公开实施例的方案进行了介绍。可以理解的是,多媒体文件播放装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和软件模块中的至少一个。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本公开能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。The solutions of the embodiments of the present disclosure have been described above mainly from the perspective of methods. It can be understood that, in order to realize the above functions, the apparatus for playing a multimedia file includes at least one of a hardware structure and a software module corresponding to each function. Those skilled in the art should easily realize that the present disclosure can be implemented in hardware or a combination of hardware and computer software in conjunction with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this disclosure.
本公开实施例可以根据上述方法示例对多媒体文件播放装置进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本公开实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present disclosure can divide the functional units of the multimedia file playback device according to the above method examples. For example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present disclosure is schematic, and is only a logical function division, and other division methods may be used in actual implementation.
图6是根据一示例性实施例示出的一种多媒体文件播放装置的结构示意图。参照图6所示,本公开实施例提供的多媒体文件播放装置,应用于终端,包括获取单元61、设置单元62以及播放单元63;FIG. 6 is a schematic structural diagram of an apparatus for playing a multimedia file according to an exemplary embodiment. Referring to FIG. 6 , the apparatus for playing a multimedia file provided by an embodiment of the present disclosure, applied to a terminal, includes an obtaining
获取单元61,用于响应于针对多媒体文件的播放操作,获取终端的当前播放环境,以及终端的播放模式;例如,如图1所示,获取单元61可以用于执行步骤101。The obtaining
设置单元62,用于在满足第一预置条件的情况下,将当前播放音量设置为第一音量,第一预置条件为获取单元61获取的当前播放环境为第一播放环境,且终端的播放模式为外放模式,外放模式是指采用喇叭播放音频;例如,如图1所示,设置单元61可以用于执行步骤102。The setting
播放单元63,用于按照设置单元62设置的当前播放音量,播放多媒体文件。例如,如图1所示,播放单元63可以用于执行步骤103。The playing
可选的,如图6所示,上述多媒体文件播放装置还包括:Optionally, as shown in Figure 6, the above-mentioned multimedia file playback device also includes:
设置单元62,还用于播放单元63按照当前播放音量,播放多媒体文件之前,在满足第二预置条件的情况下,将当前播放音量设置为第二音量,第二预置条件为:当前播放环境为第一播放环境,且终端的播放模式不为外放模式;The setting
设置单元62,还用于播放单元63按照当前播放音量,播放多媒体文件之前,在满足第三预置条件的情况下,将当前播放音量设置为第三音量,第三预置条件为:当前播放环境为第二播放环境,且终端的播放模式为外放模式;The setting
设置单元62,还用于播放单元63按照当前播放音量,播放多媒体文件之前,在满足第四预置条件的情况下,将当前播放音量设置为第四音量,第四预置条件为:当前播放环境为第二播放环境,且终端的播放模式不为外放模式。The setting
可选的,如图6所示,上述多媒体文件播放装置还包括:确定单元64;Optionally, as shown in FIG. 6 , the above-mentioned multimedia file playing device further includes: a determining
确定单元64,用于播放单元63按照当前播放音量,播放多媒体文件之前,将满足第一预置条件的历史使用音量的音量平均值,确定为第一音量;Determining
确定单元64,还用于播放单元63按照当前播放音量,播放多媒体文件之前,将满足第二预置条件的历史使用音量的音量平均值,确定为第二音量;The
确定单元64,还用于播放单元63按照当前播放音量,播放多媒体文件之前,将满足第三预置条件的历史使用音量的音量平均值,确定为第三音量;The
确定单元64,还用于播放单元63按照当前播放音量,播放多媒体文件之前,将满足第四预置条件的历史使用音量的音量平均值,确定为第四音量。The determining
可选的,如图6所示,上述多媒体文件播放装置还包括:存储单元65;Optionally, as shown in FIG. 6 , the above-mentioned multimedia file playback device further includes: a
存储单元65,用于播放单元63按照当前播放音量,播放多媒体文件之前,在接收到针对播放音量的第一音量调整操作,且在预置时间间隔内未接收到第二音量调整操作的情况下,存储调整播放音量;The
获取单元61,还用于在存储单元65存储的调整播放音量中,获取满足当前预置条件的历史使用音量,当前预置条件可以为以下任一项:第一预置条件,第二预置条件、第三预置条件和第四预置条件。The obtaining
可选的,如图6所示,上述播放单元63,具体用于:在调整播放音量中,获取当前时间段对应的平均使用音量,当前时间段为播放操作的接收时间对应的时间段;在平均使用音量小于第一预置音量的情况下,按照第一预置比例与当前播放音量的乘积得到的音量,播放多媒体文件;在平均使用音量大于第二预置音量的情况下,按照第二预置比例与当前播放音量的乘积得到的音量,播放多媒体文件;在平均使用音量大于或等于第一预置音量,且,平均使用音量小于或等于第二预置音量的情况下,按照当前播放音量,播放多媒体文件。例如,如图2所示,播放单元63可以用于执行步骤201至步骤204。Optionally, as shown in FIG. 6 , the above-mentioned
可选的,如图6所示,上述获取单元61,具体用于:在终端与耳机连接的情况下,确定终端的播放模式为听筒模式;在终端不与耳机连接的情况下,确定终端的播放模式为外放模式。例如,如图3所示,获取单元61可以用于执行步骤301至步骤302。Optionally, as shown in FIG. 6 , the above obtaining
可选的,如图6所示,上述获取单元61,具体用于:获取终端的当前地理位置信息;在预置播放环境与地理位置对照表中包括当前地理位置信息的情况下,确定当前播放环境为第一播放环境;在预置播放环境与地理位置对照表中不包括当前地理位置信息的情况下,确定当前播放环境为第二播放环境。例如,如图4所示,获取单元61可以用于执行步骤401至步骤403。Optionally, as shown in FIG. 6 , the above-mentioned obtaining
可选的,如图6所示,上述获取单元61,具体用于:获取终端当前连接的当前无线网络名称;在预置网络名称列表中包括当前无线网络名称的情况下,确定当前播放环境为第一播放环境;在预置网络名称列表中不包括所述当前无线网络名称的情况下,确定所述当前播放环境为所述第二播放环境。例如,如图5所示,获取单元61可以用于执行步骤501至步骤503。Optionally, as shown in FIG. 6, the above-mentioned obtaining
关于上述实施例中的装置,其中各个单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be described in detail here.
图7是本公开提供的一种电子设备的结构示意图。如图7,该电子设备可以包括处理器71、用于存储处理器71可执行指令的存储器72;其中,上述处理器71被配置为执行上述指令,以实现上述实施例中的多媒体文件播放方法。FIG. 7 is a schematic structural diagram of an electronic device provided by the present disclosure. As shown in FIG. 7 , the electronic device may include a
另外,电子设备还可以包括通信总线73以及至少一个通信接口74。In addition, the electronic device may also include a
处理器71可以是一个中央处理器(central processing units,CPU),微处理单元,专用集成电路(Application Specific Integrated Circuit,ASIC),或一个或多个用于控制本公开方案程序执行的集成电路。The
通信总线73为信号通路,用于在上述组件之间传送信息。The
通信接口74,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local areanetworks,WLAN)等。The
存储器72可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electricallyerasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器72可以是独立存在,通过通信总线74与处理器71相连接。存储器72也可以和处理器71集成在一起。The
其中,存储器72用于存储执行本公开方案的指令,并由处理器71来控制执行。处理器71用于执行存储器72中存储的程序或指令,从而实现本公开方法中的功能。The
作为一个示例,结合图6,多媒体文件播放装置中的获取单元61、设置单元62以及播放单元63实现的功能与图7中的处理器71的功能相同。As an example, referring to FIG. 6 , the functions implemented by the acquiring
在具体实现中,作为一种实施例,处理器71可以包括一个或多个CPU,例如图7中的CPU0和CPU1。In a specific implementation, as an embodiment, the
在具体实现中,作为一种实施例,电子设备可以包括多个处理器71,这些处理器71中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器71可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the electronic device may include
在具体实现中,作为一种实施例,电子设备还可以包括输出设备75和输入设备76。输出设备75和处理器71通信,可以以多种方式来显示信息。例如,输出设备75可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备76和处理器71通信,可以以多种方式接受用户的输入。例如,输入设备76可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the electronic device may further include an
本领域技术人员可以理解,图7中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。图7中的电子设备可以是服务器,也可以是客户端或其他设备。Those skilled in the art can understand that the structure shown in FIG. 7 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or adopt different component arrangements. The electronic device in FIG. 7 may be a server, a client or other devices.
另外,本公开还提供一种可读存储介质,可读存储介质上存储程序或指令,当上述可读存储介质中的指令被处理器执行时,使得电子设备能够执行如上述实施例所提供的多媒体文件播放方法。可选的,可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In addition, the present disclosure also provides a readable storage medium on which programs or instructions are stored, and when the instructions in the readable storage medium are executed by a processor, the electronic device can perform the operations provided by the above embodiments. Multimedia file playback method. Alternatively, the readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
另外,本公开还提供一种计算机程序产品,包括计算机程序/指令,该计算机程序产品被存储在非易失的可读存储介质中,计算机程序产品被至少一个处理器执行时,使得电子设备执行如上述实施例所提供的多媒体文件播放方法。In addition, the present disclosure also provides a computer program product, including computer programs/instructions, the computer program product is stored in a non-volatile readable storage medium, and when the computer program product is executed by at least one processor, causes the electronic device to execute The multimedia file playing method provided by the above embodiments.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common general knowledge or techniques in the technical field not disclosed by this disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying 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)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210153479.7A CN114564169A (en) | 2022-02-18 | 2022-02-18 | Multimedia file playback method, device, electronic device 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 playback method, device, electronic device 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 playback method, device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114564169A (en) |
Citations (9)
| 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 |
-
2022
- 2022-02-18 CN CN202210153479.7A patent/CN114564169A/en active Pending
Patent Citations (9)
| 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 |
|---|---|---|
| US10966044B2 (en) | System and method for playing media | |
| US10833886B2 (en) | Optimal device selection for streaming content | |
| US9544346B1 (en) | Systems and methods for selecting a node for media streaming | |
| US11080002B2 (en) | Methods and systems for personalizing user experience based on use of service | |
| US11843814B2 (en) | Bitrate optimizations for immersive multimedia streaming | |
| US12047767B2 (en) | Spatial augmentation | |
| US12034994B2 (en) | Remotely controlling playback devices | |
| CN110100460B (en) | Method, system and medium for generating a sound field | |
| US10993274B2 (en) | Pairing devices by proxy | |
| US9112917B2 (en) | Controller system and method therefor | |
| US10565158B2 (en) | Multi-device synchronization for immersive experiences | |
| CN114040319B (en) | Method, device, equipment and medium for optimizing playback quality of terminal equipment | |
| EP3412020B1 (en) | Electronic device and content reproduction method controlled by the electronic device | |
| CN114564169A (en) | Multimedia file playback method, device, electronic device and storage medium | |
| US20210097966A1 (en) | Systems and methods for embedding data in media content | |
| CA3104369A1 (en) | Method and apparatus for modifying output characteristics of proximate devices | |
| CN115486096B (en) | Method and apparatus for loudness adjustment of audio scenes associated with MPEG-I immersive audio streams | |
| US20220060797A1 (en) | Method and apparatus for modifying output characteristics of proximate devices | |
| US11006183B2 (en) | Method and apparatus for modifying output characteristics of proximate devices | |
| WO2021258608A1 (en) | Bandwidth determination method and apparatus, and terminal, and storage medium | |
| TWI870233B (en) | Online conference system, online conference control method, terminal device and electronic device, readable medium | |
| KR101810233B1 (en) | User terminal and operation method thereof | |
| CN116204152A (en) | Control method, device, terminal and storage medium | |
| HK40094188A (en) | Dynamic user-device upscaling of media streams | |
| CN113452839A (en) | Automatic volume adjustment method, apparatus, medium, and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220531 |