



技术领域technical field
本发明实施例涉及音视频技术领域,尤其涉及一种音视频的播放控制方法、装置及终端。Embodiments of the present invention relate to the technical field of audio and video, and in particular, to a method, device, and terminal for controlling audio and video playback.
背景技术Background technique
声音信息是人类与外界进行沟通的重要信息,音视频数据作为声音信息的载体已成为最常见的数据类型之一。目前,多数终端都支持音频和/或视频播放功能,为终端用户收听或观看音视频提供了极大的便利。Sound information is an important information for human beings to communicate with the outside world. As the carrier of sound information, audio and video data has become one of the most common data types. At present, most terminals support audio and/or video playback functions, which provides great convenience for terminal users to listen or watch audio and video.
目前,终端一般允许用户对音视频的播放进行控制,如调节音量、暂停播放、快进以及切换至其他音视频等播放控制操作。上述播放控制操作通常是在音视频播放过程中进行的,因此,如何协调好播放控制操作与音视频播放之间的工作关系成为音视频播放控制中的重要技术难题。Currently, terminals generally allow users to control the playback of audio and video, such as adjusting the volume, pausing playback, fast-forwarding, and switching to other audio and video playback control operations. The above playback control operations are usually performed during the audio and video playback process. Therefore, how to coordinate the working relationship between the playback control operations and the audio and video playback becomes an important technical problem in the audio and video playback control.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种音视频的播放控制方法、装置及终端,可以合理控制音视频的播放。Embodiments of the present invention provide an audio and video playback control method, device, and terminal, which can reasonably control audio and video playback.
第一方面,本发明实施例提供了一种音视频的播放控制方法,包括:In a first aspect, an embodiment of the present invention provides a method for controlling playback of audio and video, including:
在音视频的播放过程中监听音量调节操作;Monitor the volume adjustment operation during the playback of audio and video;
在监听到第一音量调节操作时,记录所述第一音量调节操作开始执行的第一时刻对应的第一播放位置;When monitoring the first volume adjustment operation, record the first playback position corresponding to the first moment when the first volume adjustment operation starts to be performed;
确定目标播放位置,其中,所述目标播放位置位于所述第一播放位置之前;determining a target playback position, wherein the target playback position is located before the first playback position;
在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频。The audio and video are continued to be played from the target playback position at the second moment after the first volume adjustment operation is completed.
第二方面,本发明实施例提供了一种音视频的播放控制装置,包括:In a second aspect, an embodiment of the present invention provides an audio and video playback control device, including:
操作监听模块,用于在音视频的播放过程中监听音量调节操作;The operation monitoring module is used to monitor the volume adjustment operation during the playback of audio and video;
位置记录模块,用于在监听到第一音量调节操作时,记录所述第一音量调节操作开始执行的第一时刻对应的第一播放位置;a position recording module, configured to record the first playback position corresponding to the first moment when the first volume adjustment operation starts to be performed when the first volume adjustment operation is monitored;
位置确定模块,用于确定目标播放位置,其中,所述目标播放位置位于所述第一播放位置之前;a position determination module for determining a target playback position, wherein the target playback position is located before the first playback position;
播放控制模块,用于在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频。The playback control module is configured to continue playing the audio and video from the target playback position at the second moment after the first volume adjustment operation is completed.
第三方面,本发明实施例提供了一种终端,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, an embodiment of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and executed by the processor, wherein the processor implements the following when executing the computer program step:
在音视频的播放过程中监听音量调节操作;Monitor the volume adjustment operation during the playback of audio and video;
在监听到第一音量调节操作时,记录所述第一音量调节操作开始执行的第一时刻对应的第一播放位置;When monitoring the first volume adjustment operation, record the first playback position corresponding to the first moment when the first volume adjustment operation starts to be performed;
确定目标播放位置,其中,所述目标播放位置位于所述第一播放位置之前;determining a target playback position, wherein the target playback position is located before the first playback position;
在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频。The audio and video are continued to be played from the target playback position at the second moment after the first volume adjustment operation is completed.
本发明实施例中提供的音视频的播放控制方案,在音视频的播放过程中监听到第一音量调节操作时,记录第一音量调节操作开始执行的第一时刻对应的第一播放位置,确定位于第一播放位置之前的目标播放位置,并在第一音量调节操作执行完毕的第二时刻开始从目标播放位置继续播放音视频。通过采用上述技术方案,在音视频的播放音量发生变化时,自动回放音量变化前的一段时间的音视频数据,可以合理地控制音视频的播放。In the audio and video playback control solution provided in the embodiment of the present invention, when the first volume adjustment operation is monitored during the audio and video playback process, the first playback position corresponding to the first moment when the first volume adjustment operation is started is recorded, and the determination is made. The target playback position is located before the first playback position, and the audio and video are continued to be played from the target playback position at the second moment after the first volume adjustment operation is completed. By adopting the above technical solution, when the playback volume of the audio and video changes, the audio and video data for a period of time before the volume change is automatically played back, so that the playback of the audio and video can be reasonably controlled.
附图说明Description of drawings
图1为本发明实施例提供的一种音视频的播放控制方法的流程示意图;1 is a schematic flowchart of a method for controlling playback of audio and video according to an embodiment of the present invention;
图2为本发明实施例提供的另一种音视频的播放控制方法的流程示意图;2 is a schematic flowchart of another audio and video playback control method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种音视频的播放控制装置的结构框图;3 is a structural block diagram of an audio and video playback control device provided by an embodiment of the present invention;
图4为本发明实施例提供的一种终端的结构示意图。FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图并通过具体实施方式来进一步说明本发明的技术方案。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The technical solutions of the present invention are further described below with reference to the accompanying drawings and through specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in greater detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart depicts the steps as a sequential process, many of the steps may be performed in parallel, concurrently, or concurrently. Furthermore, the order of the steps can be rearranged. The process may be terminated when its operation is complete, but may also have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, subroutines, and the like.
图1为本发明实施例提供的一种音视频的播放控制方法的流程示意图,该方法可以由音视频的播放控制装置执行,其中该装置可由软件和/或硬件实现,一般可集成在终端中。如图1所示,该方法包括:1 is a schematic flowchart of an audio and video playback control method provided by an embodiment of the present invention. The method can be executed by an audio and video playback control device, wherein the device can be implemented by software and/or hardware, and can generally be integrated in a terminal. . As shown in Figure 1, the method includes:
步骤101、在音视频的播放过程中监听音量调节操作。Step 101: Monitor the volume adjustment operation during the audio and video playback process.
示例性的,本实施例中的终端可为手机、智能手表、平板电脑以及个人数字助理等移动终端;也可为台式计算机等其他终端。音视频可包括音频和视频,音频可以是歌曲、录音、有声读物、广播以及即时通信中的语音等;视频可以是电影、录像以及即时通信中的短视频等。其中,即时通信可包括微信、QQ及陌陌等社交类即时通信应用程序。本实施例中的音视频可以是存储在终端本地的音视频文件,也可以是在线播放的流媒体数据,本实施例不做限定。Exemplarily, the terminal in this embodiment may be a mobile terminal such as a mobile phone, a smart watch, a tablet computer, and a personal digital assistant; it may also be other terminals such as a desktop computer. Audio and video may include audio and video. Audio may be songs, recordings, audiobooks, broadcasts, and voice in instant messaging. Video may be movies, videos, and short videos in instant messaging. Among them, instant messaging may include social instant messaging applications such as WeChat, QQ, and Momo. The audio and video in this embodiment may be audio and video files stored locally on the terminal, or may be streaming media data played online, which is not limited in this embodiment.
示例性的,音量调节操作可包括音量增大操作和音量减小操作。用户在音视频的播放过程中可通过音量控制按键或音量控制条来实现对音量的调节。例如,当用户想要提高音量时,可按下音量“+”键,也可在触摸屏上显示的音量控制条上将代表音量的圆点或其它形状的图标(记为音量标识)向音量增大的方向拖动。Exemplarily, the volume adjustment operation may include a volume increase operation and a volume decrease operation. The user can adjust the volume through the volume control button or the volume control bar during the playback of the audio and video. For example, when the user wants to increase the volume, he can press the volume "+" key, or he can place a dot or other shaped icon (marked as a volume mark) representing the volume on the volume control bar displayed on the touch screen to increase the volume. Drag in a large direction.
示例性的,当用户在终端上进行音量调节操作时,终端能够检测到音量控制按键被按压或者音量控制条被拖动,进而在音视频的播放过程中实现监听音量调节操作。Exemplarily, when the user performs a volume adjustment operation on the terminal, the terminal can detect that the volume control button is pressed or the volume control bar is dragged, and then the monitoring volume adjustment operation is implemented during the audio and video playback process.
步骤102、在监听到第一音量调节操作时,记录所述第一音量调节操作开始执行的第一时刻对应的第一播放位置。Step 102: When the first volume adjustment operation is monitored, record the first playback position corresponding to the first moment when the first volume adjustment operation starts to be performed.
示例性的,第一音量调节操作开始执行的第一时刻可理解为第一音量调节操作被触发的时刻。例如,当通过音量控制按键进行音量调节时,可将音量控制按键被按下的时刻记为第一时刻;又如,当通过音量控制条进行音量调节时,可将音量标识被触摸的时刻记为第一时刻。播放位置可理解为音视频的播放进度,例如,在2点05分00秒时,音视频播放到其播放进度的15秒的时候音量控制按键被按下,则第一时刻为2点05分00秒,第一播放位置为15秒。Exemplarily, the first moment when the first volume adjustment operation starts to be performed may be understood as the moment when the first volume adjustment operation is triggered. For example, when the volume control button is used to adjust the volume, the moment when the volume control button is pressed can be recorded as the first moment; for another example, when the volume control bar is used to adjust the volume, the moment when the volume logo is touched can be recorded as the first moment. for the first moment. The playback position can be understood as the playback progress of the audio and video. For example, at 2:05:00, the volume control button is pressed when the audio and video is played to 15 seconds of its playback progress, then the first moment is 2:05. 00 seconds, the first playback position is 15 seconds.
步骤103、确定目标播放位置。Step 103: Determine the target playback position.
其中,所述目标播放位置位于所述第一播放位置之前。Wherein, the target playback position is located before the first playback position.
确定目标播放位置的方式可以有很多种,本实施例不做限定,以下几种方式可作为示意性说明。There may be many manners for determining the target playback position, which is not limited in this embodiment, and the following manners may be used as schematic descriptions.
示例性的,可对第一播放位置所属目标语句进行检测,将检测到的目标语句的起始播放位置确定为目标播放位置,例如,用户播放微信中的一段语音,在播放到“你什么时候从家里出来的?”中的“候”时,音量控制按键被按下,记录第一播放位置,则第一播放位置所属的目标语句为“你什么时候从家里出来的?”,将即将开始播放“你”的位置确定为目标播放位置。Exemplarily, the target sentence to which the first playback position belongs can be detected, and the starting playback position of the detected target sentence can be determined as the target playback position. Came out of home?", the volume control button is pressed, the first playback position is recorded, and the target sentence to which the first playback position belongs is "When did you come out from home?", which will start soon. The position where "you" is played is determined as the target playback position.
示例性的,可根据第一播放位置和第一预设时长确定目标播放位置。这样设置的好处在于,可合理确定目标播放位置,并节约算法,提高确定目标播放位置的速度。第一预设时长可以是预先设定好的固定时长,例如3秒或5秒,具体数值可根据调研等方式确定,也可由用户自行设定。可在第一播放位置基础上减去第一预设时长,进而确定目标播放位置,例如第一播放位置为15秒,第一预设时长为5秒,那么目标播放位置为10秒。Exemplarily, the target playback position may be determined according to the first playback position and the first preset duration. The advantage of this setting is that the target playback position can be reasonably determined, the algorithm can be saved, and the speed of determining the target playback position can be improved. The first preset duration may be a preset fixed duration, such as 3 seconds or 5 seconds, and the specific value may be determined according to methods such as research, or may be set by the user. The target playback position may be determined by subtracting the first preset duration from the first playback position. For example, if the first playback position is 15 seconds and the first preset duration is 5 seconds, then the target playback position is 10 seconds.
优选的,可先判断所述第一播放位置距离所述音视频的起始位置的时间间隔是否大于第一预设时长;若大于,则在所述第一播放位置基础上减去所述第一预设时长,得到第二播放位置,并将所述第二播放位置确定为目标播放位置;若小于或等于,则将所述音视频的起始位置确定为目标播放位置。这样设置的好处在于,充分考虑了音视频的播放进度,当音视频刚开始播放时,用户就调节了音量,可自动重新按照调节后的音量播放音视频,避免用户手动重新播放,使终端对音视频播放的控制更加合理,提高重新播放的响应速度。Preferably, it is possible to first determine whether the time interval between the first playback position and the start position of the audio and video is greater than a first preset duration; if it is greater, subtract the first playback position from the first playback position. With a preset duration, the second playback position is obtained, and the second playback position is determined as the target playback position; if it is less than or equal to, the start position of the audio and video is determined as the target playback position. The advantage of this setting is that the playback progress of the audio and video is fully considered. When the audio and video just starts to play, the user adjusts the volume, and the audio and video can be automatically replayed according to the adjusted volume, avoiding the user's manual replay and making the terminal The control of audio and video playback is more reasonable, and the response speed of replay is improved.
可选的,根据第一播放位置和第一预设时长确定目标播放位置,可进一步优化为:获取音量调节信息,根据音量调节信息和第一预设时长确定目标时长,根据第一播放位置和目标时长确定目标播放位置。其中,第一预设时长可与前文描述一致,音量调节信息可包括音量调节幅度。根据音量调节信息和第一预设时长确定目标时长可以是:根据音量调节信息和第一预设时长的乘积确定目标时长。例如,调节前的音量为20%,调节后的音量为50%,则音量调节幅度为30%,第一预设时长为20秒,那么目标时长为6秒。这样设置的好处在于,可根据音量调节的具体情况动态确定目标播放位置,使目标播放位置的确定更加合理,更加符合实际需求。当音量调节幅度较大时,可说明在音量调节前,音量距离用户需求相差较多,所以可相应延长回放时长,更加贴合用户需求,降低用户二次调整的概率,提高播放效率。Optionally, determining the target playback position according to the first playback position and the first preset duration may be further optimized as follows: acquiring volume adjustment information, determining the target duration according to the volume adjustment information and the first preset duration, and determining the target duration according to the first playback position and the first preset duration. The target duration determines the target playback position. The first preset duration may be consistent with the foregoing description, and the volume adjustment information may include a volume adjustment range. Determining the target duration according to the volume adjustment information and the first preset duration may be: determining the target duration according to the product of the volume adjustment information and the first preset duration. For example, if the volume before adjustment is 20% and the volume after adjustment is 50%, the volume adjustment range is 30%, and the first preset duration is 20 seconds, then the target duration is 6 seconds. The advantage of this setting is that the target playback position can be dynamically determined according to the specific conditions of volume adjustment, so that the determination of the target playback position is more reasonable and more in line with actual needs. When the volume adjustment range is large, it means that before the volume adjustment, the volume is far from the user's demand, so the playback time can be extended accordingly, which is more suitable for the user's demand, reduces the probability of the user's second adjustment, and improves the playback efficiency.
步骤104、在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频。Step 104: Continue to play the audio and video from the target playback position at the second moment after the first volume adjustment operation is completed.
示例性的,第一音量调节操作执行完毕的第二时刻可理解为音量调节操作完成的时刻。例如,当通过音量控制按键进行音量调节时,可将音量控制按键被松开的时刻记为第二时刻;又如,当通过音量控制条进行音量调节时,可将音量标识被释放的时刻(或用户手指离开触摸屏的时刻)记为第二时刻。例如,在2点05分00秒(第一时刻)时,音视频播放到15秒的时候音量控制按键被按下,在2点05分02秒(第二时刻)时音量控制按键被释放,第一播放位置为15秒,第一预设时长为5秒,所确定的目标播放位置为10秒,则在2点05分02秒开始从音视频的10秒处继续播放该音视频。Exemplarily, the second moment when the first volume adjustment operation is completed may be understood as the moment when the volume adjustment operation is completed. For example, when the volume control button is used to adjust the volume, the moment when the volume control button is released can be recorded as the second moment; for another example, when the volume control bar is used to adjust the volume, the moment when the volume is released ( or the moment when the user's finger leaves the touch screen) is recorded as the second moment. For example, at 2:05:00 (the first moment), the volume control button is pressed when the audio and video are played for 15 seconds, and the volume control button is released at 2:05:02 (the second moment). If the first playback position is 15 seconds, the first preset duration is 5 seconds, and the determined target playback position is 10 seconds, the audio and video will continue to be played at 10 seconds from the audio and video at 2:05:02.
示例性的,第一播放位置与目标播放位置之间的音视频数据可以是原音视频数据也可以是缓存数据。若为缓存数据,则在播放音视频的过程中,可缓存当前播放位置之前预设播放时长内的音视频数据,待从第二时刻开始播放完缓存数据之后,则继续播放目标播放位置之后的原音视频数据。预设播放时长可根据实际需求确定,优选可参照目标播放位置的确定方式来确定。缓存数据的方式尤其适用于流媒体播放场景。Exemplarily, the audio and video data between the first playback position and the target playback position may be original audio and video data or buffered data. If it is cached data, in the process of playing audio and video, the audio and video data within the preset playback duration before the current playback position can be cached, and after the cached data is played from the second time, continue to play the audio and video data after the target playback position. Original audio and video data. The preset playback duration may be determined according to actual needs, and preferably may be determined with reference to the way of determining the target playback position. The way of caching data is especially suitable for streaming media playback scenarios.
本发明实施例提供的音视频的播放控制方法,在音视频的播放过程中监听到第一音量调节操作时,记录第一音量调节操作开始执行的第一时刻对应的第一播放位置,确定位于第一播放位置之前的目标播放位置,并在第一音量调节操作执行完毕的第二时刻开始从目标播放位置继续播放音视频。通过采用上述技术方案,在音视频的播放音量发生变化时,自动回放音量变化前的一段时间的音视频数据,可以合理地控制音视频的播放。In the audio and video playback control method provided by the embodiment of the present invention, when the first volume adjustment operation is monitored during the audio and video playback process, the first playback position corresponding to the first moment when the first volume adjustment operation is started is recorded, and the first playback position is determined to be located at The target playback position before the first playback position, and the audio and video playback from the target playback position starts at the second moment after the first volume adjustment operation is completed. By adopting the above technical solution, when the playback volume of the audio and video changes, the audio and video data for a period of time before the volume change is automatically played back, so that the playback of the audio and video can be reasonably controlled.
优选的,在上述技术方案的基础上,在音视频的播放过程中监听音量调节操作可以为在音视频的播放过程中监听音量增大操作。这样设置的好处在于,当播放音量较小时,用户可能听不清音视频中的播放内容,所以需要增大音量,在音量增大后,自动回放音量增大前的一段时间的音视频数据,可以节省用户手动调节播放进度或重新播放的动作,更加合理地控制音视频的播放,提高播放效率。Preferably, on the basis of the above technical solution, monitoring the volume adjustment operation during the playback of the audio and video may be the monitoring of the volume increase operation during the playback of the audio and video. The advantage of this setting is that when the playback volume is low, the user may not be able to hear the playback content in the audio and video, so the volume needs to be increased. After the volume is increased, the audio and video data for a period of time before the volume is automatically played back. It saves the user's actions of manually adjusting the playback progress or replaying, controls the playback of audio and video more reasonably, and improves playback efficiency.
可选的,在上述技术方案的基础上,在监听到所述第一音量调节操作时,可继续播放所述音视频,也可暂停播放所述音视频。继续播放的好处在于,可使终端在用户的调节过程中实时反馈调节效果;暂停播放的好处在于,可节省功耗。Optionally, on the basis of the above technical solution, when the first volume adjustment operation is monitored, the audio and video may be continuously played, or the audio and video may be paused. The advantage of continuing playing is that the terminal can feedback the adjustment effect in real time during the adjustment process of the user; the advantage of pausing the playing is that power consumption can be saved.
可选的,在上述技术方案的基础上,在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频之后,还可包括:若在所述第二时刻后的第二预设时长内监听到第二音量调节操作,则在所述第二音量调节操作执行完毕的第三时刻开始从所述目标播放位置继续播放所述音视频,其中,所述第二预设时长小于或等于所述第一预设时长。这样设置的好处在于,若在第一音量调节操作执行完毕后的短时间内,用户再次进行音量调节,说明上一次调节后的音量仍不满足用户需求,再监听到第二音量调节操作后,无需重新确定继续播放的位置,而是直接采用上次调节后确定的目标位置来继续播放音视频,可进一步合理控制音视频的播放,提高播放效率。Optionally, on the basis of the above technical solution, after the audio and video are continued to be played from the target playback position at the second moment after the execution of the first volume adjustment operation is completed, it may further include: If the second volume adjustment operation is monitored within the second preset time period after two moments, the audio and video will continue to be played from the target playback position at the third moment after the second volume adjustment operation is completed. The second preset duration is less than or equal to the first preset duration. The advantage of this setting is that if the user adjusts the volume again within a short time after the first volume adjustment operation is completed, it means that the volume after the last adjustment still does not meet the user's needs, and after monitoring the second volume adjustment operation, There is no need to re-determine the position to continue playing, but directly use the target position determined after the last adjustment to continue playing the audio and video, which can further reasonably control the playback of the audio and video and improve the playback efficiency.
图2为本发明实施例提供的另一种音视频的播放控制方法的流程示意图,该方法尤其适用于即时通信领域中播放语音消息的应用场景,下面以微信为例进行详细说明。如图2所示,该方法包括如下步骤:FIG. 2 is a schematic flowchart of another audio and video playback control method provided by an embodiment of the present invention. The method is especially suitable for the application scenario of playing voice messages in the field of instant messaging. The following takes WeChat as an example to describe in detail. As shown in Figure 2, the method includes the following steps:
步骤201、在语音消息的播放过程中监听音量增大操作。Step 201: Monitor the volume increase operation during the playback of the voice message.
示例性的,当用户的微信账号接收到朋友发送的语音消息时,可点击该语音消息,终端会播放该语音消息,并在播放过程中监听音量增大操作。一般的,当用户在手机上使用微信时,可通过手机的音量控制按键“+”来进行音量增大操作。Exemplarily, when the user's WeChat account receives a voice message sent by a friend, the user can click on the voice message, and the terminal will play the voice message, and monitor the volume increase operation during the playback process. Generally, when a user uses WeChat on a mobile phone, the volume control button "+" of the mobile phone can be used to increase the volume.
步骤202、在监听到第一音量增大操作时,记录第一音量增大操作开始执行的第一时刻对应的第一播放位置。Step 202: When the first volume increase operation is monitored, record the first playback position corresponding to the first moment when the first volume increase operation starts to be performed.
示例性的,假设正在播放的语音消息的总长度为15秒,在播放了一段时间后,用户觉得播放声音较小,则会按下音量“+”键来增大音量,若按下的时间为2点05分00秒,则2点05分00秒为第一时刻。Exemplarily, assuming that the total length of the voice message being played is 15 seconds, after playing for a period of time, the user feels that the playing sound is low, and then presses the volume "+" key to increase the volume. If it is 2:05:00, then 2:05:00 is the first moment.
步骤203、判断第一播放位置距离语音消息的起始位置的时间间隔是否大于第一预设时长,若是,则执行步骤204;否则,执行步骤205。Step 203: Determine whether the time interval between the first playback position and the start position of the voice message is greater than the first preset duration, if so, go to
示例性的,第一预设时长的取值范围可在3至5秒之内。优选的,第一预设时长为3秒,并以此为例进行后续说明。第一种情况,若用户在语音消息播放了10秒时按下音量“+”键,则第一播放位置为10秒,距离语音消息的起始位置的时间间隔大于3秒,则执行步骤204;第二种情况,若用户在语音消息播放了2秒时按下音量“+”键,则第一播放位置为2秒,距离语音消息的起始位置的时间间隔小于3秒,则执行步骤205。Exemplarily, the value range of the first preset duration may be within 3 to 5 seconds. Preferably, the first preset duration is 3 seconds, and the subsequent description will be given by taking this as an example. In the first case, if the user presses the volume "+" key when the voice message is played for 10 seconds, the first playback position is 10 seconds, and the time interval from the start position of the voice message is greater than 3 seconds, then step 204 is executed. ; In the second case, if the user presses the volume "+" key when the voice message is played for 2 seconds, then the first playback position is 2 seconds, and the time interval from the starting position of the voice message is less than 3 seconds, then execute the
步骤204、在第一播放位置基础上减去第一预设时长,得到第二播放位置,并将第二播放位置确定为目标播放位置。Step 204: Subtract the first preset duration from the first playback position to obtain the second playback position, and determine the second playback position as the target playback position.
这样设置的好处在于,可能语音消息中朋友说话的声音刚开始很大,但中途变小,用户一般会在声音小的时候才会调大音量,所以无需从头开始播放语音消息,提高播放效率。The advantage of this setting is that the voice of the friend in the voice message may be loud at the beginning, but it becomes quieter in the middle. The user usually turns up the volume when the voice is low, so there is no need to play the voice message from the beginning, which improves the playback efficiency.
对于上述第一种情况,则确定目标播放位置为7秒处。For the first case above, the target playback position is determined to be at 7 seconds.
步骤205、将语音消息的起始位置确定为目标播放位置。Step 205: Determine the start position of the voice message as the target playback position.
对于上述第二种情况,则确定目标播放位置为语音消息的起始位置,即0秒处。For the second case above, the target playback position is determined to be the start position of the voice message, that is, at 0 seconds.
步骤206、在第一音量增大操作执行完毕的第二时刻开始从目标播放位置继续播放语音消息。Step 206: Continue to play the voice message from the target playback position at the second moment after the first volume increase operation is completed.
假设用户在2点05分01秒松开了音量“+”键,则从2点05分01秒开始从所确定的目标播放位置继续播放语音消息。对于上述第一种情况,则从语音消息的7秒处继续播放语音消息;对于上述第二种情况,则自动重新播放语音消息。Assuming that the user releases the volume "+" key at 2:05:01, the voice message will continue to be played from the determined target playback position from 2:05:01. For the first case above, the voice message will continue to be played from 7 seconds into the voice message; for the second case above, the voice message will be automatically replayed.
优选的,在监听到第一音量增大操作时,继续播放语音消息直到第二时刻,这样设置的好处在于,可以实现实时将音量效果反馈给用户,方便用户确定结束音量增大操作的时间点,减少二次调整操作,进一步提高播放效率。Preferably, when the first volume increase operation is monitored, the voice message is continued to be played until the second moment. The advantage of this setting is that the volume effect can be fed back to the user in real time, and it is convenient for the user to determine the time point for ending the volume increase operation. , reducing the secondary adjustment operation and further improving the playback efficiency.
步骤207、判断在第二时刻后的第二预设时长内是否监听到第二音量增大操作,若是,则执行步骤208;否则,执行步骤209。Step 207: Determine whether the second volume increase operation is monitored within the second preset time period after the second moment, if yes, go to
示例性的,第二预设时长小于或等于第一预设时长,优选的,第二预设时长为3秒。假设用户在继续收听2秒(2点05分03秒)后,发现声音还是比较小,若继续调节音量,就会监听到第二音量增大操作,说明这2秒期间的语音信息仍未正常听取,所以可执行步骤208。Exemplarily, the second preset duration is less than or equal to the first preset duration, and preferably, the second preset duration is 3 seconds. Suppose the user continues to listen for 2 seconds (2:05:03) and finds that the sound is still relatively low. If he continues to adjust the volume, the second volume increase operation will be monitored, indicating that the voice information during these 2 seconds is still not normal. listen, so step 208 can be performed.
步骤208、在第二音量增大操作完毕的第三时刻开始从目标播放位置继续播放语音消息。Step 208: Continue to play the voice message from the target playback position at the third moment after the second volume increase operation is completed.
假设用户在2点05分04秒松开音量“+”键,对于上述第一种情况,则在2点05分04秒开始从语音消息的7秒处继续播放语音消息;对于上述第二种情况,则在2点05分04秒开始自动重新播放语音消息。Assuming that the user releases the volume "+" key at 2:05:04, for the first case above, the voice message will continue to be played from 7 seconds into the voice message at 2:05:04; for the second case above In this case, the voice message will be automatically replayed at 2:05:04.
步骤209、继续播放语音消息,并返回执行步骤201。
本实施例中若语音消息播放完毕,则可结束流程。In this embodiment, if the playback of the voice message is completed, the process can be ended.
在用户收听微信等社交软件中的语音消息时,经常会因为手机等终端本来音量等级较低或者对方说话声音太小而听不清楚,需要手动调节音量,一些比较短的语音在调节好音量前就已经播放完毕,需要重新点击播放,影响播放效率。通过采用本发明实施例,终端可通过音量控制键操作或者滑动音量控制(进度)条的操作即可同步实现调节音量、预览音量及回放的功能,减少用户的手动操作,提高了终端的语音消息播放效率。When users listen to voice messages in social software such as WeChat, they often cannot hear clearly because the original volume level of mobile phones and other terminals is low or the voice of the other party is too low, so they need to manually adjust the volume. It has been played, and you need to click to play again, which affects the playback efficiency. By adopting the embodiment of the present invention, the terminal can synchronously realize the functions of volume adjustment, preview volume and playback through the operation of the volume control key or the operation of sliding the volume control (progress) bar, which reduces the manual operation of the user and improves the voice message of the terminal. playback efficiency.
可以理解的是,上述技术方案同样适用于其他音频以及视频的播放控制,并可实现同样的技术效果,本发明实施例不再赘述。It can be understood that the above technical solutions are also applicable to other audio and video playback control, and can achieve the same technical effect, which is not repeated in this embodiment of the present invention.
图3为本发明实施例提供的一种音视频的播放控制装置的结构框图,该装置可由软件和/或硬件实现,一般集成在终端中,可通过执行音视频的播放控制方法来对音视频的播放进行控制。如图3所示,该装置包括操作监听模块301、位置记录模块302、位置确定模块303和播放控制模块304。3 is a structural block diagram of an audio and video playback control device provided by an embodiment of the present invention. The device can be implemented by software and/or hardware, and is generally integrated in a terminal. playback control. As shown in FIG. 3 , the apparatus includes an
其中,操作监听模块302,用于在音视频的播放过程中监听音量调节操作;Wherein, the
位置记录模块303,用于在监听到第一音量调节操作时,记录所述第一音量调节操作开始执行的第一时刻对应的第一播放位置;The
位置确定模块304,用于确定目标播放位置,其中,所述目标播放位置位于所述第一播放位置之前;A
播放控制模块305,用于在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频。The playback control module 305 is configured to continue playing the audio and video from the target playback position at the second moment after the execution of the first volume adjustment operation is completed.
本发明实施例提供的音视频的播放控制装置,在音视频的播放过程中监听到第一音量调节操作时,记录第一音量调节操作开始执行的第一时刻对应的第一播放位置,确定位于第一播放位置之前的目标播放位置,并在第一音量调节操作执行完毕的第二时刻开始从目标播放位置继续播放音视频。通过采用上述技术方案,在音视频的播放音量发生变化时,自动回放音量变化前的一段时间的音视频数据,可以合理地控制音视频的播放。The audio and video playback control device provided by the embodiment of the present invention records the first playback position corresponding to the first moment when the first volume adjustment operation starts when the first volume adjustment operation is monitored during the audio and video playback process, and determines that The target playback position before the first playback position, and the audio and video playback from the target playback position starts at the second moment after the first volume adjustment operation is completed. By adopting the above technical solution, when the playback volume of the audio and video changes, the audio and video data for a period of time before the volume change is automatically played back, so that the playback of the audio and video can be reasonably controlled.
可选的,所述位置确定模块用于:Optionally, the location determination module is used for:
根据所述第一播放位置和第一预设时长确定目标播放位置。The target playback position is determined according to the first playback position and the first preset duration.
可选的,所述位置确定模块用于:Optionally, the location determination module is used for:
判断所述第一播放位置距离所述音视频的起始位置的时间间隔是否大于第一预设时长;Determine whether the time interval between the first playback position and the starting position of the audio and video is greater than the first preset duration;
若大于,则在所述第一播放位置基础上减去所述第一预设时长,得到第二播放位置,并将所述第二播放位置确定为目标播放位置;若小于或等于,则将所述音视频的起始位置确定为目标播放位置。If it is greater than that, subtract the first preset duration from the first playback position to obtain a second playback position, and determine the second playback position as the target playback position; if it is less than or equal to The starting position of the audio and video is determined as the target playback position.
可选的,所述播放控制模块还用于:在监听到所述第一音量调节操作时,暂停播放所述音视频。Optionally, the playback control module is further configured to: pause playback of the audio and video when the first volume adjustment operation is monitored.
可选的,所述播放控制模块还用于:Optionally, the playback control module is also used for:
在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频之后,若在所述第二时刻后的第二预设时长内监听到第二音量调节操作,则在所述第二音量调节操作执行完毕的第三时刻开始从所述目标播放位置继续播放所述音视频,其中,所述第二预设时长小于或等于所述第一预设时长。After the audio and video continues to be played from the target playback position at the second time after the first volume adjustment operation is completed, if the second volume adjustment is monitored within the second preset time period after the second time operation, the audio and video will continue to be played from the target playback position at the third moment after the second volume adjustment operation is completed, wherein the second preset duration is less than or equal to the first preset duration .
可选的,所述操作监听模块用于:Optionally, the operation monitoring module is used for:
在音视频的播放过程中监听音量增大操作。Monitor the volume increase operation during the playback of audio and video.
本发明实施例提供了一种终端,该终端中可集成本发明实施例提供的音视频的播放控制装置。图4为本发明实施例提供的一种终端的结构示意图。如图4所示,该终端可以包括:壳体(图中未示出)、存储器401、中央处理器(Central Processing Unit,CPU)402(又称处理器,以下简称CPU)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU402和所述存储器401设置在所述电路板上;所述电源电路,用于为所述终端的各个电路或器件供电;所述存储器401,用于存储可执行程序代码;所述CPU402通过读取所述存储器401中存储的可执行程序代码来运行与所述可执行程序代码对应的计算机程序,以实现以下步骤:在音视频的播放过程中监听音量调节操作;在监听到第一音量调节操作时,记录所述第一音量调节操作开始执行的第一时刻对应的第一播放位置;确定目标播放位置,其中,所述目标播放位置位于所述第一播放位置之前;在所述第一音量调节操作执行完毕的第二时刻开始从所述目标播放位置继续播放所述音视频。An embodiment of the present invention provides a terminal, in which the audio and video playback control device provided by the embodiment of the present invention can be integrated. FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 4, the terminal may include: a casing (not shown in the figure), a
所述终端还包括:外设接口403、RF(Radio Frequency,射频)电路405、音频电路406、扬声器411、电源管理芯片408、输入/输出(I/O)子系统409、触摸屏412、其他输入/控制设备410以及外部端口404,这些部件通过一个或多个通信总线或信号线407来通信。The terminal further includes: a
应该理解的是,图示终端400仅仅是终端的一个范例,并且终端400可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated
下面就本实施例提供的用于实现音视频播放控制的终端进行详细的描述,该终端以手机为例。The following is a detailed description of the terminal provided in this embodiment for implementing audio and video playback control, and the terminal is a mobile phone as an example.
存储器401,所述存储器401可以被CPU402、外设接口403等访问,所述存储器401可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口403,所述外设接口403可以将设备的输入和输出外设连接到CPU402和存储器401。A
I/O子系统409,所述I/O子系统409可以将设备上的输入输出外设,例如触摸屏412和其他输入/控制设备410,连接到外设接口403。I/O子系统409可以包括显示控制器4091和用于控制其他输入/控制设备410的一个或多个输入控制器4092。其中,一个或多个输入控制器4092从其他输入/控制设备410接收电信号或者向其他输入/控制设备410发送电信号,其他输入/控制设备410可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器4092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/
触摸屏412,所述触摸屏412是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。The
I/O子系统409中的显示控制器4091从触摸屏412接收电信号或者向触摸屏412发送电信号。触摸屏412检测触摸屏上的接触,显示控制器4091将检测到的接触转换为与显示在触摸屏412上的用户界面对象的交互,即实现人机交互,显示在触摸屏412上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路405,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路405接收并发送RF信号,RF信号也称为电磁信号,RF电路405将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路405可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The
音频电路406,主要用于从外设接口403接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器411。The
扬声器411,用于将手机通过RF电路405从无线网络接收的语音信号,还原为声音并向用户播放该声音。The
电源管理芯片408,用于为CPU402、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The
本发明实施例提供的终端,在音视频的播放音量发生变化时,自动回放音量变化前的一段时间的音视频数据,可以合理地控制音视频的播放。In the terminal provided by the embodiment of the present invention, when the playback volume of audio and video changes, the audio and video data for a period of time before the volume change is automatically played back, which can reasonably control the playback of audio and video.
上述实施例中提供的音视频的播放控制装置及终端可执行本发明任意实施例所提供的音视频的播放控制方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的音视频的播放控制方法。The audio and video playback control device and terminal provided in the above embodiments can execute the audio and video playback control method provided by any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in the above embodiments, reference may be made to the audio and video playback control method provided by any embodiment of the present invention.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710015427.2ACN106713653B (en) | 2017-01-10 | 2017-01-10 | A kind of audio and video playback control method, device and terminal |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710015427.2ACN106713653B (en) | 2017-01-10 | 2017-01-10 | A kind of audio and video playback control method, device and terminal |
| Publication Number | Publication Date |
|---|---|
| CN106713653A CN106713653A (en) | 2017-05-24 |
| CN106713653Btrue CN106713653B (en) | 2020-06-30 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710015427.2AExpired - Fee RelatedCN106713653B (en) | 2017-01-10 | 2017-01-10 | A kind of audio and video playback control method, device and terminal |
| Country | Link |
|---|---|
| CN (1) | CN106713653B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107968956B (en)* | 2017-11-10 | 2020-08-28 | 深圳天珑无线科技有限公司 | Video playing method, electronic equipment and device with storage function |
| CN107872584A (en)* | 2017-11-24 | 2018-04-03 | 维沃移动通信有限公司 | A multimedia processing method, multimedia equipment and terminal |
| CN107872709A (en)* | 2017-11-24 | 2018-04-03 | 维沃移动通信有限公司 | A multimedia processing method, multimedia equipment and terminal |
| CN110086941B (en)* | 2019-04-30 | 2021-03-26 | Oppo广东移动通信有限公司 | Voice playing method and device and terminal equipment |
| CN111918139B (en)* | 2020-07-20 | 2022-04-26 | 维沃移动通信有限公司 | Video playback method, device, device and storage medium |
| CN111885261A (en)* | 2020-07-23 | 2020-11-03 | Oppo广东移动通信有限公司 | Audio control method, device, storage medium and terminal |
| CN114554017A (en)* | 2022-01-27 | 2022-05-27 | 阿里巴巴(中国)有限公司 | Voice conversation method, apparatus, electronic device and readable storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106033677A (en)* | 2015-03-17 | 2016-10-19 | 北京顶魁科技有限公司 | Method of controlling playing progress and apparatus thereof |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4640461B2 (en)* | 2008-07-08 | 2011-03-02 | ソニー株式会社 | Volume control device and program |
| KR100993064B1 (en)* | 2009-03-02 | 2010-11-08 | 주식회사 팬택 | Sound source selection playback method on touch screen applied sound source playback device |
| CN103761063B (en)* | 2013-12-19 | 2018-09-07 | 北京百度网讯科技有限公司 | A kind of method and apparatus for the output volume controlling audio in playback equipment |
| CN103985394A (en)* | 2014-04-18 | 2014-08-13 | 青岛尚慧信息技术有限公司 | Audio file playing method |
| CN103985400A (en)* | 2014-04-18 | 2014-08-13 | 青岛尚慧信息技术有限公司 | Audio file playing system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106033677A (en)* | 2015-03-17 | 2016-10-19 | 北京顶魁科技有限公司 | Method of controlling playing progress and apparatus thereof |
| Publication number | Publication date |
|---|---|
| CN106713653A (en) | 2017-05-24 |
| Publication | Publication Date | Title |
|---|---|---|
| CN106713653B (en) | A kind of audio and video playback control method, device and terminal | |
| CN108509176B (en) | A method, device, storage medium and intelligent terminal for playing audio data | |
| CN109460364B (en) | Application program detection method and device, storage medium and mobile terminal | |
| CN108024128B (en) | Control method and device for Bluetooth music playing, terminal equipment and storage medium | |
| CN107040660A (en) | Method and device for controlling playback volume of mobile terminal and mobile terminal | |
| CN104218963A (en) | Method for executing control operations, wearable device and terminal | |
| CN107580113A (en) | Prompt method, device, storage medium and terminal | |
| CN106341546B (en) | Audio playing method and device and mobile terminal | |
| CN107343076A (en) | Volume adjusting method and device, storage medium and mobile terminal | |
| CN108920070B (en) | Screen splitting method and device based on special-shaped display screen, storage medium and mobile terminal | |
| CN106205580B (en) | A kind of audio data processing method and terminal | |
| CN111033614B (en) | Volume adjustment method, device, mobile terminal and storage medium | |
| CN108920071B (en) | Control method and device based on special-shaped display screen, storage medium and mobile terminal | |
| CN108616775B (en) | Method and device for intelligently capturing picture during video playing, storage medium and intelligent terminal | |
| CN103092490A (en) | Video control method and device | |
| CN107402712B (en) | Touch operation response method and device, storage medium and terminal | |
| CN107483731A (en) | Audio playback volume control method, device, storage medium and mobile terminal | |
| CN106411448A (en) | Play control method, device and terminal | |
| CN107526569B (en) | Volume adjusting method and device, storage medium and mobile terminal | |
| CN107506168B (en) | Volume adjusting method and device, terminal equipment and storage medium | |
| CN107040661A (en) | Method and device for controlling playback volume of mobile terminal and mobile terminal | |
| CN112040324A (en) | A playback progress adjustment method, device, storage medium and terminal | |
| CN108803983B (en) | Display control method and device of notification message, electronic device and storage medium | |
| CN106878915A (en) | Playing device control method, device, playing device, and mobile terminal | |
| CN107483734B (en) | Volume adjustment method, device, terminal device and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20200630 | |
| CF01 | Termination of patent right due to non-payment of annual fee |