Disclosure of Invention
The embodiment of the invention provides a method and a device for preloading a multimedia of a floating window player, which are used for solving the problems of long loading and buffering time and unsmooth playing between videos caused by the fact that the next video information to be played cannot be selected when the floating window player plays the videos in the prior art.
The embodiment of the invention provides a method and a device for preloading multimedia of a floating window player, which specifically comprise the following steps:
in a first aspect, a method for multimedia preloading of a floating-window player includes:
detecting a starting point and an end point of gesture sliding;
when the multimedia information area with the starting point outside the floating window player area and the end point outside the floating window player area are judged to be in the floating window player area, the multimedia information contained in the area with the starting point is led into a play list of the floating window player;
and sequentially preloading all the multimedia information recorded in the play list.
By the possible implementation mode, under the situation that the floating window player plays, the multimedia information in the multimedia information area is imported into the form of the floating window player by the method provided by the invention, so that the form can be preloaded in sequence, the buffer waiting time is shortened, and seamless playing between the multimedia information and the multimedia information can be realized.
With reference to the first aspect, in a first possible implementation manner, detecting a start point and an end point of a gesture slide further includes:
when the average pressure of the starting point and the end point is judged to be larger than a certain set value, the sliding operation between the starting point and the end point is preliminarily determined to be effective.
Through the possible implementation mode, the client side does not regard the operation of lightly touching the screen by the user as an effective operation, and the problem of misoperation of the user is avoided.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, after determining that the average pressure of the starting point and the end point is greater than a certain set value, and then preliminarily determining that the sliding operation between the starting point and the end point is valid, the method further includes:
and when the length of the line segment formed by the starting point and the end point is judged to be larger than a certain set value, determining that the sliding operation between the starting point and the end point is effective.
Through the possible implementation mode, the client side does not regard the operation of sliding and browsing the multimedia information by the user as the operation of importing the multimedia information into the play list, and the problem of misoperation of the user is further avoided.
With reference to any one of the foregoing possible implementation manners of the first aspect, in a third possible implementation manner, when it is determined that the starting point is in a multimedia information area outside the floating-window player area and the ending point is in the floating-window player area, importing the multimedia information included in the area where the starting point is located into a playlist of the floating-window player specifically includes:
when two or more multimedia information contained in the area where the starting point is located and the end point is located in the area of the floating window player are judged, the two or more multimedia information are led into a play list of the floating window player; or,
and when the multimedia information contained in the area where the starting point is located is judged to be two or more than two and the end point is in the area of the floating window player, presenting prompt information to a user, and selecting at least one multimedia information to import into a play list of the floating window player according to an instruction input by the user.
With reference to the first aspect and any one of the first and second possible implementation manners of the first aspect, in a fourth possible implementation manner, when it is determined that the start point is in a multimedia information area outside the floating window player area and the end point is in the floating window player area, importing the multimedia information included in the area where the start point is located into a playlist of the floating window player specifically includes:
when the starting point is judged to be on an operation interface which contains multimedia information and is arranged outside the floating window player, and the end point is in the area of the floating window player, the multimedia information contained in the area of the operation interface is led into a play list of the floating window player; or,
and when the starting point is judged to be on an application program interface containing the multimedia information outside the floating window player and the end point is in the area of the floating window player, importing the multimedia information contained in the application program interface into a play list of the floating window player.
With reference to the first aspect, in a fifth possible implementation manner, sequentially preloading the multimedia information recorded in the playlist in order of priority from high to low includes:
sequentially preloading all the multimedia information recorded in the play list according to the priority preset by the attribute information corresponding to all the multimedia information; or,
sequentially preloading all the multimedia information recorded in the play list according to the sequence of the leading-in time of all the multimedia information from morning to evening; or
And sequentially preloading all the multimedia information recorded in the play list according to the priority level set by the user corresponding to all the multimedia information.
In a second aspect, an apparatus for multimedia preloading of a floating-window player, the apparatus comprising:
the detection unit is used for detecting a starting point and an end point of gesture sliding;
the processing unit is used for importing the multimedia information contained in the area of the starting point into a play list of the floating window player when the multimedia information area of the starting point outside the floating window player area and the end point are judged to be in the floating window player area;
and the loading unit is used for sequentially preloading all the multimedia information recorded in the play list.
By the possible implementation mode, under the situation that the floating window player plays, the multimedia information in the multimedia information area is imported into the form of the floating window player by the method provided by the invention, so that the form can be preloaded in sequence, the buffer waiting time is shortened, and seamless playing between the multimedia information and the multimedia information can be realized.
With reference to the second aspect, in a first possible implementation manner, the detection unit is specifically configured to: after the starting point and the end point of gesture sliding are detected, when the average pressure of the starting point and the average pressure of the end point are judged to be larger than a set value, the sliding operation between the starting point and the end point is determined to be effective preliminarily.
Through the possible implementation mode, the client side does not regard the operation of lightly touching the screen by the user as an effective operation, and the problem of misoperation of the user is avoided.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the detection unit is specifically configured to: and after the sliding operation between the starting point and the end point is determined to be effective preliminarily when the average pressure of the starting point and the end point is determined to be greater than a set value, and the sliding operation between the starting point and the end point is determined to be effective when the length of a line segment formed by the starting point and the end point is determined to be greater than a set value.
Through the possible implementation mode, the client side does not regard the operation of sliding and browsing the multimedia information by the user as the operation of importing the multimedia information into the play list, and the problem of misoperation of the user is further avoided.
With reference to any one of the foregoing possible implementation manners of the second aspect, in a third possible implementation manner, the processing unit is specifically configured to: when two or more multimedia information contained in the area where the starting point is located and the end point is located in the area of the floating window player are judged, the two or more multimedia information are led into a play list of the floating window player; or,
and when the multimedia information contained in the area where the starting point is located is judged to be two or more than two and the end point is in the area of the floating window player, presenting prompt information to a user, and selecting at least one multimedia information to import into a play list of the floating window player according to an instruction input by the user.
With reference to the second aspect and any one of the first and second possible implementations of the second aspect, in a fourth possible implementation, the processing unit is specifically configured to: when the starting point is judged to be on an operation interface which contains multimedia information and is arranged outside the floating window player, and the end point is in the area of the floating window player, the multimedia information contained in the area of the operation interface is led into a play list of the floating window player; or,
and when the starting point is judged to be on an application program interface containing the multimedia information outside the floating window player and the end point is in the area of the floating window player, importing the multimedia information contained in the application program interface into a play list of the floating window player.
With reference to the second aspect, in a fifth possible implementation manner, the loading unit is specifically configured to: sequentially preloading all the multimedia information recorded in the play list according to the priority preset by the attribute information corresponding to all the multimedia information; or,
sequentially preloading all the multimedia information recorded in the play list according to the sequence of the leading-in time of all the multimedia information from morning to evening; or
And sequentially preloading all the multimedia information recorded in the play list according to the priority level set by the user corresponding to all the multimedia information.
Detailed Description
In order to provide a scheme that when a floating window player plays a video, a next played video can be continuously selected to form a preloaded playlist, an embodiment of the present invention provides a method for preloading a multimedia of a floating window player, so that a client generates a playlist in advance, and loads the playlist in advance, thereby shortening a buffering waiting time and enabling seamless playing between videos.
The embodiment of the invention provides a method for preloading multimedia of a floating window player, and the method and the device provided by the invention are described in detail by using specific embodiments in combination with the attached drawings.
Referring to fig. 1, the method for preloading multimedia of a floating window player specifically includes the following steps:
step 100: starting and ending points of gesture sliding are detected.
Specifically, when a user opens the floating window player to watch a video, the client executes a gesture sliding operation of the user, and after a starting point and an end point of the gesture sliding are detected, it is first determined whether the gesture sliding operation is an effective operation. The specific judging method comprises the following steps: when the average pressure of the starting point and the end point is judged to be larger than a certain set value, the sliding operation between the starting point and the end point is preliminarily determined to be effective. The judgment operation enables the client not to regard the operation of lightly touching the screen by the user as an effective operation, and the problem of misoperation of the user is avoided.
And in order to enable the client to identify the gesture operation of the user more accurately, after the average pressure of the starting point and the end point is judged to be greater than a certain set value, the sliding operation between the starting point and the end point is determined to be effective preliminarily, and when the length of a line segment formed by the starting point and the end point is continuously judged to be greater than a certain set value, the sliding operation between the starting point and the end point is determined to be effective finally. Through the judgment operation, the client side can not regard the operation of the user for sliding and browsing the multimedia information as the operation of importing the multimedia information into the play list, and the problem of misoperation of the user is further avoided.
Step 110: when the client judges that the starting point is in the multimedia information area outside the floating window player area and the end point is in the floating window player area, the client imports the multimedia information contained in the area of the starting point into a play list of the floating window player.
Specifically, the client determines that the starting point of the user gesture sliding is located in a multimedia information area outside the floating window player area, for example, the multimedia information area outside the floating window player area may be an operation interface outside the floating window player area that includes multimedia information, or an application interface outside the floating window player area that includes multimedia information, where the application interface outside the floating window player area that includes multimedia information may be another player interface, or a multimedia web page information interface detected by the current floating window player, or a popup box pushed by another communication tool that includes multimedia information. When judging that the starting point of the gesture sliding is in various types of multimedia information areas outside the floating window player and the end point of the gesture sliding is in the floating window player area, importing the multimedia information contained in the starting point position of the gesture sliding of the user into a play list of the floating window player, wherein the floating window player area is used for indicating an area covered by the floating window player on a client screen, and the multimedia information area is an area which is displayed on the client screen and contains the multimedia information; the multimedia information is used for indicating the multimedia file and related information such as identification, attribute, position and the like of the multimedia file; the multimedia information area is used for indicating the area covered by the multimedia information on the screen of the client.
The specific process of importing the multimedia information into the playlist of the floating-window player is as follows:
when the client determines that the starting point of the user gesture sliding is located on an operation interface which is outside the floating window player area and contains multimedia information and the end point is in the floating window player area, the multimedia information contained in the operation interface area is led into a play list of the floating window player;
or,
when the client determines that the starting point of the user gesture sliding is located on an application program interface which is outside the floating window player area and contains multimedia information and the end point is in the floating window player area, the multimedia information contained in the application program interface is led into a play list of the floating window player;
the specific process of importing the multimedia information contained in the application program interface into the playlist of the floating-window player includes:
when the client determines that the starting point of the user gesture sliding is located in another player area outside the floating window player area, the end point is located in the floating window player area, and the end point is located in the floating window player area, the multimedia information contained in the other player area is led into a play list of the floating window player; or
When the client determines that the starting point of the user gesture sliding is located outside the floating window player area and comprises a bullet frame area containing the multimedia information pushed by the communication tool and the end point is located in the floating window player area, the pushed multimedia information is guided into a play list of the floating window player.
The following describes a specific flow of the method for preloading multimedia messages of a floating-window player according to a specific embodiment, with reference to fig. 2:
the client detects that the starting point of the user gesture is in a multimedia information area outside the floating window player and detects that the end point of the user gesture is in the floating window player area, the multimedia message contained in the area where the starting point of the user gesture is the multimedia message 5, and the multimedia message 5 is imported into a play list of the floating window player.
When the multimedia information included in the area where the starting point of the user gesture sliding is determined, a situation that the area where the starting point of the user gesture sliding is included includes two or more multimedia messages may also occur, where the situation is that the specific processing flow is as follows:
when multimedia information contained in an area where a starting point of gesture sliding of a user is judged, if the area where the starting point is judged to contain two or more multimedia information and an end point is in a floating window player area, presenting prompt information to the user, wherein the prompt information is contained in a play list of the floating window player, and at least one multimedia information selected by the user is imported into the floating window player from the two or more multimedia information; or
When the multimedia information contained in the area where the starting point slides by the user gesture is judged, if the area where the starting point is judged to contain two or more multimedia information and the end point is in the area of the floating window player, the two or more multimedia information are all selected and guided into the play list of the floating window player.
The following describes a specific flow of the method for preloading multimedia messages of a floating-window player according to a specific embodiment, with reference to fig. 2:
if the starting point of the user gesture detected by the client is in the multimedia information area outside the floating window player, if the area where the starting point is located at the starting point a, the starting point a is a point located in the middle of the multimedia information 1, the multimedia information 2, the multimedia information 3, and the multimedia information 4 in fig. 2, and the end point of the detected user gesture is located in the area of the floating window player, the multimedia information 1, the multimedia information 2, the multimedia information 3, and the multimedia information 4 are simultaneously imported into the play list of the floating window player, or a prompt message is presented to the user, where the prompt message is specifically a play list for importing at least one multimedia information of the multimedia information 1, the multimedia information 2, the multimedia information 3, and the multimedia information 4 into the floating window player.
Step 120: and the client pre-loads each multimedia information recorded in the play list in sequence.
Sequentially preloading all multimedia information recorded in the play list, specifically: sequentially preloading each multimedia information recorded in the play list according to the sequence of the priority corresponding to each multimedia information from high to low, wherein the priority can be a priority preset according to the attribute information of each multimedia information, the attribute information refers to that the multimedia information is audio, video or pictures and the like, the priority of the video can be preset to be higher than that of the audio, and the priority of the audio is higher than that of the pictures; the priority can also be the highest priority corresponding to the multimedia information with the earliest import time according to the sequence of the import time of each multimedia information from the morning to the evening, otherwise, the priority corresponding to the multimedia information with the latest import time is the lowest; the priority can also be that the user adjusts each multimedia information in the playing list by himself, the priority corresponding to each multimedia information is determined according to the adjustment sequence of the user, the priority corresponding to the multimedia information arranged at the forefront of the playing list by the user is the highest, otherwise, the priority corresponding to the multimedia information arranged at the rearmost of the playing list by the user is the lowest. The specific process of sequentially preloading the multimedia information recorded in the playlist from high to low according to the priority corresponding to the multimedia information is as follows:
the client side sequentially preloads each multimedia information recorded in the playing form according to the priority preset by the attribute information corresponding to each multimedia information;
for example, if the multimedia information in the playlist is arranged in the following order: the method comprises the steps that the imported multimedia information 1 is audio, the imported multimedia information 2 is a picture, the imported multimedia information 3 is a video, the corresponding priority of the multimedia information is determined according to the attribute information of the multimedia information, the priority of the video is higher than the priority of the audio, and the priority of the audio is higher than the priority of the picture, so that a client preloads the multimedia information 3, then preloads the multimedia information 1 and finally loads the multimedia information 2.
Or,
the client side sequentially preloads the multimedia information recorded in the play list according to the sequence of the leading-in time of the multimedia information from morning to evening;
for example, if the multimedia information in the playlist is arranged in the order from the morning to the evening of the import time: multimedia information 2, multimedia information 3, multimedia information 5, the client end first preloads the multimedia information 2, then preloads the multimedia information 3 and finally preloads the multimedia information 5 according to the arrangement sequence of the multimedia information.
Or
And the client pre-loads the multimedia information recorded in the play list in sequence according to the priority set by the user corresponding to the multimedia information.
For example, if the multimedia information in the playlist is arranged in the following order: the user can adjust the arrangement sequence of the multimedia information after forming the play list, and after the user adjusts the arrangement sequence of the multimedia information in the play list, if the arrangement sequence of the multimedia information in the play list is changed into: and the client pre-loads the multimedia information 3, the multimedia information 2, the multimedia information 1 and the multimedia information 4 according to the adjusted sequence.
Based on the same inventive concept, according to the method for preloading multimedia messages of a floating-window player provided in the foregoing embodiment of the present invention, correspondingly, another embodiment of the present invention further provides a device for preloading multimedia messages of a floating-window player, where a schematic structural diagram of the device is shown in fig. 3, and the device specifically includes a detectingunit 300, aprocessing unit 310, and a loading unit 320:
adetection unit 300 for detecting a start point and an end point of the gesture sliding;
theprocessing unit 310 is configured to, when it is determined that the starting point is in a multimedia information area other than the floating window player area and the end point is in the floating window player area, import the multimedia information included in the area where the starting point is located into a playlist of the floating window player;
theloading unit 320 is configured to preload each multimedia information recorded in the playlist in sequence.
Thedetection unit 300 is specifically configured to: after the starting point and the end point of gesture sliding are detected, when the average pressure of the starting point and the average pressure of the end point are judged to be larger than a set value, the sliding operation between the starting point and the end point is determined to be effective preliminarily.
Thedetection unit 300 is specifically configured to: and finally determining that the sliding operation between the starting point and the end point is effective when the length of the line formed by the starting point and the end point is determined to be greater than a certain set value after the average pressure of the starting point and the end point is determined to be greater than a certain set value.
Theprocessing unit 310 is specifically configured to: when two or more multimedia information contained in the area where the starting point is located and the end point is located in the area of the floating window player are judged, the two or more multimedia information are led into a play list of the floating window player; or,
and when the multimedia information contained in the area where the starting point is located is judged to be two or more than two and the end point is in the area of the floating window player, presenting prompt information to a user, and selecting at least one multimedia information to import into a play list of the floating window player according to an instruction input by the user.
Theprocessing unit 310 is specifically configured to: when the starting point is judged to be on an operation interface which contains multimedia information and is arranged outside the floating window player, and the end point is in the area of the floating window player, the multimedia information contained in the area of the operation interface is led into a play list of the floating window player; or,
and when the starting point is judged to be on an application program interface containing the multimedia information outside the floating window player and the end point is in the area of the floating window player, importing the multimedia information contained in the application program interface into a play list of the floating window player.
Theloading unit 320 is specifically configured to: sequentially preloading all the multimedia information recorded in the play list according to the priority preset by the attribute information corresponding to all the multimedia information; or,
sequentially preloading all the multimedia information recorded in the play list according to the sequence of the leading-in time of all the multimedia information from morning to evening; or
And sequentially preloading all the multimedia information recorded in the play list according to the priority level set by the user corresponding to all the multimedia information.
In summary, according to the scheme provided by the embodiment of the present invention, under the situation that the floating window player plays, the multimedia information in the multimedia information area is imported into the form of the floating window player by the method provided by the present invention, so that the multimedia information can be preloaded in sequence according to the priority corresponding to each multimedia information, thereby shortening the buffer waiting time and enabling seamless playing between the multimedia information and the multimedia information.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.