Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Currently, a definition is usually determined when a video starts to be played, and then a corresponding video stream is loaded with the definition, so as to play the video stream. Usually, the determined definition is a default definition or a definition used by a user for viewing a previous video, but a current playing scene and a target video to be played may be different, and particularly, the determined definition does not distinguish whether the current playing mode is a full-screen playing mode, for example, as shown in fig. 1a, a terminal device is currently a vertical screen, and a height ratio of the target video to be played is 16, which is limited by a width in the case of the vertical screen of the terminal device, an actual playing area of the target video to be played only occupies a part of an area of the vertical screen and does not occupy the whole screen, and relatively speaking, as shown in fig. 1b, a playing height ratio of the horizontal screen of the terminal device is 16, and the full-screen playing mode is; similarly, as shown in fig. 1c, the terminal device is currently a landscape screen, the height ratio of the target video to be played is 9, and limited by the height of the terminal device in the case of landscape screen, the actual playing area of the target video to be played does not occupy the whole screen, relatively speaking, as shown in fig. 1d, the playing height ratio of the terminal device in the vertical screen is 9.
In the case of the above-described non-full-screen playback, the video is played back with the determined higher definition, for example, 4k \2k \1080p \720p, and the difference in definition is not large for the user to intuitively feel; however, the high-resolution high-bit-rate video has higher requirements on the network, is more prone to causing the problems of blocking and the first frame being longer, increases the bandwidth cost and the user traffic consumption, and is more prone to causing the defects of blocking, the first frame length and the like particularly in the weak network environment.
In order to solve the technical problem, in the video start-up process, the embodiment of the present disclosure selects a proper video definition according to the current playing scene (full-screen playing or non-full-screen playing) of the terminal device to start up, so that the bandwidth cost can be reduced to a certain extent, the traffic consumption can be reduced, and meanwhile, the problems of a long first frame and a high pause rate caused by high-resolution playing under the non-full-screen playing condition can be reduced.
Specifically, judging whether the current playing mode of the target video is a full-screen playing mode; if the current playing mode of the target video is determined to be a non-full-screen playing mode, loading the target video at a first preset resolution so as to play the target video at the first preset resolution, wherein the first preset resolution is lower than a preset resolution threshold; or if the current playing mode of the target video is determined to be the full-screen playing mode, loading the target video at a second preset resolution to enable the target video to be played at the second preset resolution, wherein the second preset resolution is a user history use resolution or a default resolution.
The following describes a video playing method according to the present disclosure with reference to specific embodiments.
Referring to fig. 2, fig. 2 is a schematic flowchart of a video playing method according to an embodiment of the present disclosure. The method of the embodiment can be applied to terminal equipment, and the video playing method comprises the following steps:
s201, judging whether the current playing mode of the target video is a full-screen playing mode.
In this embodiment, when a target video is played, it may be determined whether a current target play mode is a full-screen play mode, for example, for a conventional mobile phone, when the mobile phone is in a vertical screen (an interface aspect ratio in a vertical screen state is less than 1), and an aspect ratio of the target video is greater than 1, such as 2; when the mobile phone is in a vertical screen mode, and the aspect ratio of the target video is less than or equal to 1, such as 1; for another example, when the mobile phone is in a horizontal screen (the aspect ratio of the interface is greater than 1 in a vertical screen state), and the aspect ratio of the target video is less than 1, as in 1; when the mobile phone is in a landscape mode and the aspect ratio of the target video is greater than or equal to 1, such as 2.
Of course, the lengths and widths of different terminal devices are different, and whether the current playing mode of the target video is the full-screen playing mode or the non-full-screen playing mode can be judged according to actual conditions.
Specifically, the determining whether the current play mode of the target video is a full-screen play mode includes:
if the terminal equipment is in a vertical screen state and the aspect ratio of the target video is greater than 1, determining that the current playing mode of the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the vertical screen state is less than 1; or
If the terminal equipment is in a horizontal screen state and the aspect ratio of the target video is less than 1, determining that the current playing mode for the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the horizontal screen state is greater than 1.
By judging whether the terminal equipment is in a horizontal screen or a vertical screen and judging the aspect ratio of the target video, whether the current playing mode of the target video is a full-screen playing mode or a non-full-screen playing mode can be accurately determined. Of course, whether the current play mode of the target video is the full-screen play mode or the non-full-screen play mode may also be determined in other manners, which is not described herein again.
S202, if the current playing mode of the target video is determined to be a non-full-screen playing mode, loading the target video with a first preset resolution so as to play the target video with the first preset resolution, wherein the first preset resolution is lower than a preset resolution threshold.
In this embodiment, if it is determined that the current play mode for the target video is the non-full-screen play mode, at this time, the difference between the intuitive feelings of the user on the high definition and the low definition is not great, but considering that the high definition requires to load a high-resolution high-bitrate video, the requirement on the network is higher, the problems of jamming and long first frame are more likely to occur, the bandwidth cost and the user traffic consumption are increased, and particularly, the defects of jamming, long first frame and the like are more likely to occur in a weak network environment, so that the target video can be loaded and played with a lower definition as much as possible on the premise of not affecting the viewing experience of the user, that is, the target video can be loaded and played with a lower resolution (recorded as a first preset resolution), thereby reducing the bandwidth cost and the traffic consumption to a certain extent, and simultaneously reducing the problems of long first frame and high jamming rate caused by the high-resolution play under the non-full-screen play condition. The first preset resolution may be lower than a preset resolution threshold, and the preset resolution threshold may be determined according to an actual situation.
Optionally, the first preset resolution may be determined before the target video is loaded at the first preset resolution, and specifically may include:
the method I comprises the following steps: acquiring terminal equipment information; determining the first preset resolution according to the terminal equipment information; or
The second method comprises the following steps: and responding to a first setting instruction of a user, and determining the first preset resolution according to the first setting instruction.
In the first mode, the first preset resolution may be determined according to terminal device information, where the terminal device information may include, but is not limited to, at least one of the following: the model of the terminal device and the performance parameters of the terminal device are determined by the information of the terminal device, wherein the performance parameters of the terminal device include but are not limited to processor performance parameters, memory performance parameters, screen performance parameters and the like, for example, whether the terminal device is a high-end model or a low-end model can be determined by the information of the terminal device, 720p is selected as the first preset resolution if the terminal device is the high-end model, 480p is selected as the first preset resolution if the terminal device is the low-end model, different device performances of the high-end model and the low-end model can be greatly utilized, meanwhile, the bandwidth cost is reduced, the flow consumption is reduced, the problems of long first frame and high jam rate are reduced, and better user experience is obtained.
In the second mode, the first preset resolution may also be set by the user, and the user may set the first preset resolution at any time, and the resolution adopted in the non-full-screen play mode is specified by the first setting instruction.
Of course, the determination of the first preset resolution is not limited to the above-listed manner, and other manners are not illustrated here.
Optionally, on the basis of the foregoing embodiment, a user may preset whether to start a function of playing a video at a first preset resolution in a non-full screen playing mode, if the function is started, execute the video playing method, and if the function is not started, still load the played video in a conventional manner.
In the video playing method provided by this embodiment, whether the current playing mode of the target video is the full-screen playing mode is determined; if the current playing mode of the target video is determined to be a non-full-screen playing mode, loading the target video at a first preset resolution so as to play the target video at the first preset resolution, wherein the first preset resolution is lower than a preset resolution threshold. According to the embodiment, the target video is loaded and played at a lower first preset resolution ratio under the condition of a non-full-screen playing mode, so that the bandwidth cost can be reduced to a certain extent, the flow consumption can be reduced, the problems of longer first frame and high pause rate caused by high-resolution playing under the condition of non-full-screen playing can be solved, and the video watching experience of a user is improved.
In other optional embodiments, when determining whether the current play mode of the target video is the full-screen play mode, if it is determined that the current play mode of the target video is the full-screen play mode, loading the target video at a second preset resolution to play the target video at the second preset resolution, where the second preset resolution is a user history use resolution or a default resolution.
In this embodiment, if it is determined that the current play mode of the target video is the full-screen play mode, a conventional play mode is adopted, that is, the target video is loaded by using the historical use resolution or the default resolution (which is recorded as the second preset resolution) of the user, and then the target video is played by using the second preset resolution. It should be noted that the second predetermined resolution may be higher than the first predetermined resolution, and certainly, may also be smaller than or equal to the first predetermined resolution in some cases, which is not limited herein.
Optionally, the second preset resolution may be determined before the target video is loaded at the second preset resolution, and specifically, the method may include:
the first method is as follows: acquiring the historical use resolution of the user, and determining the historical use resolution as the second preset resolution; or
The second method comprises the following steps: acquiring terminal equipment information, determining a default resolution in a full-screen playing mode according to the terminal equipment information, and determining the default resolution as the second preset resolution; or
The third method comprises the following steps: and responding to a second setting instruction of the user, and determining the second preset resolution according to the second setting instruction.
In the first mode, a historical use resolution of the user, for example, a resolution used by a previous video of the user, may be pre-stored, and if the current play mode of the target video is a full-screen play mode, the historical use resolution of the user is directly inherited, and the target video is continuously played.
In the second mode, a default resolution may also be determined according to the terminal device information, and the second preset resolution may be used as the second preset resolution, which may refer to the above embodiment, for example, whether the terminal device is a high-end model or a low-end model may be determined according to the terminal device information, and the second preset resolution is 1080p if the terminal device is the high-end model, and 720p if the terminal device is the low-end model. Or otherwise determined to be at a default resolution as the second predetermined resolution.
In the third mode, the second preset resolution may also be set by the user, the user may set the second preset resolution at any time, and the resolution adopted in the full-screen play mode is specified by the second setting instruction.
Of course, the determination of the second preset resolution is not limited to the above-listed manners, for example, the second preset resolution is set according to the playing authority of the user (for example, whether the user is a member or not), and other manners are not illustrated here.
Optionally, the second preset resolution may also be any combination of the above manners, for example, as shown in fig. 3, a combination manner for determining the second preset resolution is as follows:
s301, judging whether the historical use resolution of the user exists or not;
s302, if the user historical use resolution exists, determining the user historical use resolution as the second preset resolution; or alternatively
And S303, if the historical use resolution of the user does not exist, determining the default resolution as the second preset resolution.
In this embodiment, when determining the second preset resolution, it may be determined whether there is a user history use resolution, if yes, it is directly determined as the second preset resolution, and if not, the default resolution is used as the second preset resolution, so as to ensure the confirmation of the second preset resolution, thereby ensuring that the target video can be loaded and played at the second preset resolution in the full-screen play mode.
Optionally, the video playing method provided by the above embodiment may be applied to the start-up process of the target video, and may effectively avoid the problems of too long first frame time and stutter, and after the start-up, the playing mode of the target video may also be switched.
In an optional embodiment, if it is determined that the current play mode of the target video is a non-full-screen play mode, the method further includes:
responding to a first play mode switching instruction of a user, switching the play mode from a non-full-screen play mode to a full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution.
In this embodiment, the user may switch from the non-full-screen play mode to the full-screen play mode, for example, click a full-screen play button, or rotate the terminal device, to trigger the first play mode switching instruction, and after receiving the first play mode switching instruction, the terminal device switches the play mode from the non-full-screen play mode to the full-screen play mode, and continues to load the target video at the second preset resolution, that is, the user continues to load the target video at the historical use resolution or the default resolution, and continues to play the target video, so as to ensure that the user obtains the best viewing experience in the full-screen play mode.
In another optional embodiment, if it is determined that the current play mode of the target video is the full-screen play mode, the method further includes:
responding to a second play mode switching instruction of a user, switching the play mode from a full-screen play mode to a non-full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution; or continuously loading the target video at the first preset resolution, so that the target video is continuously played at the first preset resolution.
In this embodiment, a user may switch from the full-screen play mode to the non-full-screen play mode, for example, click a full-screen play exit button, or rotate the terminal device in the same direction, to trigger a second play mode switching instruction, and after receiving the second play mode switching instruction, the terminal device switches the play mode from the full-screen play mode to the non-full-screen play mode, but considering that repeatedly switching the resolution affects user experience, the user may keep the second preset resolution to continuously load and play the target video; certainly, when the second preset resolution is higher than the first preset resolution, if the bandwidth cost is reduced, the traffic consumption is reduced, and the stuck rate is reduced, the target video may be continuously loaded at the first preset resolution, so that the target video is continuously played at the first preset resolution.
Referring to fig. 4, fig. 4 is a schematic flow chart of a video playing method according to an embodiment of the present disclosure. The method of the embodiment can be applied to terminal equipment, and the video playing method comprises the following steps:
s401, judging whether the current playing mode of the target video is a full-screen playing mode;
if the mode is a non-full screen playing mode, executing S402, and if the mode is a full screen playing mode, executing S406;
s402, judging whether a function of playing a video with a first preset resolution in a non-full screen playing mode is started or not;
if the starting is finished, executing S403, otherwise executing S406;
s403, acquiring a first preset resolution; wherein the first preset resolution is lower than a preset resolution threshold;
s404, loading and playing a target video at a first preset resolution;
s405, receiving a first play mode switching instruction of a user; wherein the first playing mode switching instruction indicates that the non-full-screen playing mode is switched to a full-screen playing mode;
wherein S405 is not a step necessarily performed, and S406 may be performed after receiving a first play mode switching instruction of a user;
s406, acquiring a second preset resolution; the second preset resolution is a user historical use resolution or a default resolution;
specifically, whether the user historical use resolution exists is judged, and if the user historical use resolution exists, the user historical use resolution is determined as the second preset resolution; and if the historical use resolution of the user does not exist, determining the default resolution as the second preset resolution.
S407, loading and playing the target video at a second preset resolution;
s408, receiving a second play mode switching instruction of the user; wherein the second playing mode switching instruction indicates that the full-screen playing mode is switched to the non-full-screen playing mode;
wherein S408 is not a step that must be executed, and S409 may be executed after receiving a second play mode switching instruction of the user;
and S409, switching the playing mode from the full-screen playing mode to the non-full-screen playing mode, and continuously loading and playing the target video at a second preset resolution.
Of course, in other optional embodiments, when the play mode is switched from the full-screen play mode to the non-full-screen play mode in S409, the resolution may also be changed, that is, the target video is loaded and played at the first preset resolution.
For the video playing method provided in this embodiment, reference may be made to the foregoing embodiments for implementation principles and technical effects, and details are not described herein again.
Corresponding to the video playing method in the foregoing embodiment, fig. 5 is a block diagram of a video playing device provided in the embodiment of the present disclosure. For ease of illustration, only portions relevant to embodiments of the present disclosure are shown. Referring to fig. 5, the video playback device 500 includes: a judging module 501 and a playing module 502.
A judging module 501, configured to judge whether a current play mode of a target video is a full-screen play mode;
the playing module 502 is configured to, if it is determined that the current playing mode for the target video is the non-full-screen playing mode, load the target video at a first preset resolution so that the target video is played at the first preset resolution, where the first preset resolution is lower than a preset resolution threshold.
In an embodiment of the present disclosure, the playing module 502 is further configured to:
and if the current playing mode of the target video is determined to be a full-screen playing mode, loading the target video at a second preset resolution to play the target video at the second preset resolution, wherein the second preset resolution is a user historical use resolution or a default resolution.
In an embodiment of the present disclosure, when determining whether the current play mode of the target video is a full-screen play mode, the determining module 501 is configured to:
if the terminal equipment is in a vertical screen state and the aspect ratio of the target video is greater than 1, determining that the current playing mode for the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the vertical screen state is less than 1; or
If the terminal device is in a landscape screen state and the aspect ratio of the target video is less than 1, determining that the current playing mode of the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal device in the landscape screen state is greater than 1.
In an embodiment of the disclosure, if it is determined that the current play mode of the target video is the non-full-screen play mode, the play module 502 is further configured to:
responding to a first play mode switching instruction of a user, switching the play mode from a non-full-screen play mode to a full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution.
In an embodiment of the disclosure, if it is determined that the current play mode of the target video is the full-screen play mode, the play module 502 is further configured to:
responding to a second play mode switching instruction of a user, switching the play mode from a full-screen play mode to a non-full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution; or continuing to load the target video at the first preset resolution so as to enable the target video to continue to play at the first preset resolution.
In an embodiment of the present disclosure, the playing module 502 is further configured to, before loading the target video at the first preset resolution:
acquiring terminal equipment information; determining the first preset resolution according to the terminal equipment information; or
And responding to a first setting instruction of a user, and determining the first preset resolution according to the first setting instruction.
In an embodiment of the present disclosure, before the playing module 502 loads the target video at the second preset resolution, the playing module is further configured to:
acquiring the historical use resolution of the user, and determining the historical use resolution as the second preset resolution; or
Acquiring terminal equipment information, determining a default resolution under a full-screen playing mode according to the terminal equipment information, and determining the default resolution as the second preset resolution; or
And responding to a second setting instruction of the user, and determining the second preset resolution according to the second setting instruction.
In an embodiment of the present disclosure, before loading the target video at the second preset resolution, the playing module 502 is further configured to:
judging whether a user historical use resolution exists;
if the user historical use resolution exists, determining the user historical use resolution as the second preset resolution; or alternatively
And if the historical use resolution of the user does not exist, determining the default resolution as the second preset resolution.
The device provided in this embodiment may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
Referring to fig. 6, which shows a schematic structural diagram of an electronic device 600 suitable for implementing the embodiment of the present disclosure, the electronic device 600 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, or the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or installed from the storage means 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided a video playing method, including:
judging whether the current play mode of the target video is a full-screen play mode;
if the current playing mode of the target video is determined to be a non-full-screen playing mode, loading the target video at a first preset resolution so as to play the target video at the first preset resolution, wherein the first preset resolution is lower than a preset resolution threshold.
According to one or more embodiments of the present disclosure, the method further comprises:
and if the current playing mode of the target video is determined to be a full-screen playing mode, loading the target video at a second preset resolution to play the target video at the second preset resolution, wherein the second preset resolution is a user historical use resolution or a default resolution.
According to one or more embodiments of the present disclosure, the determining whether the current play mode of the target video is a full-screen play mode includes:
if the terminal equipment is in a vertical screen state and the aspect ratio of the target video is greater than 1, determining that the current playing mode for the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the vertical screen state is less than 1; or alternatively
If the terminal equipment is in a horizontal screen state and the aspect ratio of the target video is less than 1, determining that the current playing mode for the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the horizontal screen state is greater than 1.
According to one or more embodiments of the present disclosure, if it is determined that the current play mode for the target video is a non-full-screen play mode, the method further includes:
responding to a first play mode switching instruction of a user, switching the play mode from a non-full-screen play mode to a full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution.
According to one or more embodiments of the present disclosure, if it is determined that the current play mode for the target video is the full-screen play mode, the method further includes:
responding to a second play mode switching instruction of a user, switching the play mode from a full-screen play mode to a non-full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution; or continuing to load the target video at the first preset resolution so as to enable the target video to continue to play at the first preset resolution.
According to one or more embodiments of the present disclosure, before the loading the target video at the first preset resolution, the method further includes:
acquiring terminal equipment information; determining the first preset resolution according to the terminal equipment information; or
And responding to a first setting instruction of a user, and determining the first preset resolution according to the first setting instruction.
According to one or more embodiments of the present disclosure, before the loading the target video at the second preset resolution, the method further includes:
acquiring the historical use resolution of the user, and determining the historical use resolution as the second preset resolution; or alternatively
Acquiring terminal equipment information, determining a default resolution in a full-screen playing mode according to the terminal equipment information, and determining the default resolution as the second preset resolution; or alternatively
And responding to a second setting instruction of the user, and determining the second preset resolution according to the second setting instruction.
According to one or more embodiments of the present disclosure, before loading the target video at the second preset resolution, the method further includes:
judging whether a user historical use resolution exists;
if the user historical use resolution exists, determining the user historical use resolution as the second preset resolution; or
And if the historical use resolution of the user does not exist, determining the default resolution as the second preset resolution.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a video playback device including:
the judging module is used for judging whether the current playing mode of the target video is a full-screen playing mode;
the playing module is used for loading the target video with a first preset resolution ratio if the current playing mode of the target video is determined to be a non-full-screen playing mode, so that the target video is played with the first preset resolution ratio, wherein the first preset resolution ratio is lower than a preset resolution ratio threshold value.
According to one or more embodiments of the present disclosure, the play module is further configured to:
and if the current playing mode of the target video is determined to be a full-screen playing mode, loading the target video at a second preset resolution to play the target video at the second preset resolution, wherein the second preset resolution is a user historical use resolution or a default resolution.
According to one or more embodiments of the present disclosure, when determining whether the current play mode of the target video is a full-screen play mode, the determining module is configured to:
if the terminal equipment is in a vertical screen state and the aspect ratio of the target video is greater than 1, determining that the current playing mode for the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the vertical screen state is less than 1; or
If the terminal equipment is in a horizontal screen state and the aspect ratio of the target video is less than 1, determining that the current playing mode for the target video is a non-full screen playing mode, wherein the interface aspect ratio of the terminal equipment in the horizontal screen state is greater than 1.
According to one or more embodiments of the present disclosure, if it is determined that the current play mode for the target video is a non-full-screen play mode, the play module is further configured to:
responding to a first play mode switching instruction of a user, switching the play mode from a non-full-screen play mode to a full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution.
According to one or more embodiments of the present disclosure, if it is determined that the current play mode of the target video is a full-screen play mode, the play module is further configured to:
responding to a second play mode switching instruction of a user, switching the play mode from a full-screen play mode to a non-full-screen play mode, and continuously loading the target video at a second preset resolution so as to continuously play the target video at the second preset resolution; or continuing to load the target video at the first preset resolution so as to enable the target video to continue to play at the first preset resolution.
According to one or more embodiments of the present disclosure, before loading the target video at the first preset resolution, the playing module is further configured to:
acquiring terminal equipment information; determining the first preset resolution according to the terminal equipment information; or alternatively
And responding to a first setting instruction of a user, and determining the first preset resolution according to the first setting instruction.
According to one or more embodiments of the present disclosure, before loading the target video at the second preset resolution, the playing module is further configured to:
acquiring the historical use resolution of the user, and determining the historical use resolution as the second preset resolution; or
Acquiring terminal equipment information, determining a default resolution in a full-screen playing mode according to the terminal equipment information, and determining the default resolution as the second preset resolution; or
And responding to a second setting instruction of the user, and determining the second preset resolution according to the second setting instruction.
According to one or more embodiments of the present disclosure, before the target video is loaded at the second preset resolution, the playing module is further configured to:
judging whether a user historical use resolution exists;
if the user historical use resolution exists, determining the user historical use resolution as the second preset resolution; or
And if the historical use resolution of the user does not exist, determining the default resolution as the second preset resolution.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor and memory;
the memory stores computer execution instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the video playback method as described above in the first aspect and various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the video playing method according to the first aspect and various possible designs of the first aspect is implemented.
In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided a computer program product comprising computer executable instructions that, when executed by a processor, implement the video playback method as described in the first aspect and various possible designs of the first aspect.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other combinations of features described above or equivalents thereof without departing from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.