Detailed Description
In order to make the technical problems solved, technical solutions adopted and technical effects achieved by the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described in further detail below with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments, but not all embodiments, of the embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present disclosure, belong to the protection scope of the embodiments of the present disclosure.
It should be noted that the terms "system" and "network" are often used interchangeably in the embodiments of the present disclosure. Reference to "and/or" in embodiments of the present disclosure is intended to "include any and all combinations of one or more of the associated listed items. The terms "first", "second", and the like in the description and claims of the present disclosure and in the drawings are used for distinguishing between different objects and not for limiting a particular order.
It should also be noted that, in the embodiments of the present disclosure, each of the following embodiments may be executed alone, or may be executed in combination with each other, and the embodiments of the present disclosure are not limited specifically.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The technical solutions of the embodiments of the present disclosure are further described by the following detailed description in conjunction with the accompanying drawings.
Fig. 1 shows a flowchart of a method for controlling video playing according to an embodiment of the present disclosure, where this embodiment is applicable to displaying an animation situation of automatically switching to a next video when a detail page is completely played and a list page is returned, and this method may be executed by a control device for video playing configured in an electronic device, as shown in fig. 1, the method for controlling video playing according to this embodiment includes:
in step S110, a close detail page instruction is received.
Wherein the detail page is used for displaying one video playing window in a list page, and the list page is used for displaying a plurality of video playing windows.
The list page may be implemented by a circular view component for displaying the list, such as a RecycleView component in the case of an android operating system.
The close detail page instruction is used for instructing the system to return to the list page, and may be, for example, an exit page instruction received through the detail page, or a trigger instruction received through a return control of the electronic device. The specific form can be sent by a user through a physical interface of the electronic equipment, or sent by the user through a setting interface of the system.
In step S120, a jump is made from the detail page to the list page.
I.e. changing the active status of said detail page and said list page, and closing the view after the resource is released by the detail page and informing the list page, the process of closing the view by the detail page can add animation to add visual effect, for example, exit animation of said detail page can be played.
The list page requests to return to the active state to obtain user focus (e.g., execute the callback function onResume) after receiving notification of the detail page, and when the system control detail page returns to the active state, the detail page view is closed.
In step S130, if the player has finished playing the corresponding video on the detail page and the current state of the list page is an active state, playing an animation of the list page for switching to a next video.
The method can be used for automatically playing the scene of the next video after one video is played when a plurality of video playing windows are displayed through the list page to play the videos.
And if the detail page is determined to have played the corresponding video, determining that the next video needs to be automatically switched after the list page is returned. Whether the detail page has the exit animation or not, if the current state of the list page is the active state, the detail page view is determined to be closed, and the animation of the list page for switching the next video is played without any interference from the detail page, such as the interference of playing the detail page exit animation.
According to the technical scheme, after the instruction of closing the detail page is received, after the fact that the corresponding video is played on the detail page is determined, and the current state of the list page is the active state, the animation of the list page for switching the next video is played, so that the situation that the fact that the detail page quit animation is possibly overlapped with the video switching animation of the list page can be avoided, and a user sometimes sees the overlapped animation and cannot see the normal animation for automatically switching the next video can be avoided.
Fig. 2 is a flowchart illustrating another control method for video playing according to an embodiment of the present disclosure, which may be combined with the foregoing embodiments. As shown in fig. 2, the method for controlling video playing according to this embodiment includes:
in step S210, the first active interface corresponding to the detail page receives the close detail page instruction.
The Activity interface is an application component for providing a screen that a user can interact with to complete a task, such as an Activity component in an android operating system.
In step S220, if the player has finished playing the corresponding video on the detail page, the first active interface releases the player and notifies a second active interface corresponding to the list page.
In an embodiment, for an active interface, if the active interface in the active state is closed or jumped, the lower active interface may be notified to switch to the active state. For an application that uses a list page to display multiple video playing windows to play videos, if the current video is completely played on the detail page, the list page needs to play the next video. In one embodiment, when a user clicks a close button or a system return key, the detail page executes actions of pausing, stopping and destroying and notifies a second activity interface corresponding to the list page, and when the first activity interface is destroyed, the playable interface exits from the animation. It should be noted that, for an Activity component, when the Activity component is destroyed, the Activity component itself will exit the animation, if the detail page is realized by the Activity component, the Activity component itself will be played when the detail page exits, and no additional exit animation needs to be added.
In step S230, when the player has finished playing the corresponding video on the detail page and the current state of the second active interface is an active state, the second active interface plays an animation of the list page for switching to a next video.
Because in step S220, the exiting animation for playing the detail page is executed by the first active interface, and in step S230, the animation for switching to the next video for playing the list page is executed by the second active interface, both belong to parallel active entities, and the order of the two active interfaces cannot be guaranteed, in order to prevent overlapping with the exiting animation described in the previous step, it is necessary to control the list page to wait until the list page returns to the foreground (for example, an onResume callback in an android system), and then perform the operation for switching to the next video.
Further, if the player has finished playing the corresponding video on the detail page, the first active interface releases the player, and notifies a second active interface corresponding to the list page that the corresponding video has been played on the second active interface corresponding to the list page.
Generally, in the prior art, since the timing of playing the animation for switching the next video is not considered, the information whether the corresponding video has been played back is not used by the second activity interface corresponding to the list page.
In the technical solution of this embodiment, in this step, a timing for playing an animation for switching to a next video needs to be determined according to the information of whether the corresponding video has been played completely and the state of the second active interface corresponding to the list page, and the information of whether the corresponding video has been played completely is obtained according to a global variable for recording state information of video playing, or may be obtained by calculation according to other information.
If the first activity interface notifies the second activity interface, the information that the corresponding video has been played is added, so that the information acquisition efficiency of the second activity page can be reduced, and the response speed of the second activity page can be improved.
According to the technical scheme of the embodiment of the disclosure, by taking the case that the detail page and the list page respectively adopt the active interfaces, when the player has already played the corresponding video on the detail page through the second active interface corresponding to the list page, and the current state of the second active interface is the active state, the second active interface plays the animation of the list page for switching the next video, so that the animation of the next video can be normally displayed and automatically switched, and the situation that the animation is overlapped with the exit animation of the detail page can be avoided.
As an implementation of the methods shown in the above figures, the present application provides an embodiment of a control apparatus for video playback, and fig. 3 illustrates a schematic structural diagram of a control apparatus for video playback provided in this embodiment, where the embodiment of the apparatus corresponds to the embodiment of the methods shown in fig. 1 and fig. 2, and the apparatus may be applied to various electronic devices. As shown in fig. 3, the control apparatus for video playback according to the present embodiment includes aninstruction receiving unit 310, apage jump unit 320, and ananimation playback unit 330.
Theinstruction receiving unit 310 is configured to receive a close detail page instruction.
Wherein the detail page is used for displaying one video playing window in a list page, and the list page is used for displaying a plurality of video playing windows.
Thepage jump unit 320 is configured to jump from the detail page to the list page.
Theanimation playing unit 330 is configured to play the animation of the list page for switching to the next video if the player has finished playing the corresponding video on the detail page and the current state of the list page is the active state.
Further, the close detail page instruction comprises an exit page instruction received through the detail page and a trigger instruction received through a return control of the electronic device.
Further, thepage jump unit 320 is also configured to play an exit animation of the detail page.
For example, the device is used for an android operating system, and the functions of each unit module are as follows:
theinstruction receiving unit 310 is configured to receive the close detail page instruction for the first active interface corresponding to the detail page.
Thepage jump unit 320 is configured to, if the player has finished playing the corresponding video on the detail page, the first active interface releases the player, and notifies a second active interface corresponding to the list page, and plays an exit animation of the detail page.
Theanimation playing unit 330 is configured to, when the player has finished playing the corresponding video on the detail page and the current state of the second active interface is an active state, play an animation of the list page for switching to a next video by the second active interface.
Further, theanimation playing unit 330 is configured to release the player from the first active interface and notify the list page of an exit animation of the detail page before or after the corresponding second active interface.
Further, thepage jumping unit 320 is further configured to notify the second active interface corresponding to the list page that the corresponding video has been played.
Further, the list page is implemented by a looping view component for displaying a list.
Further, the apparatus is configured to immersive play the plurality of videos through the list page.
The control device for video playing provided by the embodiment can execute the control method for video playing provided by the method embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
Referring now to FIG. 4, a block diagram of anelectronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4,electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from astorage device 408 into a Random Access Memory (RAM) 403. In theRAM 403, various programs and data necessary for the operation of theelectronic apparatus 400 are also stored. Theprocessing device 401, theROM 402, and theRAM 403 are connected to each other via abus 404. An input/output (I/O)interface 405 is also connected tobus 404.
Generally, the following devices may be connected to the I/O interface 405:input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; anoutput device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like;storage 408 including, for example, tape, hard disk, etc.; and acommunication device 409. The communication means 409 may allow theelectronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates anelectronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via thecommunication device 409, or from thestorage device 408, or from theROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by theprocessing device 401.
It should be noted that the computer readable medium described above in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the disclosed embodiments, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the disclosed embodiments, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
receiving a close detail page instruction, wherein the detail page is used for displaying one video playing window in a list page, and the list page is used for displaying a plurality of video playing windows;
jumping from the detail page to the list page;
and if the player finishes playing the corresponding video on the detail page and the current state of the list page is an active state, playing the animation of the list page for switching the next video.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
According to one or more embodiments of the present disclosure, in the control method for video playing, the instruction for closing the detail page includes an instruction for exiting the page received through the detail page, and a trigger instruction received through a return control of the electronic device.
In accordance with one or more embodiments of the present disclosure, jumping from the detail page to the list page in the method includes playing an exit animation of the detail page.
According to one or more embodiments of the present disclosure, the method is used for an android operating system;
receiving a close detail page instruction includes: a first activity interface corresponding to the detail page receives the instruction for closing the detail page;
jumping from the details page to the list page comprises: if the player finishes playing the corresponding video on the detail page, the first active interface releases the player, and notifies a second active interface corresponding to the list page and plays an exit animation of the detail page;
if the player has finished playing the corresponding video on the detail page and the current state of the list page is an active state, playing the animation of the list page for switching to the next video includes: and when the player finishes playing the corresponding video on the detail page and the current state of the second active interface is an active state, the second active interface plays the animation of the list page for switching the next video.
According to one or more embodiments of the present disclosure, the first active interface releases the player and notifies a second active interface corresponding to the list page of a previous or subsequent exit animation for playing the detail page.
According to one or more embodiments of the present disclosure, notifying the second activity interface corresponding to the list page further includes: and informing a second activity interface corresponding to the list page that the corresponding video is played.
In accordance with one or more embodiments of the present disclosure, the list page is implemented by a looping view component for displaying a list.
According to one or more embodiments of the present disclosure, the method is for immersive playing of the plurality of videos through the list page.
According to one or more embodiments of the present disclosure, in the control apparatus for video playing, the instruction to close the detail page includes an exit page instruction received through the detail page, and a trigger instruction received through a return control of the electronic device.
According to one or more embodiments of the present disclosure, the page jump unit is further configured to play an exit animation of the detail page.
According to one or more embodiments of the present disclosure, the apparatus is for an android operating system;
the instruction receiving unit is used for: a first activity interface corresponding to the detail page receives the instruction for closing the detail page;
the page jump unit is used for: if the player finishes playing the corresponding video on the detail page, the first active interface releases the player, and notifies a second active interface corresponding to the list page and plays an exit animation of the detail page;
the animation playing unit is used for: and when the player finishes playing the corresponding video on the detail page and the current state of the second active interface is an active state, the second active interface plays the animation of the list page for switching the next video.
According to one or more embodiments of the present disclosure, the animation playing unit is configured to play the exit animation of the detail page before or after the first active interface releases the player and notifies the second active interface corresponding to the list page.
According to one or more embodiments of the present disclosure, the page jump unit is further configured to: and informing a second activity interface corresponding to the list page that the corresponding video is played.
In accordance with one or more embodiments of the present disclosure, the list page is implemented by a looping view component for displaying a list.
According to one or more embodiments of the present disclosure, the apparatus is configured to play the plurality of videos immersive through the list page.
The foregoing description is only a preferred embodiment of the disclosed embodiments and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the present disclosure is not limited to the particular combination of the above-described features, but also encompasses other embodiments in which any combination of the above-described features or their equivalents is possible without departing from the scope of the present disclosure. For example, the above features and (but not limited to) the features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.