Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings.
For ease of understanding, the definitions of terms used in this application are given first as follows:
(1) the width and height of the picture are as follows: refers to the width and height of the original frame of the media itself, and is usually one of the attributes of the media.
(2) Media duration: is one of the attributes of the media, and refers to the total duration of the media from the beginning to the end of the playing.
(3) And (4) live broadcast: in this application, if the playing is resumed after the playing is paused, the playing picture is not the content during the pause but the content of the program that is actually being played currently, that is, the viewer cannot watch the playing content during the time from the pause to the resume of the live broadcast.
Referring to fig. 1, in one embodiment, the on-demand system includes an on-demand terminal 110, a local area network 120, and the internet 130. In embodiments in which on-demand terminal 110 is in communication with local area network 120, and in embodiments in which local area network 120 is in communication with internet 130, other communication schemes may be used in other embodiments. On-demand terminal 110 includes a transmission control module 111, a player backend 112, a storage module 113, and a user interaction interface 114. The transmission control module 111, the storage module 113, and the function modules included in the player background 112 may be implemented by referring to corresponding function modules in a common on-demand terminal, which is not limited herein.
The player backend 112 communicates with the user interaction interface 114 through a play interface. The user interaction interface of the present embodiment is shown in fig. 2, and includes: an interactive interface 201 and a play control apparatus 202. The following describes the playback control apparatus by way of several embodiments.
Example 1:
as shown in fig. 3, the playback control apparatus 30 includes: a receiving minimization command module 301, a playing judgment module 302 and a minimization execution module 303.
The minimize instruction receiving module 301 is configured to receive an instruction input by a user, and determine whether the instruction is an instruction for minimizing a play window. Specifically, a unique number is correspondingly set for the window message (i.e., the user control command), the number corresponding to the command for minimizing the playing window is set as a target, and the command for minimizing the playing window is considered to be received when the number is detected.
The playing determining module 302 is configured to determine a currently playing media type when it is determined that the instruction for minimizing the playing window is received. Specifically, when the type of the currently played media is determined, first, whether the width and height of the currently played media is zero is determined, if the width and height of the currently played media is zero, the currently played media type is determined to be an audio, and a determination result is fed back to the minimization execution module; if the width and height of the picture are not zero, judging whether the media time length is zero, if the media time length is zero, judging that the currently played media type is a static picture, and feeding back a judgment result to the minimization execution module; if the media duration is not zero and is infinite, judging that the currently played media type is a live video, and feeding back a judgment result to the minimization execution module; if the media time length is not zero and is not infinite, the currently played media type is judged to be a non-live video or a dynamic picture, and the judgment result is fed back to the minimization execution module.
The minimization executing module 303 is configured to execute an instruction related to minimizing the playing window according to the determination result and the playing state, where the instruction includes an instruction to directly minimize the playing window, or an instruction to pause playing before minimizing the playing window. Specifically, the instruction of directly minimizing the playing window is executed for the media which are judged to be audio or static pictures or live video; and judging whether the playing state of the media judged as the dynamic pictures or the non-live video is in pause or playing, if the playing state is in pause, executing an instruction for directly minimizing the playing window, and if the playing state is in playing, pausing the playing and then executing an instruction for minimizing the playing window. Of course, considering that there is no pause function in some moving picture media, an instruction to directly minimize the play window is executed for such moving picture media.
Example 2:
as also shown in fig. 3, the playback control apparatus 30 includes a reception resume instruction module 304 and a resume judgment module 305 in addition to the reception minimize instruction module 301, the playback judgment module 302, and the minimization execution module 303 which are the same as those of embodiment 1.
The receiving and restoring instruction module 304 is configured to receive an instruction input by a user, and determine whether the instruction is an instruction for restoring the playing window. Specifically, similar to the receive minimization command module 301, a number corresponding to the command to resume the playing window is set as a target, and when the number is detected, the command to resume the playing window is considered to be received.
The resuming module 305 is configured to execute an instruction related to resuming the playing window according to the determination result and the playing status of the playing determining module when it is determined that the instruction for resuming the playing window is received, where the instruction includes an instruction for directly resuming the playing window, or an instruction for resuming the playing window and then resuming the playing. Specifically, the similar minimization executing module 303 executes an instruction for directly restoring the playing window for the media of audio or still pictures or live video; and judging whether the playing state before the minimized playing window is in pause or playing for the media judged to be the dynamic pictures or the non-live videos, if the playing state before the minimized playing window is in pause, executing an instruction of directly restoring the playing window, and if the playing state before the minimized playing window is in playing, executing the instruction of restoring the playing window and then restoring the playing. Of course, considering that some moving picture media have no pause function, it is sufficient to execute an instruction to directly resume the play window for such moving picture media.
Example 3:
as also shown in fig. 3, the playback control apparatus 30 includes, in addition to the reception minimization instruction module 301, the playback judgment module 302, the minimization execution module 303, the reception resumption instruction module 304, and the resumption judgment module 305, which are the same as those in embodiment 2, an active window detection module 306 for detecting whether or not a message indicating that a playback window has entered an inactive state, which means that the window has been changed from the active state to the inactive state, has occurred, and if so, executing an instruction to pause playback. Specifically, when there are other side-by-side task windows except for the player playing window on the screen, the active window detection module detects whether there is a message that the playing window enters an inactive state, that is, the current cursor focus is no longer on the playing window, if so, it means that the user may leave the current playing window to go to process the transaction of other side-by-side windows, at this time, although the user does not minimize the playing window, the similar method as in embodiment 1 or embodiment 2 is also adopted, that is, for the video media determined as being dynamic picture media (having pause function) or not being live broadcast, the playing window is paused, so that the user can be involved in the processing of other transactions, and meanwhile, if the active window detection module detects the message that the playing window resumes the active state, the playing is resumed in the similar manner as in embodiment 1 or embodiment 2, that is for the dynamic picture media determined as being paused or not being live broadcast, the playing window is resumed, so that the user can enjoy the coherent scenario.
In the foregoing embodiments 1 and 2, when implemented, an option such as "pause automatically when minimized" may be set in a menu of a player, if the option is selected in advance, in the playing process, as long as a playing window of the player is minimized, the currently played media is paused automatically, and a user cannot watch the media when the playing window is minimized, and the pause at this time does not need to worry about a continuity problem of a scenario for a user going to handle other transactions, thereby improving user experience. Similarly, the implementation of embodiment 3 may also set an option in the menu of the player, such as "automatically pause when the window enters the inactive state", and similarly, if the option is selected in advance, during the playing process, once the screen focus is not on the playing window, the playing window automatically pauses the playing, and the pause at this time does not need to worry about the continuity problem of the scenario for the user going to process other transactions, and also improves the user experience.
Based on the above embodiment of the play control device, the present application also provides a play control method. In one embodiment, the method comprises the steps of:
step S1, receiving a minimization command, namely receiving a command input by a user and judging whether the command is a command for minimizing a playing window;
step S2, a playing judgment step, namely judging the type of the currently played media when the command of minimizing the playing window is received;
step S3, a minimization executing step, which is to execute an instruction related to the minimized playing window according to the judgment result and the playing status, where the instruction related to the minimized playing window includes an instruction to directly minimize the playing window, or an instruction to pause the playing first and then minimize the playing window.
In another embodiment, the method further includes, in addition to the steps S1-S3:
step S4, receiving a restoring instruction, namely receiving an instruction input by a user and judging whether the instruction is an instruction for restoring the playing window;
step S5, a resuming step, which is to execute the command related to resuming the playing window according to the judgment result of the playing judging step S2 and the playing state of step S3 when the command of resuming the playing window is confirmed to be received, where the command related to resuming the playing window includes a command of resuming the playing window directly or a command of resuming the playing window first and then resuming the playing.
In another embodiment, the method further includes, in addition to the steps S1-S5:
step S6, an active window detecting step, i.e. detecting whether a message that the playing window enters into the inactive state appears, if so, executing the instruction of pausing the playing.
The specific process of the embodiment of the playing control method may refer to the implementation process of each module in the playing control device, and is not repeated here.
For the playing control method or device and the player using the method or device, in the playing process, as long as the playing window is minimized or the playing window enters an inactive state (the user goes to process other task windows side by side), the video playing can be automatically paused without worrying about the continuity problem of the scenario. The user would not be able to view the video when the player is minimized, at which time pausing is a good experience for the user, and in the case of side-by-side windows the user can concentrate on the processing of other transactions while still enjoying the coherent scenario when returning.
The above-described embodiments of the present invention are further described below by way of an example.
Example (c):
the video on demand terminal comprises a transmission control module, a storage module, a player and a user interaction interface. The transmission control module, the storage module, and the function module included in the player may be implemented by referring to a corresponding function module in a common on-demand terminal, which is not limited herein. The user interaction interface comprises an interaction interface used for transmitting a user control instruction with the playing interface so that the playing controller can execute corresponding actions (such as minimization, maximization, restoration and the like) on the player according to the user instruction; the window control module is used for receiving a control instruction input by a user and preprocessing (such as filtering, screening and the like) the instruction; and the play logic control module is used for carrying out related control (such as play pause, resume, fast forward/rewind and the like) on the content of the play window according to the user instruction transmitted by the window control module.
The window control module comprises a window message filtering unit used for filtering window messages (namely user control instructions), each window message corresponds to a unique number, the number corresponding to the minimized message is set as a mark, and the window message filtering unit considers that the minimized operation instruction is received when detecting the number.
After confirming that the minimum operation instruction is received, the media type judging unit judges the media type played currently, specifically, the media type judging unit judges the media type by detecting the width and the height of the current picture, if the width and the height of the picture are zero, the currently played audio is judged, the judgment result is fed back to the playing logic control module, and the playing logic control module informs the player end to execute the minimum instruction through an interactive interface; if the width and height of the picture are not zero, the media time is judged, if the time is zero, the currently played picture is judged to be a static picture, the playing logic control module informs the player end to be directly minimized according to the feedback result, if the time is not zero, the media is judged to be a video or a dynamic picture, the playing content judgment unit judges whether the currently played picture is live broadcast or not, the specific judgment is realized by detecting the playing time, if the playing time is a infinite value, the currently played picture is judged to be live broadcast, and if the playing time is a finite positive value, the currently played picture is not live broadcast or dynamic picture. If the current live broadcast is the live broadcast, the judgment result is fed back to the play logic control module, and then the player end is informed to carry out minimization processing through the interactive interface without pause; if the current playing state is not the live broadcast or the dynamic picture, the playing state judging unit continues to judge whether the current playing is currently playing or paused, and the playing controller informs the state of the interactive interface of the user through the playing interface when the playing state changes, so that the playing state judging unit in the embodiment can directly know the current playing state from the interface. If the player is playing, the playing logic control module firstly suspends playing according to the feedback result and then informs the player end of minimization through the interface; if the current pause is already, the player end is informed to directly minimize.
Similarly, after the window recovery message is filtered, the specific situation of the window recovery is determined according to a series of judgments during minimization, for example, if the originally played audio or video live broadcast or still picture is the audio or video live broadcast, the window is directly recovered; if the originally played non-live video or dynamic picture is played, restoring the window and then restoring the playing state, because the restoring of the window needs a process of transferring the background program to the foreground, and the operating system needs a certain time for task scheduling and optimization; if the original state is the pause state, the pause state recovery window is still kept.
When other parallel task windows except the player exist on the screen, the window message filtering unit detects whether a playing window enters an inactive state message, if so, the user leaves the current player window to transfer to process the affairs of other parallel task windows, and at the moment, the player window is not minimized and is also paused, so that the user can concentrate on the processing of other affairs, and meanwhile, the playing is resumed when the player window (the window resumes an active state), and the user can enjoy a coherent plot. For the other process steps in this embodiment, reference is made to the above description, which is not repeated herein.
According to the method and the device, whether the command of minimizing the playing window is executed or not is determined by judging the type of the currently played media, the video playing is automatically paused when the player is minimized in the playing process, and a user does not need to worry about the continuity of the scenario, so that the user experience is improved.
The foregoing is a more detailed description of the present application in connection with specific embodiments thereof, and it is not intended that the present application be limited to the specific embodiments thereof. It will be apparent to those skilled in the art from this disclosure that many more simple derivations or substitutions can be made without departing from the spirit of the disclosure.