播放进度显示方法、装置、电子设备和存储介质Playing progress display method, device, electronic equipment and storage medium
相关申请的交叉引用Cross references to related applications
本申请要求2019年5月21日在中国知识产权局提交的标题为“播放进度显示方法、装置、电子设备和存储介质”中国专利申请No.201910424851.1的优先权,通过引用将该中国专利申请公开的全部内容并入本文。This application claims the priority of the Chinese patent application No. 201910424851.1 filed with the China Intellectual Property Office on May 21, 2019, entitled "Play progress display method, device, electronic equipment and storage medium", and the Chinese patent application is published by reference The entire content of is incorporated into this article.
技术领域Technical field
本公开涉及信息处理技术领域,具体而言,本公开涉及一种播放进度显示方法、装置、电子设备和存储介质。The present disclosure relates to the field of information processing technology. Specifically, the present disclosure relates to a playback progress display method, device, electronic device, and storage medium.
背景技术Background technique
随着计算机技术和移动通信技术的迅速发展,笔记本电脑、平板电脑、手机等终端设备的功能越来越强大,用户可以利用终端设备登录互联网,获取互联网上发布的各种信息。例如,利用终端设备随时观看互联网上的多媒体文件。With the rapid development of computer technology and mobile communication technology, terminal devices such as notebook computers, tablet computers, and mobile phones have become more and more powerful. Users can use terminal devices to log in to the Internet and obtain various information published on the Internet. For example, using terminal equipment to watch multimedia files on the Internet at any time.
现有技术中,对于iOS系统,系统播放器在播放多媒体文件时,播放进度为10%以下时,系统组件无法区分出来,无论是从0%播放还是从1%开始播放,iOS系统的系统组件展示的起始点都是从10%开始,无论播放进度是1%、3%还是5%,都显示10%。例如,多媒体文件开始播放时,系统播放器就会突然显示至播放进度10%,10%以下的播放进度无法进行显示。由于系统组件无法按照播放器的实时播放进度进行显示,无法满足用户对播放进度实时查看的需求。另外,系统播放器的播放进度是非线性变化显示的,如1%、3%、5%。因此,播放多媒体文件时播放进度条会出现跳变,无法满足用户对播放进度精确查看的需求,影响用户的观看效果,用户体验较差。In the prior art, for the iOS system, when the system player is playing a multimedia file and the playback progress is below 10%, the system components cannot be distinguished. Whether it is playing from 0% or starting from 1%, the system components of the iOS system The starting point of the display is always 10%, no matter whether the playback progress is 1%, 3% or 5%, 10% is displayed. For example, when a multimedia file starts to play, the system player will suddenly display the playback progress to 10%, and the playback progress below 10% cannot be displayed. Since the system components cannot be displayed according to the real-time playback progress of the player, it cannot meet the needs of users for real-time viewing of the playback progress. In addition, the playback progress of the system player is displayed with non-linear changes, such as 1%, 3%, and 5%. Therefore, when the multimedia file is played, the playback progress bar will jump, which cannot meet the user's demand for accurate viewing of the playback progress, affects the user's viewing effect, and has a poor user experience.
发明内容Summary of the invention
本公开提供了一种播放进度显示方法、装置、电子设备和存储介质,用于解决现有技术中的iOS系统组件无法实时显示多媒体文件播放进度,以及多媒体文件播放过程中会出现播放进度条跳变的问题。The present disclosure provides a method, device, electronic device, and storage medium for displaying playback progress, which are used to solve the problem that iOS system components in the prior art cannot display the playback progress of multimedia files in real time, and the playback progress bar skips during the playback of multimedia files. Change the problem.
第一方面,提供了一种播放进度显示方法,该方法包括:In the first aspect, a method for displaying playback progress is provided, and the method includes:
确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;Determining the display length information of the first progress view corresponding to the total playing time of the multimedia file;
在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;以及During the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, determine the display of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency Length information; and
在显示刷新频率对应的各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。At each playback time point corresponding to the display refresh frequency, the first progress view and the second progress view are superimposed and displayed on the multimedia player according to the display length information of the first progress view and the display length information of the second progress view, To display the playback time progress during the playback of multimedia files.
本公开第一方面的可选实施例中,针对当前的播放时间点,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的当前的播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息,包括:In an optional embodiment of the first aspect of the present disclosure, for the current playback time point, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, the display refresh frequency corresponding to the current playback time point of the multimedia file is determined The display length information of the second progress view corresponding to the playback time progress includes:
根据显示刷新频率确定每次刷新间隔时间;Determine each refresh interval according to the display refresh frequency;
计算每次刷新间隔时间与当前的播放时间点对应的播放进度时长之和,得到当前的播放时间点处多媒体文件的当前播放时间进度;Calculate the sum of each refresh interval and the playback progress duration corresponding to the current playback time point to obtain the current playback time progress of the multimedia file at the current playback time point;
计算当前播放时间进度占播放总时长的百分比;以及Calculate the percentage of the current playing time progress to the total playing time; and
根据百分比和第一进度视图的显示长度信息计算第二进度视图的显示长度信息。The display length information of the second progress view is calculated according to the percentage and the display length information of the first progress view.
本公开第一方面的可选实施例中,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息之前,该方法还包括:In an optional embodiment of the first aspect of the present disclosure, before determining the display length information of the first progress view corresponding to the total playing time of the multimedia file, the method further includes:
根据多媒体播放器的尺寸信息或者播放多媒体文件的终端设备的尺寸信息确定第一进度视图的显示长度信息,并将多媒体文件的播放总时长 和第一进度视图的显示长度信息建立对应关系。Determine the display length information of the first progress view according to the size information of the multimedia player or the size information of the terminal device that plays the multimedia file, and establish a corresponding relationship between the total playing time of the multimedia file and the display length information of the first progress view.
本公开第一方面的可选实施例中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息之前,该方法还包括:In an optional embodiment of the first aspect of the present disclosure, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, the second corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency is determined Before displaying the length information of the progress view, the method also includes:
根据终端设备的显示屏的刷新频率确定多媒体播放器的显示刷新频率。The display refresh frequency of the multimedia player is determined according to the refresh frequency of the display screen of the terminal device.
本公开第一方面的可选实施例中,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,包括:In an optional embodiment of the first aspect of the present disclosure, superimposing and displaying the first progress view and the second progress view on the multimedia player includes:
将第一进度视图及第二进度视图在多媒体播放器上以不同的显示颜色进行叠加显示。The first progress view and the second progress view are superimposed and displayed on the multimedia player in different display colors.
本公开第一方面的可选实施例中,在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息之前,该方法还包括:In an optional embodiment of the first aspect of the present disclosure, during the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, the display refresh frequency corresponding to each playback time point of the multimedia file is determined Before the display length information of the second progress view corresponding to the playback time progress, the method further includes:
确定多媒体文件的初始播放进度时长;以及Determine the initial playback progress duration of the multimedia file; and
根据初始播放进度时长确定第二进度视图的初始显示长度信息。The initial display length information of the second progress view is determined according to the initial playback progress duration.
第二方面,提供了一种多媒体播放器播放进度显示装置,该装置包括:In a second aspect, a multimedia player playback progress display device is provided, which includes:
第一确定模块,其用于确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;The first determining module is used to determine the display length information of the first progress view corresponding to the total playing time of the multimedia file;
第二确定模块,其用于在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;以及The second determining module is used to determine the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file during the playback of the multimedia file The display length information of the corresponding second progress view; and
显示模块,其用于在显示刷新频率对应的各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。The display module is used to display the first progress view and the second progress view in the multimedia playback according to the display length information of the first progress view and the display length information of the second progress view at each playback time point corresponding to the display refresh frequency Superimposed display on the device to display the playback time progress during the playback of the multimedia file.
本公开第二方面的可选实施例中,第二确定模块用于:In an optional embodiment of the second aspect of the present disclosure, the second determining module is configured to:
根据显示刷新频率确定每次刷新间隔时间;Determine each refresh interval according to the display refresh frequency;
计算每次刷新间隔时间与当前的播放时间点对应的播放进度时长之和,得到当前的播放时间点处多媒体文件的当前播放时间进度;Calculate the sum of each refresh interval and the playback progress duration corresponding to the current playback time point to obtain the current playback time progress of the multimedia file at the current playback time point;
计算当前播放时间进度占播放总时长的百分比;并且Calculate the percentage of the current playing time progress to the total playing time; and
根据百分比和第一进度视图的显示长度信息计算第二进度视图的显示长度信息。The display length information of the second progress view is calculated according to the percentage and the display length information of the first progress view.
第三方面,本公开提供了一种电子设备,该电子设备包括:In a third aspect, the present disclosure provides an electronic device, which includes:
一个或多个处理器;One or more processors;
存储器;以及Memory; and
一个或多个应用程序,其中一个或多个应用程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个程序配置用于:执行如本公开的第一方面所示的多媒体播放器播放进度显示方法对应的操作。One or more application programs, where one or more application programs are stored in a memory and configured to be executed by one or more processors, and one or more programs are configured to execute as described in the first aspect of the present disclosure The corresponding operation of the multimedia player playback progress display method shown.
第四方面,本公开提供了一种计算机可读存储介质,计算机可读存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机可以执行如本公开的第一方面所示的多媒体播放器播放进度显示方法。In a fourth aspect, the present disclosure provides a computer-readable storage medium, which is used to store computer instructions. When it runs on a computer, the computer can execute the multimedia as shown in the first aspect of the present disclosure. The player's progress display method.
本公开提供的技术方案带来的有益效果是:The beneficial effects brought about by the technical solution provided by the present disclosure are:
在本公开实施例的方案中,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;在各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。本公开中,由于第二进度视图的显示长度信息是基于显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度来确定的,通过第一进度视图和第二进度视图进行叠加显示,实现了在各个播放时间点处实时显示多媒体文件的播放进度,解决了现有技术中无法实时显示多媒体文件播放进度的问题;同时,通过显示刷新频率来改进播放进度的显示频率,避免了播放进度跳变显示的问题,满足了用户对查看多媒体文件播放 进度的实时性和精确性要求。In the solution of the embodiment of the present disclosure, the display length information of the first progress view corresponding to the total playing time of the multimedia file is determined; during the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback of the multimedia file For the progress duration, determine the display length information of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency; at each playback time point, according to the display length information of the first progress view and the first progress view Second, the display length information of the progress view, the first progress view and the second progress view are superimposed and displayed on the multimedia player to display the playback time progress during the playback of the multimedia file. In the present disclosure, since the display length information of the second progress view is determined based on the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency, the first progress view and the second progress view are superimposed and displayed to achieve It displays the playback progress of multimedia files in real time at each playback time point, and solves the problem that the playback progress of multimedia files cannot be displayed in real time in the prior art; at the same time, the display frequency of the playback progress is improved by the display refresh frequency, and the playback progress is avoided. The problem of variable display satisfies the real-time and accuracy requirements of users for viewing the playback progress of multimedia files.
附图说明Description of the drawings
为了更清楚地说明本公开实施例中的技术方案,下面将对本公开实施例描述中所需要使用的附图作简单地介绍。In order to more clearly describe the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present disclosure.
图1为本公开实施例提供的一种多媒体播放器播放进度显示方法的流程示意图;FIG. 1 is a schematic flowchart of a method for displaying playback progress of a multimedia player according to an embodiment of the disclosure;
图2为本公开实施例提供的一种多媒体播放器播放进度显示装置的结构示意图;以及2 is a schematic structural diagram of a multimedia player playing progress display device provided by an embodiment of the disclosure; and
图3为本公开实施例提供的一种电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the disclosure.
具体实施方式Detailed ways
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能解释为对本发明的限制。The embodiments of the present disclosure will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, in which the same or similar reference numerals indicate the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary, and are only used to explain the present disclosure, and cannot be construed as limiting the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本公开的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the described features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or intervening elements may also be present. In addition, “connected” or “coupled” used herein may include wireless connection or wireless coupling. The term "and/or" as used herein includes all or any unit and all combinations of one or more associated listed items.
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。In order to make the objectives, technical solutions, and advantages of the present disclosure clearer, the following further describes the embodiments of the present disclosure in detail with reference to the accompanying drawings.
下面以具体地实施例对本公开的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结 合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开的实施例进行描述。The technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present disclosure will be described below with reference to the accompanying drawings.
本公开实施例的应用场景为用户利用ios系统的系统播放器播放在线多媒体文件或者本地多媒体文件。The application scenario of the embodiment of the present disclosure is that the user uses the system player of the ios system to play online multimedia files or local multimedia files.
图1为本公开实施例提供的一种多媒体播放器播放进度显示方法的流程示意图,如图1所示,该方法可以包括:FIG. 1 is a schematic flowchart of a method for displaying playback progress of a multimedia player according to an embodiment of the disclosure. As shown in FIG. 1, the method may include:
步骤S101,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;Step S101: Determine the display length information of the first progress view corresponding to the total playing time of the multimedia file;
步骤S102,在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;以及Step S102: During the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, determine a second progress corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency The display length information of the view; and
步骤S103,在显示刷新频率对应的各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。Step S103, at each playback time point corresponding to the display refresh frequency, perform the first progress view and the second progress view on the multimedia player according to the display length information of the first progress view and the display length information of the second progress view Overlay display to display the playback time progress during the playback of multimedia files.
在本公开实施例的方案中,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;在各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。本公开中,由于第二进度视图的显示长度信息是基于显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度来确定的,通过第一进度视图和第二进度视图进行叠加显示,实现了在各个播放时间点处实时显示多媒体文件的播放进度,解决了现有技术中无法实时显示多媒体文件播放进度的问题;同时,通过显示刷新频率来改进播放进度的显示频率,避免了播放进度跳变显示的问题,满足了用户对查看多媒体文件播放 进度的实时性和精确性要求。In the solution of the embodiment of the present disclosure, the display length information of the first progress view corresponding to the total playing time of the multimedia file is determined; during the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback of the multimedia file For the progress duration, determine the display length information of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency; at each playback time point, according to the display length information of the first progress view and the first progress view Second, the display length information of the progress view, the first progress view and the second progress view are superimposed and displayed on the multimedia player to display the playback time progress during the playback of the multimedia file. In the present disclosure, since the display length information of the second progress view is determined based on the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency, the first progress view and the second progress view are superimposed and displayed to achieve It displays the playback progress of multimedia files in real time at each playback time point, and solves the problem that the playback progress of multimedia files cannot be displayed in real time in the prior art; at the same time, the display frequency of the playback progress is improved by the display refresh frequency, and the playback progress is avoided. The problem of variable display satisfies the real-time and accuracy requirements of users for viewing the playback progress of multimedia files.
下面对本公开实施例的上述方案进行具体展开说明。The above solutions of the embodiments of the present disclosure will be described in detail below.
步骤S101,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;Step S101: Determine the display length information of the first progress view corresponding to the total playing time of the multimedia file;
其中,多媒体文件可以是在线多媒体文件,也可以是本地多媒体文件。播放总时长可以是一个多媒体文件从开始播放到播放完的时间长度。Among them, the multimedia file may be an online multimedia file or a local multimedia file. The total playing time may be the length of time from the beginning of the playing of a multimedia file to the end of playing.
本公开实施例中,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息之前,该方法还包括:In the embodiment of the present disclosure, before determining the display length information of the first progress view corresponding to the total playing time of the multimedia file, the method further includes:
根据多媒体播放器的尺寸信息或者播放多媒体文件的终端设备的尺寸信息确定第一进度视图的显示长度信息,并将多媒体文件的播放总时长和第一进度视图的显示长度信息建立对应关系。Determine the display length information of the first progress view according to the size information of the multimedia player or the size information of the terminal device that plays the multimedia file, and establish a correspondence between the total playing time of the multimedia file and the display length information of the first progress view.
在实际应用中,第一进度视图可以为长方形,第一进度视图的显示长度信息可以根据多媒体播放器的显示宽度或者终端设备的显示宽度来确定。另外,还要将多媒体文件的播放总时长和第一进度视图的显示长度信息建立对应关系,使多媒体文件播放过程中的每个时间点与第一进度视图中的各个位置相对应。In practical applications, the first progress view may be a rectangle, and the display length information of the first progress view may be determined according to the display width of the multimedia player or the display width of the terminal device. In addition, it is necessary to establish a corresponding relationship between the total playing time of the multimedia file and the display length information of the first progress view, so that each time point in the multimedia file playing process corresponds to each position in the first progress view.
需要说明的是,第一进度视图的形状不限于长方形,也可以是其他形状,此处不做限定。It should be noted that the shape of the first progress view is not limited to a rectangle, and may also be other shapes, which is not limited here.
步骤S102,在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;Step S102: During the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, determine a second progress corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency Display length information of the view;
在实际应用中,多媒体播放器播放多媒体文件时,随着多媒体文件播放进度的变化,第二进度视图的显示长度也会随之发生变化。本公开通过对多媒体播放器设置计时器,将计时器的刷新频率设置在人眼无法识别的范围,通过计时器的刷新频率来确定多媒体播放器的显示刷新频率,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度。这样,多媒体播放器显示刷新时,进度的变化不 会显示跳变。In practical applications, when a multimedia player plays a multimedia file, as the progress of the multimedia file changes, the display length of the second progress view also changes. The present disclosure sets a timer for the multimedia player, sets the refresh frequency of the timer in a range that cannot be recognized by human eyes, and determines the display refresh frequency of the multimedia player by the refresh frequency of the timer, according to the display refresh frequency of the multimedia player Determine the display length of the second progress view corresponding to the play time progress of the multimedia file at each play time point corresponding to the display refresh frequency and the play progress duration of the multimedia file. In this way, when the multimedia player is refreshed, the progress changes will not show jumps.
本公开实施例中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息之前,该方法还包括:根据终端设备的显示屏的刷新频率确定多媒体播放器的显示刷新频率。In the embodiment of the present disclosure, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, the display length information of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency is determined Previously, the method further includes: determining the display refresh frequency of the multimedia player according to the refresh frequency of the display screen of the terminal device.
在实际应用中,可以根据终端设备的屏幕刷新频率确定计时器的刷新频率,例如,将计时器的刷新频率确定为1秒刷新60次,则多媒体播放器的显示刷新频率为1秒刷新60次,此时,人眼无法识别出进度的跳变。In practical applications, the refresh rate of the timer can be determined according to the screen refresh rate of the terminal device. For example, if the refresh rate of the timer is determined to be 60 refreshes per second, the display refresh rate of the multimedia player is 60 refreshes per second. , At this time, the human eye cannot recognize the progress jump.
需要说明的是,多媒体播放器的显示刷新频率除了确定为1秒刷新60次之外,还可以设置成人眼识别不出跳变的频率范围中的其他值,此处不做限定。It should be noted that, in addition to determining the refresh frequency of the multimedia player to be 60 refreshes per second, other values in the frequency range in which the human eye cannot recognize the jump can also be set, which is not limited here.
本公开实施例中,针对当前的播放时间点,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的当前的播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息,包括:根据显示刷新频率确定每次刷新间隔时间;计算每次刷新间隔时间与当前的播放时间点对应的播放进度时长之和,得到当前的播放时间点处多媒体文件的当前播放时间进度;计算当前播放时间进度占播放总时长的百分比;以及根据百分比和第一进度视图的显示长度信息计算第二进度视图的显示长度信息。In the embodiments of the present disclosure, for the current playback time point, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, it is determined that the display refresh frequency corresponds to the playback time progress of the multimedia file at the current playback time point. The display length information of the second progress view includes: determining each refresh interval according to the display refresh frequency; calculating the sum of each refresh interval and the playback progress duration corresponding to the current playback time point to obtain the multimedia at the current playback time point The current playing time progress of the file; calculating the percentage of the current playing time progress to the total playing time; and calculating the display length information of the second progress view based on the percentage and the display length information of the first progress view.
在一示例中,显示刷新频率为1秒刷新60次,则每次刷新间隔时间为1/60秒,当前播放时间点对应的播放进度为3%,多媒体文件的播放总时长为T,第一进度视图的显示长度为L
1,则第二进度视图的显示长度为
In an example, if the display refresh frequency is 60 refreshes per second, the refresh interval for each refresh is 1/60 second, the playback progress corresponding to the current playback time point is 3%, and the total playback duration of the multimedia file is T. The display length of the progress view is L 1 , then the display length of the second progress view is
本公开实施例中,在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息之前,该方法还包括:确定多媒体文件的初始播放进度时长;以及根据初始播放进度时长确定第二进度视图的初始显示长度信息。In the embodiment of the present disclosure, during the playback of the multimedia file, according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, it is determined that the display refresh frequency corresponds to the playback time progress of the multimedia file at each playback time point. Before the display length information of the second progress view, the method further includes: determining the initial playback progress duration of the multimedia file; and determining the initial display length information of the second progress view according to the initial playback progress duration.
在一示例中,将多媒体文件的初始播放进度设置为1%,也就是说,首次显示播放进度为1%,则第二进度视图的初始显示长度为:L
1·1%,其中,L
1为第一进度视图的显示长度。
In an example, the initial playback progress of the multimedia file is set to 1%, that is, the first display of the playback progress is 1%, and the initial display length of the second progress view is: L 1 ·1%, where L 1 Is the display length of the first progress view.
步骤S103,在显示刷新频率对应的各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。Step S103, at each playback time point corresponding to the display refresh frequency, perform the first progress view and the second progress view on the multimedia player according to the display length information of the first progress view and the display length information of the second progress view Overlay display to display the playback time progress during the playback of multimedia files.
在实际应用中,将第一进度视图和第二进度视图在多媒体播放器的预设位置进行叠加显示,在显示刷新频率对应的各个播放时间点,对应不同的第二进度视图显示长度,从而实现了在多媒体文件的播放过程中,通过两个进度视图的显示长度变化的实时对比,来显示多媒体文件的播放时间进度。In practical applications, the first progress view and the second progress view are superimposed and displayed at the preset position of the multimedia player. At each playback time point corresponding to the display refresh frequency, the display length of the second progress view corresponds to a different display length. In the process of playing the multimedia file, the progress of the playing time of the multimedia file is displayed through the real-time comparison of the display length changes of the two progress views.
在一示例中,首次显示播放进度为1%,显示刷新频率为1秒刷新60次,第二进度视图的显示长度依次为:L
1·1%、
……直到最终多媒体文件播放完成时,第二进度视图的显示长度与第一进度视图的显示长度相同,达到L
1,从而实现实时显示播放时间进度。
In an example, the first display of the playback progress is 1%, the display refresh frequency is 60 refreshes per second, and the display length of the second progress view is: L 1 ·1%, ...Until the final playback of the multimedia file is completed, the display length of the second progress view is the same as the display length of the first progress view, reaching L 1 , thereby realizing real-time display of the playback time progress.
本公开实施例中,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,包括:将第一进度视图及第二进度视图在多媒体播放器上以不同的显示颜色进行叠加显示。In the embodiment of the present disclosure, superimposing the first progress view and the second progress view on the multimedia player includes: superimposing the first progress view and the second progress view on the multimedia player in different display colors .
在一示例中,可以将第一进度视图的显示颜色设置为灰色,第二进度视图的显示颜色设置为白色,在多媒体文件的播放过程中,白色视图的长度随着播放进度缓慢持续变化,长度逐渐变长,直到多媒体文件播放完成,则白色视图的长度达到灰色视图的长度。In an example, the display color of the first progress view can be set to gray, and the display color of the second progress view can be set to white. During the playback of the multimedia file, the length of the white view slowly and continuously changes with the playback progress. Gradually become longer, until the multimedia file is played, the length of the white view reaches the length of the gray view.
需要说明的是,第一进度视图和第二进度的显示颜色出灰色及白色之外,还可以设置其他人眼可区别的两种颜色,此处不做限定。It should be noted that in addition to the gray and white display colors of the first progress view and the second progress view, two colors that can be distinguished by other human eyes can also be set, which is not limited here.
基于与图1中所示方法相同的原理,本公开的实施例中还提供了一种多媒体播放器播放进度显示装置20,如图2所示,该多媒体播放器播放进度显示装置20可以包括:Based on the same principle as the method shown in FIG. 1, an embodiment of the present disclosure also provides a multimedia player playback progress display device 20. As shown in FIG. 2, the multimedia player playback progress display device 20 may include:
第一确定模块201,其用于确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;The first determining module 201 is configured to determine the display length information of the first progress view corresponding to the total playing time of the multimedia file;
第二确定模块202,其用于在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;以及The second determining module 202 is used to determine the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency according to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file during the playback of the multimedia file The display length information of the corresponding second progress view; and
显示模块203,其用于在显示刷新频率对应的各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。The display module 203 is configured to display the first progress view and the second progress view in the multimedia according to the display length information of the first progress view and the display length information of the second progress view at each playback time point corresponding to the display refresh frequency. Superimposed display is performed on the player to display the playback time progress during the playback of the multimedia file.
在本公开实施例的方案中,第一确定模块201用于确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;第二确定模块202用于在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;显示模块203用于在各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。本公开中,由于第二进度视图的显示长度信息是基于显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度来确定的,通过第一进度视图和第二进度视图进行叠加显示,实现了在各个播放时间点处实时显示多媒体文件的播放进度,解决了现有技术中无法实时显示多媒体文件播放进度的问题;同时,通过显示刷新频率来改进播放进度的显示频率,避免了播放进度跳变显示的问题,满足了用户对查看多媒体文件播放进度的实时性和精确性要求。In the solution of the embodiment of the present disclosure, the first determining module 201 is used for determining the display length information of the first progress view corresponding to the total playing time of the multimedia file; the second determining module 202 is used for during the playing of the multimedia file , According to the display refresh frequency of the multimedia player and the playback progress duration of the multimedia file, determine the display length information of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency; the display module 203 uses At each playback time point, according to the display length information of the first progress view and the display length information of the second progress view, the first progress view and the second progress view are superimposed and displayed on the multimedia player to display the multimedia file The progress of the playing time is displayed during the playing process. In the present disclosure, since the display length information of the second progress view is determined based on the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency, the first progress view and the second progress view are superimposed and displayed to achieve It displays the playback progress of multimedia files in real time at each playback time point, and solves the problem that the playback progress of multimedia files cannot be displayed in real time in the prior art; at the same time, the display frequency of the playback progress is improved by the display refresh frequency, and the playback progress is avoided. The problem of variable display satisfies the real-time and accuracy requirements of users for viewing the playback progress of multimedia files.
在本公开实施例中,第二确定模块202用于:In the embodiment of the present disclosure, the second determining module 202 is used to:
根据显示刷新频率确定每次刷新间隔时间;计算每次刷新间隔时间与当前的播放时间点对应的播放进度时长之和,得到当前的播放时间点处多媒体文件的当前播放时间进度;计算当前播放时间进度占播放总时长的百 分比;并且根据百分比和第一进度视图的显示长度信息计算第二进度视图的显示长度信息。Determine each refresh interval according to the display refresh frequency; calculate the sum of each refresh interval and the playback progress duration corresponding to the current playback time point to obtain the current playback time progress of the multimedia file at the current playback time point; calculate the current playback time The percentage of the progress in the total playing duration; and the display length information of the second progress view is calculated according to the percentage and the display length information of the first progress view.
在实际应用中,多媒体播放器播放多媒体文件时,随着多媒体文件播放进度的变化,第二进度视图的显示长度也会随之发生变化。其中,多媒体播放器的播放进度是非线性连续性变化的,是间断点数据,例如,1%,3%,5%,如果按照播放进度确定第二进度视图的显示长度,则用户看到的进度变化是有跳变的,因此,本公开设置了计时器,将计时器的刷新频率设置在人眼无法识别的范围,通过计时器的刷新频率来确定多媒体播放器的显示刷新频率,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度。这样,多媒体播放器显示刷新时,进度的变化不会显示跳变。In practical applications, when a multimedia player plays a multimedia file, as the progress of the multimedia file changes, the display length of the second progress view also changes. Among them, the playback progress of the multimedia player changes in a non-linear and continuous manner, and is discontinuous point data, for example, 1%, 3%, 5%. If the display length of the second progress view is determined according to the playback progress, the user sees the progress Changes are jumpy. Therefore, the present disclosure sets a timer to set the refresh rate of the timer in a range that cannot be recognized by human eyes. The refresh rate of the timer is used to determine the display refresh rate of the multimedia player. The display refresh frequency of the monitor and the playback progress duration of the multimedia file are determined, and the display length of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency is determined. In this way, when the multimedia player is refreshed, the progress changes will not show jumps.
在一示例中,显示刷新频率为1秒刷新60次,则每次刷新间隔时间为1/60秒,当前播放时间点对应的播放进度为3%,多媒体文件的播放总时长为T,第一进度视图的显示长度为L
1,则第二进度视图的显示长度为
In an example, if the display refresh frequency is 60 refreshes per second, the refresh interval for each refresh is 1/60 second, the playback progress corresponding to the current playback time point is 3%, and the total playback duration of the multimedia file is T. The display length of the progress view is L 1 , then the display length of the second progress view is
本公开实施例中,装置还包括第三确定模块,用于根据多媒体播放器的尺寸信息或者播放多媒体文件的终端设备的尺寸信息确定第一进度视图的显示长度信息,并将多媒体文件的播放总时长和第一进度视图的显示长度信息建立对应关系。In the embodiment of the present disclosure, the device further includes a third determining module, configured to determine the display length information of the first progress view according to the size information of the multimedia player or the size information of the terminal device that plays the multimedia file, and to determine the total display length of the multimedia file. The duration and the display length information of the first progress view establish a corresponding relationship.
在实际应用中,第一进度视图可以为长方形,第一进度视图的显示长度信息可以根据多媒体播放器的显示宽度或者终端设备的显示宽度来确定。另外,还要将多媒体文件的播放总时长和第一进度视图的显示长度信息建立对应关系,使多媒体文件播放过程中的每个时间点与第一进度视图中的各个位置相对应。In practical applications, the first progress view may be a rectangle, and the display length information of the first progress view may be determined according to the display width of the multimedia player or the display width of the terminal device. In addition, it is necessary to establish a corresponding relationship between the total playing time of the multimedia file and the display length information of the first progress view, so that each time point in the multimedia file playing process corresponds to each position in the first progress view.
需要说明的是,第一进度视图的形状不限于长方形,也可以是其他形状,此处不做限定。It should be noted that the shape of the first progress view is not limited to a rectangle, and may also be other shapes, which is not limited here.
本公开实施例中,装置还包括第四确定模块,该第四确定模块用于根据终端设备的显示屏的刷新频率确定多媒体播放器的显示刷新频率。In the embodiment of the present disclosure, the device further includes a fourth determining module configured to determine the display refresh frequency of the multimedia player according to the refresh frequency of the display screen of the terminal device.
在实际应用中,可以根据终端设备的屏幕刷新频率确定计时器的刷新频率,例如,将计时器的刷新频率确定为1秒刷新60次,则多媒体播放器的显示刷新频率为1秒刷新60次,此时,人眼无法识别出进度的跳变。In practical applications, the refresh rate of the timer can be determined according to the screen refresh rate of the terminal device. For example, if the refresh rate of the timer is determined to be 60 refreshes per second, the display refresh rate of the multimedia player is 60 refreshes per second. , At this time, the human eye cannot recognize the progress jump.
需要说明的是,多媒体播放器的显示刷新频率除了确定为1秒刷新60次之外,还可以设置成人眼识别不出跳变的频率范围中的其他值,此处不做限定。It should be noted that, in addition to determining the refresh frequency of the multimedia player to be 60 refreshes per second, other values in the frequency range in which the human eye cannot recognize the jump can also be set, which is not limited here.
在一示例中,首次显示播放进度为1%,显示刷新频率为1秒刷新60次,第二进度视图的显示长度依次为:L
1·1%、
……直到最终多媒体文件播放完成时,第二进度视图的显示长度与第一进度视图的显示长度相同,达到L
1,从而实现实时显示播放时间进度。
In an example, the first display of the playback progress is 1%, the display refresh frequency is 60 refreshes per second, and the display length of the second progress view is: L 1 ·1%, ...Until the final playback of the multimedia file is completed, the display length of the second progress view is the same as the display length of the first progress view, reaching L 1 , thereby realizing real-time display of the playback time progress.
本公开实施例中,显示模块203用于将第一进度视图及第二进度视图在多媒体播放器上以不同的显示颜色进行叠加显示。In the embodiment of the present disclosure, the display module 203 is configured to superimpose and display the first progress view and the second progress view in different display colors on the multimedia player.
在一示例中,可以将第一进度视图的显示颜色设置为灰色,第二进度视图的显示颜色设置为白色,在多媒体文件的播放过程中,白色视图的长度随着播放进度缓慢持续变化,长度逐渐变长,直到多媒体文件播放完成,则白色视图的长度达到灰色视图的长度。In an example, the display color of the first progress view can be set to gray, and the display color of the second progress view can be set to white. During the playback of the multimedia file, the length of the white view slowly and continuously changes with the playback progress. Gradually become longer, until the multimedia file is played, the length of the white view reaches the length of the gray view.
本公开实施例中,装置还包括初始确定模块,该初始确定模块用于确定多媒体文件的初始播放进度时长;并且根据初始播放进度时长确定第二进度视图的初始显示长度信息。In the embodiment of the present disclosure, the device further includes an initial determination module configured to determine the initial playback progress duration of the multimedia file; and determine the initial display length information of the second progress view according to the initial playback progress duration.
在一示例中,将多媒体文件的初始播放进度设置为1%,也就是说,首次显示播放进度为1%,则第二进度视图的初始显示长度为:L
1·1%,其中,L
1为第一进度视图的显示长度。
In an example, the initial playback progress of the multimedia file is set to 1%, that is, the first display of the playback progress is 1%, and the initial display length of the second progress view is: L 1 ·1%, where L 1 Is the display length of the first progress view.
本公开实施例的多媒体播放器播放进度显示装置可执行本公开的实施例所提供的一种多媒体播放器播放进度显示方法,其实现原理相类似,本公开各实施例中的多媒体播放器播放进度显示装置中的各模块所执行的动作是与本公开各实施例中的多媒体播放器播放进度显示方法中的步骤相对应的,对于多媒体播放器播放进度显示装置的各模块的详细功能描述具体可以参见前文中所示的对应的多媒体播放器播放进度显示方法中 的描述,此处不再赘述。The multimedia player playback progress display device of the embodiments of the present disclosure can perform a multimedia player playback progress display method provided by the embodiments of the present disclosure, and the implementation principles are similar. The multimedia player playback progress in each embodiment of the present disclosure The actions performed by each module in the display device correspond to the steps in the method for displaying the playback progress of a multimedia player in each embodiment of the present disclosure. The detailed function description of each module of the multimedia player playback progress display device can be specifically Refer to the description in the corresponding multimedia player playback progress display method shown in the foregoing, which will not be repeated here.
基于与本公开的实施例中的多媒体播放器播放进度显示方法相同的原理,本公开的实施例中还提供了一种电子设备,该电子设备可以包括但不限于一个或多个处理器;存储器;一个或多个应用程序,其中一个或多个应用程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个程序配置用于:执行如本公开实施例的多媒体播放器播放进度显示方法对应的操作。Based on the same principle as the multimedia player playback progress display method in the embodiments of the present disclosure, the embodiments of the present disclosure also provide an electronic device, which may include but is not limited to one or more processors; One or more application programs, one or more application programs are stored in the memory and configured to be executed by one or more processors, and one or more programs are configured to: execute multimedia as the embodiments of the present disclosure The operation corresponding to the player's playback progress display method.
在本公开实施例的电子设备中,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相对应的第二进度视图的显示长度信息;在各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。本公开中,由于第二进度视图的显示长度信息是基于显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度来确定的,通过第一进度视图和第二进度视图进行叠加显示,实现了在各个播放时间点处实时显示多媒体文件的播放进度,解决了现有技术中无法实时显示多媒体文件播放进度的问题;同时,通过显示刷新频率来改进播放进度的显示频率,避免了播放进度跳变显示的问题,满足了用户对查看多媒体文件播放进度的实时性和精确性要求。In the electronic device of the embodiment of the present disclosure, the display length information of the first progress view corresponding to the total playing time of the multimedia file is determined; during the playing of the multimedia file, according to the display refresh frequency of the multimedia player and the multimedia file Play progress duration, determine the display length information of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency; at each playback time point, according to the display length information of the first progress view and For the display length information of the second progress view, the first progress view and the second progress view are superimposed and displayed on the multimedia player to display the playback time progress during the playback of the multimedia file. In the present disclosure, since the display length information of the second progress view is determined based on the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency, the first progress view and the second progress view are superimposed and displayed to achieve It displays the playback progress of multimedia files in real time at each playback time point, and solves the problem that the playback progress of multimedia files cannot be displayed in real time in the prior art; at the same time, the display frequency of the playback progress is improved through the display refresh frequency, and the playback progress skip The problem of variable display satisfies the real-time and accuracy requirements of users for viewing the playback progress of multimedia files.
基于与本公开的实施例中的多媒体文件播放进度显示方法相同的原理,本公开的实施例中还提供了一种计算机可读存储介质,计算机可读存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机可以执行如本公开实施例所示的多媒体播放器播放进度显示方法。Based on the same principle as the multimedia file playback progress display method in the embodiment of the present disclosure, the embodiment of the present disclosure also provides a computer-readable storage medium. The computer-readable storage medium is used to store computer instructions. When running on the computer, the computer can execute the method for displaying the playback progress of the multimedia player as shown in the embodiment of the present disclosure.
在本公开实施例的计算机可读存储介质中,确定与多媒体文件的播放总时长相对应的第一进度视图的显示长度信息;在多媒体文件的播放过程中,根据多媒体播放器的显示刷新频率和多媒体文件的播放进度时长,确定显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度相 对应的第二进度视图的显示长度信息;在各个播放时间点处,根据第一进度视图的显示长度信息和第二进度视图的显示长度信息,将第一进度视图及第二进度视图在多媒体播放器上进行叠加显示,以在多媒体文件的播放过程中显示播放时间进度。本公开中,由于第二进度视图的显示长度信息是基于显示刷新频率对应的各个播放时间点处多媒体文件的播放时间进度来确定的,通过第一进度视图和第二进度视图进行叠加显示,实现了在各个播放时间点处实时显示多媒体文件的播放进度,解决了现有技术中无法实时显示多媒体文件播放进度的问题;同时,通过显示刷新频率来改进播放进度的显示频率,避免了播放进度跳变显示的问题,满足了用户对查看多媒体文件播放进度的实时性和精确性要求。In the computer-readable storage medium of the embodiment of the present disclosure, the display length information of the first progress view corresponding to the total playing time of the multimedia file is determined; during the playing of the multimedia file, according to the display refresh frequency of the multimedia player and The playback progress time of the multimedia file is determined by the display length information of the second progress view corresponding to the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency; at each playback time point, according to the display of the first progress view The length information and the display length information of the second progress view are superimposed and displayed on the multimedia player to display the playback time progress during the playback of the multimedia file. In the present disclosure, since the display length information of the second progress view is determined based on the playback time progress of the multimedia file at each playback time point corresponding to the display refresh frequency, the first progress view and the second progress view are superimposed and displayed to achieve It displays the playback progress of multimedia files in real time at each playback time point, and solves the problem that the playback progress of multimedia files cannot be displayed in real time in the prior art; at the same time, the display frequency of the playback progress is improved by the display refresh frequency, and the playback progress is avoided. The problem of variable display satisfies the real-time and accuracy requirements of users for viewing the playback progress of multimedia files.
下面参考图3,其示出了适于用来实现本公开实施例的电子设备(例如图1中的终端设备或服务器)300的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图3示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。3, which shows a schematic structural diagram of an electronic device (such as the terminal device or the server in FIG. 1) 300 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG. 3 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图3所示,电子设备300可以包括处理装置(例如中央处理器、图形处理器等)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储装置308加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM 303中,还存储有电子设备300操作所需的各种程序和数据。处理装置301、ROM 302以及RAM 303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG. 3, the electronic device 300 may include a processing device (such as a central processing unit, a graphics processor, etc.) 301, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 302 or from a storage device 308 The program in the memory (RAM) 303 executes various appropriate actions and processing. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to the bus 304.
通常,以下装置可以连接至I/O接口305:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置306;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置307;包括例如磁带、硬盘等的存储装置308;以及通信装置309。通信装置309可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图3示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或 具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 305: including input devices 306 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, vibration An output device 307 such as a device; a storage device 308 such as a magnetic tape and a hard disk; and a communication device 309. The communication device 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. Although FIG. 3 shows an electronic device 300 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置309从网络上被下载和安装,或者从存储装置308被安装,或者从ROM302被安装。在该计算机程序被处理装置301执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个 程序被该电子设备执行时,使得该电子设备:获取至少两个网际协议地址;向节点评价设备发送包括所述至少两个网际协议地址的节点评价请求,其中,所述节点评价设备从所述至少两个网际协议地址中,选取网际协议地址并返回;接收所述节点评价设备返回的网际协议地址;其中,所获取的网际协议地址指示内容分发网络中的边缘节点。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains at least two Internet protocol addresses; and sends to the node evaluation device including the at least two A node evaluation request for an Internet Protocol address, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein, the obtained The Internet Protocol address indicates the edge node in the content distribution network.
或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收包括至少两个网际协议地址的节点评价请求;从所述至少两个网际协议地址中,选取网际协议地址;返回选取出的网际协议地址;其中,接收到的网际协议地址指示内容分发网络中的边缘节点。Alternatively, the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; Among the at least two Internet Protocol addresses, select an Internet Protocol address; return the selected Internet Protocol address; wherein, the received Internet Protocol address indicates an edge node in the content distribution network.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof. The above-mentioned programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user’s computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合 来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。The units involved in the embodiments described in the present disclosure may be implemented in a software manner, or may be implemented in a hardware manner. Wherein, the name of the unit does not constitute a limitation on the unit itself under certain circumstances. For example, the first obtaining unit can also be described as "a unit for obtaining at least two Internet Protocol addresses."
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover the above technical features or technical solutions without departing from the above disclosed concept. Other technical solutions formed by any combination of its equivalent features. For example, the above-mentioned features and the technical features disclosed in the present disclosure (but not limited to) with similar functions are mutually replaced to form a technical solution.