CN110636355B - Video switching method, device, terminal and storage medium - Google Patents
Video switching method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN110636355B CN110636355B CN201910894392.3A CN201910894392A CN110636355B CN 110636355 B CN110636355 B CN 110636355B CN 201910894392 A CN201910894392 A CN 201910894392A CN 110636355 B CN110636355 B CN 110636355B
- Authority
- CN
- China
- Prior art keywords
- video
- target
- list
- terminal
- switching
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/422—Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
- H04N21/42204—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/482—End-user interface for program selection
- H04N21/4825—End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/488—Data services, e.g. news ticker
- H04N21/4882—Data services, e.g. news ticker for displaying messages, e.g. warnings, reminders
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure relates to a video switching method, a video switching device, a terminal and a storage medium. The method is applied to the terminal and comprises the following steps: acquiring an operation gesture aiming at a display interface of the terminal; determining a target direction of the operation gesture; and when the target direction is detected to be a preset direction, switching the currently played video into the video in the target video list according to a video list switching mode corresponding to the target direction, wherein the video list to which the currently played video belongs and the target video list are different lists. By applying the scheme provided by the disclosure, the problems that the video list switching path is long and the user operation is complicated in the related technology can be solved at least, the path for switching the video list is shortened, the user operation is simplified, and the video watching experience of the user is improved.
Description
Technical Field
The present disclosure relates to the field of video display technologies, and in particular, to a video switching method, an apparatus, a terminal, and a storage medium.
Background
Currently, many users choose to watch videos through various types of video software for entertainment relaxation. In order to facilitate a user to select a video which the user is interested in from a large number of videos, various video software can group the acquired videos from multiple dimensions such as multiple video topics, video authors, video shooting places and the like to obtain multiple video lists. Therefore, the user can select the video which is interested by the user for watching according to the identification of each video list.
For example, from the topic dimension, the user may select a list of videos identified as "cook" to view each of the cooking videos; from the video author dimension, the user may select a list of videos identified as "A" to view various videos captured by video author A, and so on.
When a video list is selected, the user can view each video in the video list. In the related art, a user can switch each video in the video list by sliding a display interface of the terminal, so as to view each video in the video list one by one.
However, in the above related art, when the user wishes to view videos in other video lists, the user needs to exit the currently displayed video playing interface, return to the video list selection interface, and further select another video list in the video list selection interface, and enter the video playing interface again to view each video in the another video list.
Obviously, in the above related art, when a user wants to switch a video playlist, the user needs to perform multiple operations, which results in a long video playlist switching path and cumbersome user operations, resulting in poor video viewing experience of the user.
Disclosure of Invention
The present disclosure provides a video switching method, device, terminal and storage medium, so as to at least solve the problems of long video list switching path and complicated user operation in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a video switching method, which is to be configured as a terminal, including:
acquiring an operation gesture aiming at a display interface of the terminal;
determining a target direction of the operation gesture;
when the target direction is detected to be a preset direction, switching the currently played video into a video in a target video list according to a video list switching mode corresponding to the target direction; wherein the video list to which the currently played video belongs and the target video list are different video lists.
Optionally, in a specific implementation manner, when it is detected that the target direction is a preset direction, switching a currently played video to a target video list according to a video list switching manner corresponding to the target direction includes:
when the target direction is detected to be a preset direction, determining a first distance between a starting point and an end point of the operation gesture in the display interface;
and switching the currently played video into the video in the target video list corresponding to the first distance based on the corresponding relation between the preset distance and the preset video list to be switched.
Optionally, in a specific implementation manner, before the obtaining of the operation gesture for the display interface of the terminal, the method further includes:
setting the nesting relation between each preloaded video and other preloaded videos in each preset direction by using a UIScrollView control;
the switching the currently played video to the video in the target video list corresponding to the first distance based on the corresponding relationship between the preset distance and the preset video list to be switched includes:
determining a plurality of videos corresponding to the currently played video in the target direction based on the nesting relation; wherein the determined plurality of videos belong to different video lists;
and acquiring videos belonging to a target video list from the plurality of determined videos based on the first distance, and switching the currently played video to the acquired video.
Optionally, in a specific implementation manner, when it is detected that the target direction is a preset direction, switching a currently played video to a video in a target video list according to a video list switching manner corresponding to the target direction includes:
when the target direction is detected to be a preset direction, sending the target direction to a server so that the server receives the target direction, determining a target video list corresponding to the target direction according to a first corresponding relation between the preset direction and the video list, and sending the target video list to the terminal;
and receiving the target video list, and switching the currently played video into the video in the target video list.
Optionally, in a specific implementation manner, before the sending the target direction to the server, the method further includes:
determining a second distance between a starting point and an end point of the operation gesture in the display interface;
the sending the target direction to a server includes:
sending the target direction and the second distance to the server so that the server receives the target direction, determining a plurality of video lists corresponding to the target direction according to a second corresponding relation between a preset direction and the video lists, determining a target video list from the plurality of video lists according to a corresponding relation between a preset distance and the video lists, and sending the target video list to the terminal;
and receiving the target video list, and switching the currently played video into the video in the target video list.
Optionally, in a specific implementation manner, the method for acquiring an operation gesture for a display interface of the terminal includes:
and detecting the gesture operation aiming at the display interface of the terminal by utilizing a GesturDedetector class or a SimpleOnGesturListener class.
Optionally, in a specific implementation manner, the step of obtaining an operation gesture for a display interface of the terminal includes:
when the preset operation aiming at the display interface of the terminal is detected, displaying prompt information; wherein the prompt message includes: the preset corresponding relation between the direction of the operation gesture and the video list;
and acquiring an operation gesture aiming at the display interface based on the prompt information.
Optionally, in a specific implementation manner, the step of determining a target direction of the operation gesture includes:
determining a starting point and an end point of the operation gesture on the display interface;
calculating an included angle between a connecting line from the starting point to the end point and the designated direction, and determining a target angle range in which the included angle is located;
and determining the direction corresponding to the target angle range as the target direction of the operation gesture according to the corresponding relation between the preset direction and the angle range.
According to a second aspect of the embodiments of the present disclosure, there is provided a video switching apparatus, to be configured as a terminal, including:
the gesture acquisition module is configured to acquire an operation gesture aiming at a display interface of the terminal;
a direction determination module configured to determine a target direction of the operation gesture;
the video switching module is configured to switch a currently played video to a video in a target video list according to a video list switching mode corresponding to the target direction when the target direction is detected to be a preset direction; wherein the video list of the currently played video and the target video list are different video lists.
Optionally, in a specific implementation manner, the video switching module includes:
a first distance determination submodule configured to determine a first distance between a start point and an end point of the operation gesture in the display interface when the target direction is detected to be a preset direction;
and the first video switching submodule is configured to switch the currently played video to the video in the target video list corresponding to the first distance based on the corresponding relation between the preset distance and the preset video list to be switched.
Optionally, in a specific implementation manner, the apparatus further includes:
the relationship setting module is configured to set a nesting relationship between each preloaded video and other preloaded videos in each preset direction by using a UIScrollView control before the operation gesture for the display interface of the terminal is acquired;
the first video switching sub-module is specifically configured to:
determining a plurality of videos corresponding to the currently played video in the target direction based on the nesting relation; wherein the determined plurality of videos belong to different video lists;
and acquiring videos belonging to a target video list from the plurality of determined videos based on the first distance, and switching the currently played video to the acquired video.
Optionally, in a specific implementation manner, the video switching module includes:
the information sending submodule is configured to send the target direction to a server when the target direction is detected to be a preset direction, so that the server receives the target direction, determine a target video list corresponding to the target direction according to a first corresponding relation between the preset direction and the video list, and send the target video list to the terminal;
and the second video switching sub-module is configured to receive the target video list and switch the currently played video to the video in the target video list.
Optionally, in a specific implementation manner, the apparatus further includes:
a distance determination module configured to determine a second distance between a start point and an end point of the operation gesture in the display interface before the sending of the target direction to a server;
the information sending sub-module is specifically configured to:
sending the target direction and the second distance to the server so that the server receives the target direction, determining a plurality of video lists corresponding to the target direction according to a second corresponding relation between a preset direction and the video lists, determining a target video list from the plurality of video lists according to a corresponding relation between a preset distance and the video lists, and sending the target video list to the terminal;
the second video switching sub-module is specifically configured to:
and receiving the target video list, and switching the currently played video into the video in the target video list.
Optionally, in a specific implementation manner, the gesture obtaining module is specifically configured to:
and detecting the gesture operation aiming at the display interface of the terminal by utilizing a GesturDedetector class or a SimpleOnGesturListener class.
Optionally, in a specific implementation manner, the gesture obtaining module is specifically configured to:
when the preset operation aiming at the display interface of the terminal is detected, displaying prompt information; acquiring an operation gesture aiming at the display interface based on the prompt information; wherein the prompt message includes: and the preset corresponding relation between the direction of the operation gesture and the video list.
Optionally, in a specific implementation manner, the direction determining module is specifically configured to:
determining a starting point and an end point of the operation gesture on the display interface; calculating an included angle between a connecting line from the starting point to the end point and the designated direction, and determining a target angle range in which the included angle is located; and determining the direction corresponding to the target angle range as the target direction of the operation gesture according to the corresponding relation between the preset direction and the angle range.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the steps of any of the video switching methods as provided in the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of a terminal, enable an electronic device to perform the steps of any of the video switching methods as provided by the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product which, when run on a computer, causes the computer to perform the steps of any of the video switching methods as provided by the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
after an operation gesture for a display interface of the terminal is acquired, the terminal may first determine a target direction of the operation gesture, and then detect whether the target direction is a preset direction. Therefore, when the target direction is detected to be the preset direction, the terminal can switch the currently played video to the video in the target video list according to the video list switching mode corresponding to the target direction, and the video list to which the currently played video belongs and the target video list are different video lists. Based on this, by applying the technical scheme provided by the embodiment of the present disclosure, the corresponding relationship between the preset direction of the operation gesture and the video list switching mode can be pre-established, so that in the video playing process, when the operation gesture aiming at the preset direction of the display interface of the terminal is obtained, the currently played video can be switched to the video in the target video list according to the corresponding video list switching mode. Therefore, the video list to which the currently played video belongs and the target video list are different video lists, so that switching between different video lists can be realized. Therefore, when a user wants to watch a video in another video list in the process of watching the video, the user can directly perform gesture operations in different directions on the display interface of the terminal to realize switching of different video lists, so that the path for switching the video lists is shortened, the user operation is simplified, and the video watching experience of the user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flow chart illustrating a video switching method according to an example embodiment.
Fig. 2 is a flowchart of a specific implementation manner of step S13 in the embodiment shown in fig. 1.
Fig. 3 is a flow chart illustrating another video switching method according to an example embodiment.
Fig. 4 is a flowchart of a specific implementation manner of step S22 in the embodiment shown in fig. 2.
Fig. 5 is a flowchart of another specific implementation manner of step S13 in the embodiment shown in fig. 1.
Fig. 6 is a flowchart of another specific implementation manner of step S13 in the embodiment shown in fig. 1.
Fig. 7 is a flowchart of a specific implementation manner of step S12 in the embodiment shown in fig. 1.
Fig. 8 is a block diagram illustrating a video switching apparatus according to an exemplary embodiment.
Fig. 9 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a video switching method according to an exemplary embodiment, where the video switching method is applied to any terminal that needs to perform video switching, for example, a mobile phone, a tablet computer, and the like, and the disclosure is not limited in this respect, and is hereinafter referred to as a terminal for short. As shown in fig. 1, the video switching method includes the following steps.
In step S11, acquiring an operation gesture for a display interface of the terminal;
in step S12, a target direction of the operation gesture is determined;
in step S13, when it is detected that the target direction is the preset direction, switching the currently played video to a video in the target video list according to the video list switching manner corresponding to the target direction;
the video list to which the currently played video belongs and the target video list are different video lists.
It should be noted that different video lists in the present disclosure correspond to different video content dimensions, and the video content dimensions may correspond to publishers or may correspond to video attributes. For example, videos of the same author are included in the video list, videos of the same sharer (corresponding to different authors) are included in the video list, videos of dances are included in the video list, videos of music are included in the video list, and the like.
As can be seen from the above, after the operation gesture for the display interface of the terminal is acquired, the terminal may first determine a target direction of the operation gesture, and then detect whether the target direction is a preset direction. Therefore, when the target direction is detected to be the preset direction, the terminal can switch the currently played video to the video in the target video list according to the video list switching mode corresponding to the target direction, and the video list to which the currently played video belongs and the target video list are different video lists. Based on this, by applying the technical scheme provided by the embodiment of the present disclosure, the corresponding relationship between the preset direction of the operation gesture and the video list switching mode can be pre-established, so that in the video playing process, when the operation gesture aiming at the preset direction of the display interface of the terminal is obtained, the currently played video can be switched to the video in the target video list according to the corresponding video list switching mode. Therefore, the video list to which the currently played video belongs and the target video list are different video lists, so that switching between different video lists can be realized. Therefore, when a user wants to watch a video in another video list in the process of watching the video, the user can directly perform gesture operations in different directions on the display interface of the terminal to realize switching of different video lists, so that the path for switching the video lists is shortened, the user operation is simplified, and the video watching experience of the user is improved.
In the step S11, when the user wants to switch the video list to which the currently viewed video belongs to view data in another video list, an operation gesture may be issued to the display interface of the terminal, and the terminal may further obtain the operation gesture of the user for the display interface of the terminal.
The operation gesture may be a sliding gesture, and the user may send the operation gesture in any area of the display interface of the terminal, or send the operation gesture in a designated area of the display interface of the terminal, which is reasonable.
In this way, after the operation gesture on the display interface of the terminal is acquired, the terminal may determine the target direction of the operation gesture, that is, execute step S12.
The terminal may perform the step S12 in various ways, and the disclosure is not limited in this respect. For example, the terminal may determine a target direction of an operation gesture issued by a user according to a trajectory of the operation gesture in a display interface of the terminal. For clarity, other ways of the terminal to execute the step S12 will be illustrated in the following.
After the target direction of the operation gesture is determined, the terminal may detect whether the target direction is a preset direction, and further, when the target direction is detected to be the preset direction, the above step S13 may be continuously performed, and the currently played video is switched to the video in the target video list according to the video list switching manner corresponding to the target direction, and because the video list to which the currently played video belongs and the target video list are different video lists, switching between different video lists is achieved.
Correspondingly, when the terminal detects that the target direction is not the preset direction, the terminal can continue to play the currently played video without switching the currently played video; or, the terminal may switch the currently played video, and the videos before and after switching belong to the same video list, that is, the terminal switches different videos in the same video list.
For example, the preset direction is horizontal, that is, sliding left and right, and when the target direction of the operation gesture is sliding up, the video list to which the currently played video belongs is switched, and the switched video and the video before switching belong to the same video list.
The terminal may perform the step S13 in various ways, and the disclosure is not limited in this respect.
Optionally, in a specific implementation manner, as shown in fig. 2, the manner in which the terminal executes the step S13 may include the following steps:
s21: when the target direction is detected to be a preset direction, determining a first distance between a starting point and an end point of the operation gesture in the display interface;
s22: and switching the currently played video into the video in the target video list corresponding to the first distance based on the corresponding relation between the preset distance and the preset video list to be switched.
In this specific implementation manner, when it is detected that the target direction of the operation gesture on the display interface of the terminal is the preset direction, the terminal may first determine a first distance between a starting point and an end point of the operation gesture in the display interface of the terminal, and then, according to a corresponding relationship between the preset distance and the preset video list to be switched, switch the currently played video to the video in the target video list corresponding to the first distance. In this way, the terminal can start playing the videos in the target video list.
The terminal may determine the first distance between the starting point and the ending point of the operation gesture in the display interface in various ways, which is not limited in this disclosure. For example, the terminal may determine coordinates of a starting point and an end point of the operation gesture in the display interface, and further determine a first distance between the starting point and the end point of the operation gesture in the display interface through coordinate calculation.
Specifically, for each preset direction, a plurality of video lists corresponding to the preset direction may be preset, and further, the electronic device may preload at least one video in each of the plurality of video lists. And aiming at each preset direction, the plurality of video lists corresponding to the preset direction are the video lists to be switched corresponding to the preset direction. Further, each preset direction may correspond to a plurality of to-be-switched video lists, and therefore, a corresponding relationship between the distance and the to-be-switched video list may also be preset.
In this way, when it is detected that the target direction of the operation gesture on the display interface of the terminal is the preset direction and the first distance between the starting point and the end point of the operation gesture in the display interface of the terminal is determined, the terminal can determine a plurality of to-be-switched video lists corresponding to the target direction and determine a target video list corresponding to the first distance in the plurality of to-be-switched video lists according to the first distance. Thus, the currently played video can be switched to the video in the target video list. Therefore, the terminal can play the preloaded videos belonging to the target video list.
Based on this, optionally, in a specific implementation manner, as shown in fig. 3, before the operation gesture for the display interface of the terminal is acquired in step S11, the method may further include the following steps:
in step S10, a nesting relationship between each preloaded video and other preloaded videos in various preset directions is set by using the uisrolview control.
In this particular implementation, the terminal may preload at least one video in each video list. Therefore, the terminal can construct the corresponding relation between each preloaded video and each preset direction according to the corresponding relation between the preset direction and the video list.
Wherein, the process can be understood as: and arranging videos belonging to the same video list in the preloaded videos into a primary video list, further arranging the formed primary video lists in each preset direction according to the preset corresponding relation, and after the arrangement is finished, the videos belonging to different video lists have no corresponding relation.
Furthermore, the terminal can set the nesting relation between each pre-loaded video and other pre-loaded videos on each preset by using the UIScrollView control. Therefore, the terminal can establish the logic relation between each preloaded video and other video lists belonging to different directions.
Wherein, the process can be understood as: for each video in each primary list, determining a primary list arranged in each preset direction in which the video is located, further, obtaining at least one video from each determined primary list, and establishing a corresponding relationship between the video and each obtained video, wherein the arrangement order of each obtained video and the arrangement order of the primary list in the preset direction may be the same.
The UIScrollView is a slidable control provided in the iOS basic frame, and the size of content rendered by the UIScrollView on the screen can be controlled by setting the size of contentSize of the UIScrollView, so that the rendered content can slide on the screen. For example, when the height setting of the contentSize is large, the up-and-down sliding of the content can be realized, and when the width setting of the contentSize is large, the left-and-right sliding of the content can be realized.
Further, when the attribute value of the pagenganable attribute in the uisrolview is set to YES, the content can be slid in the whole screen of the terminal, that is, the sliding range of the content is the whole screen of the terminal during the content sliding process.
Based on this, in this specific implementation, as shown in fig. 4, in the step S22, based on the corresponding relationship between the preset distance and the preset video list to be switched, the step of switching the currently played video to the video in the target video list corresponding to the first distance may include the following steps:
in step S41: determining a plurality of videos corresponding to the currently played video in the target direction based on the nesting relation; wherein the determined plurality of videos belong to different video lists;
in step S42: and acquiring videos belonging to the target video list from the plurality of determined videos based on the first distance, and switching the currently played video to the acquired video.
In this specific implementation manner, for a currently played video, since the video is also a pre-recorded video, the terminal may determine, according to a target direction of an operation gesture performed on a display interface of the terminal, a plurality of videos corresponding to the video in the target direction, where the plurality of determined videos belong to different video lists.
Furthermore, since the plurality of determined videos are arranged in a certain order, the terminal may acquire a video belonging to the target video list from the plurality of determined videos based on the first distance, and further switch the currently played video to the acquired video.
For each preset direction, the relationship between the distance of the operation gesture and each video list in the preset direction can be preset. In this way, the terminal may first determine a target video list corresponding to the first distance, and further, acquire a video belonging to the target video list from the determined plurality of videos.
For example, when the operating system of the terminal is iOS (iPhone OS, a dedicated mobile operating system developed by apple for its mobile device), the video switching method provided by the present disclosure may be implemented by multi-dimensional nesting of the uisrolview function module provided in the iOS basic framework.
For example, assuming that the operation gesture is a sliding operation, the directions of the operation gesture are longitudinal and transverse, that is, the operation gesture may be: slide up, slide down, slide left, and slide right. And the preset direction is horizontal, that is, when the operation gesture is sliding left and sliding right, the terminal switches the currently played video to the video in the other video list, and the other video list is different from the video list to which the currently played video belongs, so that the terminal can switch the video list. In addition, when the operation gesture is sliding upwards or sliding downwards, the terminal can switch the currently played video to other videos in the video list to which the currently played video belongs, so that the video list to which the currently played video belongs is not switched.
Aiming at a video playing area in a terminal interface, firstly, the video content slides up and down in the video playing area by setting the height of the contentSize of the UIScrollView, so that when the operation gesture is upward sliding and downward sliding, each video in a video list to which the currently played video belongs can be switched.
Wherein in the longitudinal sliding direction, a plurality of Cell views may be provided. And one Cell view is used for displaying the currently played video in the video playing area, and the other Cell views are used for preloading other videos in the video list to which the currently played video belongs.
For example, in the vertical sliding direction, three Cell views may be set, where a middle Cell view is used to display a currently played video in a video playing area, two upper and lower Cell views are used to preload or multiplex other videos in a video list to which the currently played video belongs, and further, through an operation gesture of sliding up and sliding down, interaction between the Cell views is realized to display different videos in different same video lists.
In this way, when the operation gesture is upward sliding, the Cell view for displaying the currently played video in the video playing area may slide upward until the Cell view disappears in the display interface of the terminal, and another Cell view located below the Cell view moves upward into the video playing area and starts to play the video preloaded in the another Cell view. Correspondingly, when the operation gesture is downward sliding, the Cell view for displaying the currently played video in the video playing area can slide downward until the Cell view disappears in the display interface of the terminal, and another Cell view located above the Cell view moves downward into the video playing area and starts to play the video preloaded in the another Cell view. When the operation gesture is a downward sliding, it may be determined that the played video is played again, and therefore, when the operation gesture is a downward sliding, it may also be referred to as multiplexing of videos corresponding to another Cell view located above the Cell view.
Further, for each Cell view in the longitudinal sliding direction, the video content slides left and right in the video playing area by nesting the uisrolview in the Cell view and setting the width of the contentSize of the uisrolview. Therefore, when the operation gesture slides leftwards and rightwards, the switching of the video list to which the currently played video belongs can be realized.
Wherein, in the transverse sliding direction of each Cell view, a plurality of Cell views can be set as well. And in the plurality of Cell views, one Cell view is used for displaying the currently played video in the video playing area, and the other Cell views are used for preloading a video in a video list in the plurality of video lists corresponding to the transverse direction, that is, the video preloaded by each other Cell view belongs to a different video list.
Therefore, when the operation gesture is leftward sliding, the Cell view for displaying the currently played video in the video playing area can slide leftward until the Cell view disappears in the display interface of the terminal, and another Cell view located on the right side of the Cell view moves leftward into the video playing area and starts to play the video preloaded in the another Cell view. Correspondingly, when the operation gesture is rightward sliding, the Cell view for displaying the currently played video in the video playing area can slide rightward until the Cell view disappears in the display interface of the terminal, and the other Cell view located on the left side of the Cell view moves rightward to the video playing area and starts to play the video preloaded in the other Cell view. Based on this, as the video list to which the video preloaded in another Cell view belongs is another video list, switching of the video list to which the currently played video belongs is realized. When the operation gesture is a rightward sliding, it may be determined that the video in the played video list is played again, and therefore, when the operation gesture is a rightward sliding, the video list corresponding to another Cell view located on the left of the Cell view may also be multiplexed.
For example, in the horizontal sliding direction, three Cell views may be set, where the middle Cell view is used to display a currently played video in the video playing area, the upper and lower Cell views are used to preload or multiplex videos in other video lists different from the video list to which the currently played video belongs, and then, by an operation gesture of sliding left and sliding right, interaction between the Cell views is realized to display videos in different video lists.
Further, in the lateral sliding direction, the number of the other Cell views located at the left and/or right of the Cell view for displaying the currently played video in the video playing area may be plural, and when the operation gesture is sliding left or sliding right, which of the plural Cell views may be displayed as another Cell view in the video playing area may depend on a distance of sliding left or right of the Cell view for displaying the currently played video in the video playing area, and a distance of sliding left or right of the Cell view for displaying the currently played video in the video playing area may depend on a first distance between the start point and the end point of the operation gesture in the display interface.
That is, when the first distance corresponds to the size of the N Cell views, if the Cell view for displaying the currently played video in the video playing area slides leftward or rightward by the size of the N Cell views, the nth Cell view located at the left or right of the Cell view for displaying the currently played video in the video playing area may be moved leftward or rightward into the video playing area, and the preloaded video in the nth Cell view may start to be played.
The video list to which the currently played video belongs can be switched to the target video list corresponding to the first distance by the corresponding relation between the preset distance and the preset video list to be switched.
In this example, the vertical and horizontal sliding of the currently played video is realized by nesting the horizontally sliding uiScrollView in the vertically sliding uiScrollView, and the switching of the video list to which the currently played video belongs is realized during horizontal sliding.
Based on this, when a plurality of preset directions exist, the UIScrollView sliding in each preset direction can be nested through further content, and the switching of the video list to which the currently played video belongs can be realized in a mode of nesting the UIScrollView in a multi-dimensional mode when operation gestures in different preset directions are executed.
Illustratively, the preset directions are a lateral slide, a left-down slide, a right-down slide, and a right-upper-corner slide.
Specifically, the plurality of video lists corresponding to the transverse direction are video lists corresponding to different authors, wherein each video in each video list is shot by the same author; sliding the corresponding video lists to the left and the bottom to obtain video lists corresponding to different shooting places, wherein each video in each video list is shot at the same shooting place; sliding the corresponding video lists to be video lists corresponding to different topics to the lower right, wherein each video in each video list is a video with the same topic tag; sliding the corresponding video lists to the upper right corner to be video lists corresponding to different reviewers, wherein each video in each video list relates to the same reviewer, and for example, comments sent by the same reviewer exist;
further, in this example, there may also be an operating gesture that slides to the upper left corner, where the currently played musical piece will be altered when sliding to the upper left corner.
Optionally, in another specific implementation manner, as shown in fig. 5, the manner in which the terminal executes the step S13 may include the following steps:
s51: when the target direction is detected to be the preset direction, the target direction is sent to a server, so that the server receives the target direction, a target video list corresponding to the target direction is determined according to the first corresponding relation between the preset direction and the video list, and the target video list is sent to the terminal;
s52: and receiving the target video list, and switching the video list to which the currently played video belongs to the target video list.
In this specific implementation manner, when it is detected that a target direction of an operation gesture on a display interface of the terminal is a preset direction, the terminal may send the target direction to the server. Thus, when receiving the target direction, the server can determine a target video list corresponding to the target direction according to the first corresponding relation between the preset direction and the video list, and send the target video list to the terminal.
Further, the terminal may receive the target video list, and switch the video list to which the currently played video belongs to the target video list, so that the terminal may play any video in the target video list.
The video in the target video list played by the terminal may be determined in various ways, which is not limited in this disclosure. For example, the terminal may display each video in the target video list in a tiled or list manner, and further, receive a selection operation of a user for one of the videos. Thus, the terminal can play the video selected by the user. For another example, the terminal may be preset to play the first received video in the target video list, so that when the terminal receives the target video list, when the terminal finishes receiving the first video in the target video list, the terminal may directly play the first video. For another example, it may be preset that the terminal plays the video with the largest playing frequency in the target video list, and after receiving the target video list, the terminal may play the video with the largest playing frequency according to the playing frequency carried by each video in the target video list.
Further, when there are a plurality of video lists corresponding to the preset directions, and the server determines the plurality of video lists corresponding to the target direction, it is further required to determine a target video list to be fed back to the terminal from the plurality of video lists. Based on this, optionally, in a specific implementation manner, as shown in fig. 6, the manner in which the terminal performs step S13 described above may include the following steps:
s61: when the target direction is detected to be the preset direction, determining a second distance between a starting point and an end point of the operation gesture in the display interface;
s62: sending the target direction and the second distance to a server so that the server receives the target direction, determining a plurality of video lists corresponding to the target direction according to a second corresponding relation between the preset direction and the video lists, determining a target video list from the plurality of video lists according to a corresponding relation between the preset distance and the video lists, and sending the target video list to the terminal;
s63: and receiving the target video list, and switching the currently played video into the video in the target video list.
In this specific implementation manner, when it is detected that a target direction of an operation gesture for a display interface of the terminal is a preset direction, the terminal needs to first determine a second distance between a starting point and an end point of the operation gesture in the display interface. In this way, the terminal can send the target direction and the second distance to the server. Therefore, after receiving the target direction, the server may first determine a plurality of video lists corresponding to the target direction according to a second corresponding relationship between the preset direction and the video lists, further determine a target video list from the plurality of determined video lists according to a corresponding relationship between the preset distance and the video lists, and send the target video list to the terminal.
Furthermore, the terminal can receive the target video list and switch the currently played video to the video in the target video list, and because the video list to which the currently played video belongs and the target video list are different video lists, switching between different video lists is realized.
The video in the target video list played by the terminal may be determined in various ways, which is not limited in this disclosure. For example, the terminal may display each video in the target video list in a tiled or list manner, and further, receive a selection operation of a user for one of the videos. Thus, the terminal can play the video selected by the user. For another example, the terminal may be preset to play the first received video in the target video list, so that when the terminal receives the target video list, when the terminal finishes receiving the first video in the target video list, the terminal may directly play the first video. For another example, it may be preset that the terminal plays the video with the largest playing frequency in the target video list, and after receiving the target video list, the terminal may play the video with the largest playing frequency according to the playing frequency carried by each video in the target video list.
In addition, the terminal may determine the second distance between the starting point and the ending point of the operation gesture in the display interface in various ways, and the disclosure is not particularly limited thereto. For example, the terminal may determine coordinates of a starting point and an end point of the operation gesture in the display interface, and further determine a second distance between the starting point and the end point of the operation gesture in the display interface through coordinate calculation.
On the basis of the embodiment shown in fig. 5 and fig. 6, optionally, in a specific implementation manner, the step S11 of acquiring the operation gesture for the display interface of the terminal may include the following steps:
and detecting the gesture operation of the display interface of the terminal by utilizing a GesturDedetector class or a SimpleOnGesturListener class.
Among them, the getturedetector is a help class used for gesture recognition in Android (a Linux-based free and open source code operating system). The GestureDetector has the working principle that when a user touch message is received, the GestureDetector is sent to the message for processing, and then a gesture processed by the GestureDetector is obtained by setting a listener. The GestutureDetector provides two listener interfaces, OnGestutureListener handles single-click class messages and OnDoubleTapListener handles double-click class messages. SimpleOnGesturiluer is a processing class used to implement the listener interface OnGesturilnerer.
Thus, when the operating system of the terminal is Android, the terminal can detect gesture operation on the display interface of the terminal by using a GesturreDetector class or a SimpleOnGesturreLister class.
Further, when the operating system of the terminal is Android, in the process of switching the currently played video, an animation effect in the switching process can be achieved through the ValueAnimator. The valuelanimator can transmit the initial state value, the final state value, the interpolator and other attributes to achieve various dynamic effects such as zooming, transparency gradual change, displacement, rotation, sequence frames and the like, and meet the video switching effect.
In some cases, the user may forget or does not know how to switch the video list to which the currently played video belongs by performing operation gestures in different directions on the display interface of the terminal, for example, when the user uses the video switching function provided by the present disclosure for the first time, or when the user forgets how to operate without using the video switching function provided by the present disclosure for a long time. Therefore, in order to inform the user how to switch the video list to which the currently played video belongs by performing operation gestures in different directions on the display interface of the terminal, in an alternative specific implementation manner, the step S11 of acquiring the operation gesture for the display interface of the terminal may include the following steps:
when the preset operation aiming at the display interface of the terminal is detected, displaying prompt information; wherein, the prompt message includes: the preset corresponding relation between the direction of the operation gesture and the video list; and acquiring an operation gesture aiming at the display interface based on the prompt information.
The preset operation may be a long press, a single click, a double click, or the like, and the disclosure is not limited thereto. When a user sends a preset operation to a display interface of a terminal, the user needs to switch a currently played video. Then, in order to prompt the user how to directly switch the video list to which the currently played video belongs, the electronic device may display a prompt message. The prompt information may include a correspondence between the direction of the operation gesture and the video list switching manner.
For example, the video lists corresponding to different authors are switched by sliding horizontally; sliding and switching the video lists corresponding to different shooting places to the lower left corner; and sliding to the lower right corner to switch video lists of different topic drinking, and the like.
For example, the terminal may display the prompt information in a covering layer display manner.
Therefore, after seeing the prompt message, the user can know how to directly switch the video list to which the currently played video belongs. Furthermore, the user can operate the display interface of the terminal according to the direction of the operation gesture included in the prompt information, and the terminal can acquire the operation gesture of the user for the display interface based on the prompt information.
Optionally, in a specific implementation manner, as shown in fig. 7, the step S12 of determining the target direction of the operation gesture may include the following steps:
s71: determining a starting point and an end point of an operation gesture on a display interface;
s72: calculating an included angle between a connecting line from a starting point to an end point and the designated direction, and determining a target angle range in which the included angle is located;
s73: and determining the direction corresponding to the target angle range as the target direction of the operation gesture according to the corresponding relation between the preset direction and the angle range.
The operation gesture sent by the user to the display interface of the terminal has a starting point and an end point, where the starting point may be a point at which a finger of the user or a stylus pen makes the initial contact with the interface of the terminal when the user sends the operation gesture, and the end point may be a point at which the finger of the user or the stylus pen makes the final contact with the display interface of the terminal when the user ends the operation gesture, that is, a point at which the finger of the user or the stylus pen makes the contact when the finger of the user or the stylus pen leaves the display interface of the terminal when the user ends the operation gesture. That is, the starting point and the ending point of the operation gesture on the display interface are the starting point and the ending point of the track formed by the operation gesture on the display interface of the terminal.
After the starting point and the end point of the operation gesture on the display interface of the terminal are determined, a connecting line from the starting point to the end point can be determined, and further, the included angle between the connecting line and the designated direction is calculated. The designated direction may be any one of a plurality of directions, such as up, right, down, left, up, and right, and it is reasonable to say that the designated direction may be any other direction.
Furthermore, after the included angle is obtained through calculation, the target angle range of the included angle can be further determined. Therefore, the direction corresponding to the target angle range can be determined as the target direction of the operation gesture according to the preset corresponding relation between the direction and the angle range.
For example, if the designated direction is right, the corresponding relationship between the direction and the angle range can be shown as the following table:
Direction | angular range |
On the upper part | [60°,120°] |
Lower part | [240°,300°] |
Left side of | [150°,210°] |
Right side | [0°,30°]∩[330°,360°] |
Upper right part | (30°,60°) |
Lower right | (300°,330°) |
Upper left of | (120°,150°) |
Left lower part | (210°,240°) |
Fig. 8 is a block diagram illustrating a video switching apparatus according to an example embodiment. Referring to fig. 8, the apparatus includes a gesture acquisition module 810, a direction determination module 820, and a video switching module 830.
A gesture obtaining module 810 configured to obtain an operation gesture for a display interface of the terminal;
a direction determination module 820 configured to determine a target direction of the operation gesture;
the video switching module 830 is configured to, when it is detected that the target direction is a preset direction, switch a currently played video to a video in a target video list according to a video list switching manner corresponding to the target direction; wherein the video list to which the currently played video belongs and the target video list are different video lists.
Optionally, in a specific implementation manner, the video switching module 830 includes:
a first distance determination submodule configured to determine a first distance between a start point and an end point of the operation gesture in the display interface when the target direction is detected to be a preset direction;
and the first video switching submodule is configured to switch the currently played video to the video in the target video list corresponding to the first distance according to the corresponding relation between the preset distance and the preset video list to be switched.
Optionally, in a specific implementation manner, the apparatus further includes:
the relationship setting module is configured to set a nesting relationship between each preloaded video and other preloaded videos in each preset direction by using a UIScrollView control before the operation gesture for the display interface of the terminal is acquired;
the first video switching sub-module is specifically configured to:
determining a plurality of videos corresponding to the currently played video in the target direction based on the nesting relation; wherein the determined plurality of videos belong to different video lists;
and acquiring videos belonging to a target video list from the plurality of determined videos based on the first distance, and switching the currently played video to the acquired video.
Optionally, in a specific implementation manner, the video switching module 830 includes:
the information sending submodule is configured to send the target direction to a server when the target direction is detected to be a preset direction, so that the server receives the target direction, determine a target video list corresponding to the target direction according to a first corresponding relation between the preset direction and the video list, and send the target video list to the terminal;
and the second video switching sub-module is configured to receive the target video list and switch the currently played video to the video in the target video list.
Optionally, in a specific implementation manner, the apparatus further includes:
a distance determination module configured to determine a second distance between a start point and an end point of the operation gesture in the display interface before the sending of the target direction to a server;
the information sending sub-module is specifically configured to:
sending the target direction and the second distance to the server so that the server receives the target direction, determining a plurality of video lists corresponding to the target direction according to a second corresponding relation between a preset direction and the video lists, determining a target video list from the plurality of video lists according to a corresponding relation between a preset distance and the video lists, and sending the target video list to the terminal;
the second video switching sub-module is specifically configured to:
and receiving the target video list, and switching the currently played video into the video in the target video list.
Optionally, in a specific implementation manner, the gesture obtaining module 810 is specifically configured to:
and detecting the gesture operation aiming at the display interface of the terminal by utilizing a GesturDedetector class or a SimpleOnGesturListener class.
Optionally, in a specific implementation manner, the gesture obtaining module 810 is specifically configured to:
when the preset operation aiming at the display interface of the terminal is detected, displaying prompt information; acquiring an operation gesture aiming at the display interface based on the prompt information; wherein the prompt message includes: and the preset corresponding relation between the direction of the operation gesture and the video list.
Optionally, in a specific implementation manner, the direction determining module 820 is specifically configured to:
determining a starting point and an end point of the operation gesture on the display interface; calculating an included angle between a connecting line from the starting point to the end point and the designated direction, and determining a target angle range in which the included angle is located; and determining the direction corresponding to the target angle range as the target direction of the operation gesture according to the corresponding relation between the preset direction and the angle range.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 9 is a block diagram illustrating a terminal 900 for switching a video list according to an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 9, apparatus 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the apparatus 900. Examples of such data include instructions for any application or method configured to operate on the device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 906 provides power to the various components of the device 900. The power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen providing an output interface between the device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker configured to output audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors configured to provide status assessment of various aspects to the apparatus 900. For example, the sensor assembly 914 may detect an open/closed state of the device 900, the relative positioning of the components, such as a display and keypad of the apparatus 900, the sensor assembly 914 may also detect a change in the position of the apparatus 900 or a component of the apparatus 900, the presence or absence of user contact with the apparatus 900, orientation or acceleration/deceleration of the apparatus 900, and a change in the temperature of the apparatus 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, configured for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an example embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components configured to perform the above-described methods.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 920 of the apparatus 900 to perform the video switching method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (14)
1. A video switching method is applied to a terminal, and comprises the following steps:
setting the nesting relation between each preloaded video and other preloaded videos in each preset direction by using a UIScrollView control;
acquiring an operation gesture aiming at a display interface of the terminal;
determining a target direction of the operation gesture;
when the target direction is detected to be a preset direction, switching the currently played video into a video in a target video list according to a video list switching mode corresponding to the target direction; the video list to which the currently played video belongs and the target video list are different video lists;
when it is detected that the target direction is a preset direction, switching a currently played video to a video in a target video list according to a video list switching mode corresponding to the target direction, including: when the target direction is detected to be a preset direction, determining a first distance between a starting point and an end point of the operation gesture in the display interface; switching the currently played video to the video in the target video list corresponding to the first distance based on the corresponding relation between the preset distance and the preset video list to be switched;
the switching the currently played video to the video in the target video list corresponding to the first distance based on the corresponding relationship between the preset distance and the preset video list to be switched includes: determining a plurality of videos corresponding to the currently played video in the target direction based on the nesting relation; wherein the determined plurality of videos belong to different video lists; and acquiring videos belonging to a target video list from the plurality of determined videos based on the first distance, and switching the currently played video to the acquired video.
2. The method according to claim 1, wherein when it is detected that the target direction is a preset direction, switching a currently played video to a video in a target video list according to a video list switching manner corresponding to the target direction comprises:
when the target direction is detected to be a preset direction, sending the target direction to a server so that the server receives the target direction, determining a target video list corresponding to the target direction according to a first corresponding relation between the preset direction and the video list, and sending the target video list to the terminal;
and receiving the target video list, and switching the currently played video into the video in the target video list.
3. The method of claim 2, wherein prior to said sending the target direction to a server, the method further comprises:
determining a second distance between a starting point and an end point of the operation gesture in the display interface;
the sending the target direction to a server includes:
sending the target direction and the second distance to the server so that the server receives the target direction, determining a plurality of video lists corresponding to the target direction according to a second corresponding relation between a preset direction and the video lists, determining a target video list from the plurality of video lists according to a corresponding relation between a preset distance and the video lists, and sending the target video list to the terminal;
and receiving the target video list, and switching the currently played video into the video in the target video list.
4. The method according to claim 2 or 3, wherein the method for acquiring the operation gesture for the display interface of the terminal comprises the following steps:
and detecting the gesture operation aiming at the display interface of the terminal by utilizing a GesturDedetector class or a SimpleOnGesturListener class.
5. The method according to claim 1, wherein the step of acquiring an operation gesture for a display interface of the terminal comprises:
when the preset operation aiming at the display interface of the terminal is detected, displaying prompt information; wherein the prompt message includes: the preset corresponding relation between the direction of the operation gesture and the video list;
and acquiring an operation gesture aiming at the display interface based on the prompt information.
6. The method of claim 1, wherein the step of determining the target direction of the operational gesture comprises:
determining a starting point and an end point of the operation gesture on the display interface;
calculating an included angle between a connecting line from the starting point to the end point and the designated direction, and determining a target angle range in which the included angle is located;
and determining the direction corresponding to the target angle range as the target direction of the operation gesture according to the corresponding relation between the preset direction and the angle range.
7. A video switching apparatus, applied to a terminal, the apparatus comprising:
the gesture acquisition module is configured to acquire an operation gesture aiming at a display interface of the terminal;
a direction determination module configured to determine a target direction of the operation gesture;
the video switching module is configured to switch a currently played video to a video in a target video list according to a video list switching mode corresponding to the target direction when the target direction is detected to be a preset direction; the video list to which the currently played video belongs and the target video list are different video lists;
wherein the video switching module comprises: a first distance determination submodule configured to determine a first distance between a start point and an end point of the operation gesture in the display interface when the target direction is detected to be a preset direction; the first video switching sub-module is configured to switch a currently played video to a video in a target video list corresponding to the first distance based on a corresponding relation between a preset distance and a preset video list to be switched;
the device further comprises: the relationship setting module is configured to set a nesting relationship between each preloaded video and other preloaded videos in each preset direction by using a UIScrollView control before the operation gesture for the display interface of the terminal is acquired;
the first video switching sub-module is specifically configured to: determining a plurality of videos corresponding to the currently played video in the target direction based on the nesting relation; wherein the determined plurality of videos belong to different video lists; and acquiring videos belonging to a target video list from the plurality of determined videos based on the first distance, and switching the currently played video to the acquired video.
8. The apparatus of claim 7, wherein the video switching module comprises:
the information sending submodule is configured to send the target direction to a server when the target direction is detected to be a preset direction, so that the server receives the target direction, determine a target video list corresponding to the target direction according to a first corresponding relation between the preset direction and the video list, and send the target video list to the terminal;
and the second video switching sub-module is configured to receive the target video list and switch the currently played video to the video in the target video list.
9. The apparatus of claim 8, further comprising:
a distance determination module configured to determine a second distance between a start point and an end point of the operation gesture in the display interface before the sending of the target direction to a server;
the information sending sub-module is specifically configured to:
sending the target direction and the second distance to the server so that the server receives the target direction, determining a plurality of video lists corresponding to the target direction according to a second corresponding relation between a preset direction and the video lists, determining a target video list from the plurality of video lists according to a corresponding relation between a preset distance and the video lists, and sending the target video list to the terminal;
the second video switching sub-module is specifically configured to:
and receiving the target video list, and switching the currently played video into the video in the target video list.
10. The apparatus of claim 8 or 9, wherein the gesture acquisition module is specifically configured to:
and detecting the gesture operation aiming at the display interface of the terminal by utilizing a GesturDedetector class or a SimpleOnGesturListener class.
11. The apparatus of claim 7, wherein the gesture acquisition module is specifically configured to:
when the preset operation aiming at the display interface of the terminal is detected, displaying prompt information; acquiring an operation gesture aiming at the display interface based on the prompt information; wherein the prompt message includes: and the preset corresponding relation between the direction of the operation gesture and the video list.
12. The apparatus of claim 7, wherein the direction determination module is specifically configured to:
determining a starting point and an end point of the operation gesture on the display interface; calculating an included angle between a connecting line from the starting point to the end point and the designated direction, and determining a target angle range in which the included angle is located; and determining the direction corresponding to the target angle range as the target direction of the operation gesture according to the corresponding relation between the preset direction and the angle range.
13. A terminal, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the video switching method of any one of claims 1 to 6.
14. A storage medium, wherein instructions in the storage medium, when executed by a processor of a terminal, enable the terminal to perform the video switching method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910894392.3A CN110636355B (en) | 2019-09-20 | 2019-09-20 | Video switching method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910894392.3A CN110636355B (en) | 2019-09-20 | 2019-09-20 | Video switching method, device, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110636355A CN110636355A (en) | 2019-12-31 |
CN110636355B true CN110636355B (en) | 2021-10-22 |
Family
ID=68971998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910894392.3A Active CN110636355B (en) | 2019-09-20 | 2019-09-20 | Video switching method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110636355B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112153454B9 (en) * | 2020-09-25 | 2023-05-30 | 北京字跳网络技术有限公司 | Method, device and equipment for providing multimedia content |
CN112839255B (en) * | 2020-12-31 | 2021-11-02 | 北京达佳互联信息技术有限公司 | Video playing method and device, electronic equipment and computer readable storage medium |
CN112954442B (en) * | 2021-03-18 | 2023-07-18 | 北京字节跳动网络技术有限公司 | Video playing method, device, equipment and storage medium |
CN115022720B (en) * | 2022-05-20 | 2023-12-12 | 北京字跳网络技术有限公司 | Video processing method, device, equipment and storage medium |
CN115665498A (en) * | 2022-10-27 | 2023-01-31 | 北京字跳网络技术有限公司 | Video processing method, device, equipment and storage medium |
CN115802114A (en) * | 2022-11-08 | 2023-03-14 | 北京达佳互联信息技术有限公司 | Watching mode switching method and device, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100103125A1 (en) * | 2008-10-23 | 2010-04-29 | Samsung Electronics Co., Ltd. | Remote control device and method of controlling other devices using the same |
CN101702317A (en) * | 2009-11-02 | 2010-05-05 | 中兴通讯股份有限公司 | Method for processing music tracks with movable terminal and movable terminal thereof |
CN105528173A (en) * | 2015-12-08 | 2016-04-27 | 深圳市金立通信设备有限公司 | Multimedia operation method and terminal |
CN105573596A (en) * | 2015-12-10 | 2016-05-11 | 广东欧珀移动通信有限公司 | Playing sequence regulation method of playlist, and user terminal |
CN105898592A (en) * | 2015-12-31 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Client play data allocation method and client |
CN105930033A (en) * | 2016-04-25 | 2016-09-07 | 深圳市金立通信设备有限公司 | Contact person information display method and terminal |
WO2018209464A1 (en) * | 2017-05-15 | 2018-11-22 | 深圳市卓希科技有限公司 | Contact list control method and terminal |
WO2019051738A1 (en) * | 2017-09-15 | 2019-03-21 | 深圳传音通讯有限公司 | List switching method, and terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101538420B1 (en) * | 2008-09-05 | 2015-07-22 | 엘지전자 주식회사 | Switchover Method of Identify Modules and Mobile Terminal using the same |
-
2019
- 2019-09-20 CN CN201910894392.3A patent/CN110636355B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100103125A1 (en) * | 2008-10-23 | 2010-04-29 | Samsung Electronics Co., Ltd. | Remote control device and method of controlling other devices using the same |
CN101702317A (en) * | 2009-11-02 | 2010-05-05 | 中兴通讯股份有限公司 | Method for processing music tracks with movable terminal and movable terminal thereof |
CN105528173A (en) * | 2015-12-08 | 2016-04-27 | 深圳市金立通信设备有限公司 | Multimedia operation method and terminal |
CN105573596A (en) * | 2015-12-10 | 2016-05-11 | 广东欧珀移动通信有限公司 | Playing sequence regulation method of playlist, and user terminal |
CN105898592A (en) * | 2015-12-31 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Client play data allocation method and client |
CN105930033A (en) * | 2016-04-25 | 2016-09-07 | 深圳市金立通信设备有限公司 | Contact person information display method and terminal |
WO2018209464A1 (en) * | 2017-05-15 | 2018-11-22 | 深圳市卓希科技有限公司 | Contact list control method and terminal |
WO2019051738A1 (en) * | 2017-09-15 | 2019-03-21 | 深圳传音通讯有限公司 | List switching method, and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN110636355A (en) | 2019-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110636355B (en) | Video switching method, device, terminal and storage medium | |
CN109120981B (en) | Information list display method and device and storage medium | |
CN110929054B (en) | Multimedia information application interface display method and device, terminal and medium | |
CN106412706B (en) | Control method, device and its equipment of video playing | |
CN112256169B (en) | Content display method and device, electronic equipment and storage medium | |
CN107102772B (en) | Touch control method and device | |
EP3796317A1 (en) | Video processing method, video playing method, devices and storage medium | |
CN104317402A (en) | Description information display method and device and electronic equipment | |
CN105094539B (en) | Reference information display methods and device | |
CN113613082A (en) | Video playing method and device, electronic equipment and storage medium | |
JP2017525076A (en) | Character identification method, apparatus, program, and recording medium | |
CN111061906A (en) | Music information processing method and device, electronic equipment and computer readable storage medium | |
CN106095300B (en) | Method and device for adjusting playing progress | |
CN104199609B (en) | The method and device of cursor positioning | |
CN113988021A (en) | Content interaction method and device, electronic equipment and storage medium | |
CN106775210B (en) | Wallpaper changing method and device | |
CN115935099A (en) | Information display method and device, electronic equipment and storage medium | |
CN112051949A (en) | Content sharing method and device and electronic equipment | |
CN114222173B (en) | Object display method and device, electronic equipment and storage medium | |
CN106325712B (en) | Terminal display control method and device and terminal | |
CN112764636B (en) | Video processing method, apparatus, electronic device, and computer-readable storage medium | |
CN106951171B (en) | Control method and device of virtual reality helmet | |
CN112764658B (en) | Content display method and device and storage medium | |
CN104537004A (en) | Webpage character displaying method and device | |
CN114296587A (en) | Cursor control method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |