Some application programs involve the playback of media resources, such as video and/or audio sequences. In developing such an application program, a developer typically has a choice between constructing a media player from scratch, or adapting an existing media player to needs of the application, such as by modifying the set of controls presented to a user by the existing media player.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key factors or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
A facility for managing a media player is described. In one example facility, the facility discerns direction from an application program specifying a presentation of media player controls for the media player. Based at least in part on the discerning, the facility causes the media player to be displayed, including a visual user interface for the media player in which media player controls are presented in accordance with the discerned direction.
The inventors note that both constructing a media player for an application from scratch and adapting an existing media player to needs of the application typically involve a substantial amount of coding, at a high level of sophistication. They have recognized this as a disadvantage of conventional approaches to incorporating a media player into an application program.
In response to this recognition, the inventors have conceived and reduced to practice a software and/or hardware facility for, under the control of an application program, programmatically customizing the controls presented by a media player (“the facility”). In some examples, these customized controls are presented in connection with the controlled media player's content area, such as immediately below the content area.
In various examples, the facility enables the application program to customize the controls presented by the media player by calling an API, by providing a modified template—such as a template in the XAML markup language or another markup language, or by using a simplified development tool such as WINJS.
In some examples, the facility and the media player whose controls it customizes are part of an operating system. In such examples, updates to the facility in media player that provide benefits to users of the application can be propagated to users of the application by the operating system's updating mechanism, allowing these users to enjoy benefits of these updates without having to update the application. In various other examples, the media player is updated in various other ways not requiring updating of the application.
In some examples, the facility enables the application program to toggle on and off various controls that have been implemented for the media player. In some examples, the facility enables the application program to specify how controls that have been implemented for the media player are arranged, such as in how many rows they are presented. In some examples, the facility enables the application program to specify a precedence order among the media player's controls, so that when the media player is constrained to a small display area (such as on a device whose total display area is small, or where the media player is using a small portion of a larger display area available on a device), the facility includes the high-precedence controls that fit, and omits the lower-precedence controls, and/or provides a secondary mechanism for the user to access the lower-precedence controls. In some examples, the facility enables the application program to customize the appearance and/or the look and feel of media player controls, such as to make the controls more consistent with the application's visual design, or brands associated with the application. In some examples, the facility enables the application to add additional buttons or controls of other types to the media player, and specify actions to be taken in response to the activation.
In some examples, the facility and the media player whose controls it customizes operate over a range of devices and device types, such as desktop and laptop computers, tablet computers, smartphones, wearables, gaming systems, televisions, virtual reality or augmented reality displays, etc., having a variety of screen sizes, screen aspect ratios, and screen area allocation schemes. In such examples, an application developer can use the facility to specify customization of the media player's controls once, and use the media player customized in this way across the full range of devices and device types on which the facility and the media player operate, in some cases to varying effect across different such device types and/or devices' state.
By behaving in some or all of the ways described above, the facility reduces the amount of effort and expertise needed to implement, as part of an application, a media player whose controls are adapted to the needs of the application. By utilizing a well-optimized media player as the basis of its customizations, the facility can reduce the amount of display space needed by a device to effectively control a media player; reduce processing resources needed to provide for control of a media player; and make certain visual user interfaces more intuitive and time-efficient to use, allowing a device to be powered on for a shorter period of time and consume a lower total amount of electrical energy overall.
Those skilled in the art will appreciate that the acts shown in
It can be seen that, in line 2, the C++ code sets an IsCompact data member to false. An application may use a markup language such as XAML instead to effect this customization, as shown below in Table 2, which similarly sets an IsCompact data member to the value false in line 3.
In some examples, the facility enables the application to toggle the controls that are presented with the media player. For example, relative to the controls shown in
It can be seen that, in line 2, the sample code shown in Table 3 sets a IsSeekBarVisible data member to false in order prevent the seek bar from being displayed. In line 3, an IsPlaybackRateButtonVisible data member is set to true in order to cause the playback rate button to be displayed.
Table 4 below shows corresponding sample XAML code for achieving the same result.
It can be seen that, in line 3, two corresponding data members are set the same way.
In some examples, the facility enables the application to specify a precedence order among media play controls that affects which controls are included with the media player at various display space allocation levels. For example,
Table 5 below contains sample XAML code that can be used by the application to specify the precedence order shown in
It can be seen, for example, that lines 5-9 related to a play/pause button (see line 5), and that line 8 assigns to a DropoutPriority data member for the play/pause button the value 1, which corresponds to priority value 1 in row 601 of
In some examples, the facility provides a device, comprising: a processor configured to execute an application; a media player control customization subsystem configured to receive from the application executed by the processor media player control customization directives; and a display interface configured to cause a display device to display a media player that includes media player controls presented in accordance with media player control customization directives received by the media player control customization subsystem.
In some examples, the facility provides a method in a computing system for managing a media player, the method comprising: discerning direction from an application program specifying a presentation of media player controls for the media player; and based at least in part on the discerning, causing to be displayed a visual user interface for the media player in which media player controls are presented in accordance with the discerned direction.
In some examples, the facility provides a computer-readable medium having contents configured to cause a computing system to, in order to operate in media player: discern direction from an application program specifying a presentation of media player controls for the media player; and based at least in part on the discerning, cause to be displayed the media player including a visual user interface for the media player in which media player controls are presented in accordance with the discerned direction.
It will be appreciated by those skilled in the art that the above-described facility may be straightforwardly adapted or extended in various ways. While the foregoing description makes reference to particular examples, the scope of the invention is defined solely by the claims that follow and the elements recited therein.
This application claims the benefit of U.S. Provisional Application No. 62/131,795, filed on Mar. 11, 2015, which is hereby incorporated by reference in its entirety. In cases in which a document incorporated by reference herein is inconsistent with contents of this application, the contents of this application control.
Number | Date | Country | |
---|---|---|---|
62131795 | Mar 2015 | US |