CN113507634A - Video playing method and device, electronic equipment and readable storage medium - Google Patents

Video playing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113507634A
CN113507634A CN202110726713.6A CN202110726713A CN113507634A CN 113507634 A CN113507634 A CN 113507634A CN 202110726713 A CN202110726713 A CN 202110726713A CN 113507634 A CN113507634 A CN 113507634A
Authority
CN
China
Prior art keywords
resolution
canvas
video
display
screen
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.)
Pending
Application number
CN202110726713.6A
Other languages
Chinese (zh)
Inventor
张旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wingtech Information Technology Co Ltd
Shanghai Wentai Information Technology Co Ltd
Original Assignee
Shanghai Wingtech Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Wingtech Information Technology Co Ltd filed Critical Shanghai Wingtech Information Technology Co Ltd
Priority to CN202110726713.6A priority Critical patent/CN113507634A/en
Publication of CN113507634A publication Critical patent/CN113507634A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The present disclosure relates to a video playing method, apparatus, electronic device and readable storage medium, including: the method comprises the steps of obtaining the video resolution of a video to be played and obtaining the screen resolution of a touch display screen in the electronic equipment; determining the canvas resolution of a display canvas according to the video resolution and the screen resolution, wherein the canvas resolution is the maximum resolution which enables the video to be played in a non-deformation mode; and loading the video to be played to the full display canvas, and outputting the display canvas on the touch display screen according to the canvas resolution. Compared with the mode that the display canvas with the same size as the touch display screen is used for playing the video in the prior art, the scheme provided by the disclosure reduces the influence on playing the video caused by mistakenly touching the non-video playing area of the display screen by the user, and improves the user experience.

Description

Video playing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of multimedia playing technologies, and in particular, to a video playing method and apparatus, an electronic device, and a readable storage medium.
Background
When a video is played by touch electronic equipment such as a smart phone, a video file is loaded to a display canvas by a playing application program and is transmitted to an operating system through the display canvas to be played on a touch display screen of the touch electronic equipment.
When the video to be played is played in a full-screen mode, the screen resolution of the display canvas is set to be the screen resolution of the electronic equipment; if the video resolution of the video to be played is not consistent with the screen resolution of the touch electronic device, the video content is deformed due to the fact that the video to be played is played in a full screen mode, and watching experience is affected.
In the prior art, in order to avoid deformation of video content caused by playing of a video to be played, when the video to be played is loaded to a display canvas, it is first determined whether a video resolution of the video to be played is matched with a screen resolution of an electronic device. And if the video resolution and the screen resolution do not match, filling a background area on the display canvas according to the video resolution and the screen resolution, and displaying the background area when the video is played.
Because the background area is used as a part of the display canvas, if the user mistakenly touches the background area of the control display screen, the display progress bar and the status bar are triggered, or the video playing is triggered to stop.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a video playing method, apparatus, electronic device and readable storage medium.
In one aspect, the present disclosure provides a video playing method, including:
the method comprises the steps of obtaining the video resolution of a video to be played and obtaining the screen resolution of a touch display screen in the electronic equipment;
determining the canvas resolution of the display canvas according to the video resolution and the screen resolution; the canvas resolution is the maximum resolution for enabling the video to be played in a non-deformation mode;
loading the video to be played to the display canvas which is fully paved; and outputting the display canvas on a touch display screen according to the canvas resolution.
Optionally, before the obtaining the video resolution of the video to be played and the screen resolution of the touch display screen in the electronic device, the method further includes:
determining a placement state of the electronic device; the placing state is a horizontal screen state or a vertical screen state;
the method for acquiring the screen resolution of the touch display screen in the electronic equipment comprises the following steps: and determining the screen resolution of the touch display screen according to the placement state.
Optionally, determining the placement state of the electronic device includes:
acquiring a detection signal generated by an inertial sensor in electronic equipment;
and determining the placement state of the electronic equipment according to the detection signal generated by the inertial sensor.
Optionally, the outputting the display canvas on a touch display screen according to the canvas resolution includes:
determining a holding state of the electronic device; the holding state comprises an upper holding, a lower holding, a left holding, a right holding, an upper holding, a lower holding or a four-side holding;
determining a display position of the display canvas according to the holding state;
outputting the display canvas at the display location according to the canvas resolution.
Optionally, the determining the holding state of the electronic device includes:
acquiring a detection signal generated by a sensor in the electronic equipment; the sensor comprises at least one of a pressure sensor, a distance sensor and the touch display screen;
and determining the holding state of the electronic equipment according to the detection signal.
Optionally, the outputting the display canvas on a touch display screen according to the canvas resolution includes:
outputting the display canvas according to the canvas resolution at a preset position of the touch display screen;
detecting a movement operation instruction generated by touching the display canvas;
and adjusting and determining the display position of the display canvas according to the moving operation instruction.
Optionally, the method further comprises:
and displaying a preset background in other display areas except the display area for outputting the display canvas in the touch display screen.
In another aspect, the present disclosure provides a video playing device, including:
the resolution acquisition unit is used for acquiring the video resolution of a video to be played and acquiring the screen resolution of a touch display screen in the electronic equipment;
the canvas determining unit is used for determining the canvas resolution of the display canvas according to the video resolution and the screen resolution; the canvas resolution is the maximum resolution for enabling the video to be played in a non-deformation mode;
the video playing unit is used for loading the video to be played to the display canvas which is fully paved; and outputting the display canvas on a touch display screen according to the canvas resolution.
In yet another aspect, the present disclosure provides an electronic device comprising a processor, a memory, and a touch display screen;
the processor calls the program or the instruction stored in the memory to execute the steps of the method, and the video is played on the touch display upper screen.
In yet another aspect, the present disclosure provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of the method as previously described.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
by adopting the video playing method, the video playing device, the electronic equipment and the computer readable storage medium provided by the disclosure, when the to-be-played video is played on the full screen of the touch display screen, the canvas resolution is determined according to the video resolution and the screen resolution, so that the to-be-played video is not directly set as the screen resolution of the touch display screen as in the prior art, and the maximum resolution is not output in a non-deformation manner. Therefore, when the display canvas is output to the touch display screen to play the video, part of the display area of the touch display screen is not used for displaying the canvas. After the touch instruction is generated by mistakenly touching the area outside the display canvas in the display screen, the touch instruction is not sent to the application program generating the display canvas, so that the application program is not triggered to display the output progress bar and the status bar, or the video playing is not triggered to stop.
Compared with the existing mode that the display canvas with the same resolution of the touch display screen is used for playing the video, the scheme provided by the disclosure reduces the influence on the playing video caused by the fact that the user mistakenly touches the non-video playing area of the display screen, and improves the user experience.
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.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a video playing method according to some embodiments of the present disclosure;
FIG. 2 is a flowchart of a method for outputting a display canvas using a touch display screen according to some embodiments of the present disclosure;
FIG. 3 is a schematic view of a user holding an electronic device in some embodiments of the present disclosure;
FIG. 4 is a flowchart of another method for outputting a display canvas using a touch display screen according to some embodiments of the present disclosure;
FIG. 5 is a schematic diagram of a display canvas before and after adjustment according to some embodiments of the present disclosure;
fig. 6 is a schematic structural diagram of a video playing apparatus according to some embodiments of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device in some embodiments of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a flowchart of a video playing method provided in some embodiments of the present disclosure, where the video playing method shown in fig. 1 may be executed by an electronic device having video processing capability and employing a touch display screen as an output display screen; an electronic device may exemplarily be understood as a device such as a smartphone, a tablet computer, etc.
As shown in fig. 1, a video playing method provided by some embodiments of the present disclosure includes steps S101 to S103.
Step S101: the method comprises the steps of obtaining the video resolution of a video to be played and obtaining the screen resolution of a touch display screen in the electronic equipment.
The video resolution of the video to be played refers to the image resolution of a video frame in the video to be played, and the video resolution includes a horizontal resolution in a horizontal direction and a vertical resolution in a vertical direction.
In some embodiments of the present disclosure, the method for obtaining the video resolution of the video to be played includes the following steps. 1, if the video to be played is a video file stored in a local memory, determining the video resolution of the video to be played by reading the header file information of the video file. 2, if the video to be played is a video stream sent by the server, the video resolution of the video to be played can be determined by analyzing the metadata of the video stream. It should be noted that the method for obtaining the video resolution of the video to be played is not limited to the foregoing example, and other methods known in the art may also be used to obtain the video resolution of the video to be played.
The screen resolution of the touch display screen also includes a lateral resolution in the lateral direction and a longitudinal resolution in the longitudinal direction. In some embodiments of the present disclosure, the screen resolution of the touch display screen may be obtained by reading a touch display screen attribute configuration file of the electronic device.
Step S102: and determining the canvas resolution of the display canvas according to the video resolution and the screen resolution.
The display canvas is a canvas for carrying a video to be played. In some embodiments of the present disclosure, the canvas resolution of the display canvas is a maximum resolution of the non-deformation output of the video to be played when the video to be played is played by using the touch display screen.
In some embodiments of the present disclosure, determining the canvas resolution of the display canvas based on the video resolution and the screen resolution may be performed as follows.
First, a lateral resolution and a longitudinal resolution in a video resolution are acquired, and a lateral resolution and a longitudinal resolution in a screen resolution are acquired.
Then, comparing the transverse resolution of the video resolution with the transverse resolution of the screen resolution to obtain a transverse scaling ratio; and comparing the vertical resolution of the video resolution with the vertical resolution of the screen resolution to obtain a vertical scaling ratio.
Then, the larger value of the lateral resolution and the longitudinal resolution is selected as the actual scaling ratio.
Finally, the canvas resolution is determined by adopting the actual scaling ratio and the horizontal resolution and the vertical resolution in the video resolution.
For example, in one particular application of the embodiments of the present disclosure: the video resolution of a video to be played is 800 × 600, wherein 800 is the transverse resolution and 600 is the longitudinal resolution; the screen resolution of the touch display screen is 1920 × 1080, where 1920 is the horizontal resolution and 1080 is the vertical resolution. The lateral scaling ratio obtained from the two lateral resolutions is 0.417 and the longitudinal scaling ratio obtained from the two longitudinal resolutions is 0.556. Selecting a numerical value with a larger value in the horizontal scaling ratio and the vertical scaling ratio as an actual scaling ratio, namely selecting 0.556 as the actual scaling ratio; finally, the horizontal resolution and the vertical resolution in the actual scaling ratio and the video resolution are adopted, the horizontal resolution of the canvas is determined to be 800/0.556-1439, and the vertical resolution of the canvas is determined to be 600/0.556-1080. That is, the canvas resolution of the display canvas used to output the video to be played is 1439 × 1080.
S103: and loading the video to be played to the full display canvas, and outputting the display canvas on the touch display screen according to the canvas resolution.
In some embodiments of the present disclosure, the loading of the to-be-played video value and the display canvas are performed by determining how to scale each video frame of the to-be-played video according to the horizontal resolution and the vertical resolution of the display canvas and the horizontal resolution and the vertical resolution of the to-be-played video, so as to fully cover the display canvas.
In some embodiments of the present disclosure, it may be determined how to zoom in and out with respect to the horizontal and vertical directions of the video to be played according to the actual zoom ratio determined in step S102, so that the video to be played is spread over the display canvas. Specifically, if the actual zoom ratio is greater than 1, the display canvas is fully paved with the video frames of the video to be played in an enlarging manner, and if the actual zoom ratio is less than 1, the display canvas is fully paved with the video to be played in a reducing manner.
After the display canvas is fully paved with the video to be played, the display canvas can be output on the touch display screen according to the canvas resolution. Because the display canvas refreshes the display canvas in real time according to the video frame frequency of the video to be played or the set refresh rate, the video playing can be realized by outputting the display canvas through the touch display screen.
By adopting the video playing method provided by the embodiment of the disclosure, when the to-be-played video is played in a full screen mode on the touch display screen, the canvas resolution is determined according to the video resolution and the screen resolution, so that the maximum resolution of the to-be-played video is not directly set as the screen resolution of the touch display screen as in the prior art, and therefore when the display canvas is output to the touch display screen to play the video, part of the display area of the touch display screen is not used for displaying the canvas.
After the touch instruction is generated by mistakenly touching the area outside the display canvas in the display screen, the touch instruction is not sent to the application program generating the display canvas, so that the application program is not triggered to display the output progress bar and the status bar, or the video playing is not triggered to stop.
Compared with the existing mode that the display canvas with the same resolution as the touch display screen is used for playing the video, the video playing method provided by the embodiment of the disclosure reduces the influence on the playing of the video caused by the fact that a user mistakenly touches a non-video playing area of the display screen, and improves the user experience.
In some embodiments of the present disclosure, the video playing method may further include step S100 before step S101 is executed, in addition to the aforementioned steps S101-S103.
Step S100: the placement state of the electronic device is determined.
In practical application, the electronic equipment may be in different placement states, and the placement state of the electronic equipment may be a horizontal screen state or a vertical screen state according to the long edge placement state identifier of the touch display screen; if the long edge of the touch display screen is vertically arranged, the arrangement state of the electronic equipment is a vertical screen state; if the long edge of the touch display screen is placed transversely, the electronic equipment is placed in a transverse screen state.
In some embodiments of the present disclosure, in a case that the video playing method includes step S100 of detecting a placement state of the electronic device, the method of determining the screen resolution of the touch display screen of the electronic device in step S101 may specifically include: and determining the screen resolution of the touch display screen according to the placement state.
To enhance the user experience, some electronic devices enable an auto-rotation function. When the touch display screen is switched from one placement state to another placement state, the playing content in the image canvas of the touch display screen is adaptively rotated. Since the horizontal resolution and the vertical resolution in the screen resolution of the electronic device may not be the same, in order to ensure that the maximum resolution for outputting the video to be played in a non-deformed manner is formed, the screen resolution of the touch display screen needs to be determined according to the placement state of the electronic device.
For example, the resolution of a touch display screen in a certain electronic device is 1920 in the length direction and 1080 in the width direction. If the electronic device is in the portrait state, the screen resolution of the electronic device is set to 1080 in the landscape resolution and 1920 in the portrait resolution. If the electronic device is in a landscape state, the screen resolution of the electronic device is set to 1920 in the landscape direction and 1080 in the portrait direction.
In some embodiments of the present disclosure, a method of determining a placement state of an electronic device may include the following steps. Firstly, acquiring a detection signal generated by an inertial sensor in electronic equipment; the placement state of the electronic device is then determined based on the detection signal generated by the inertial sensor.
In some embodiments of the present disclosure, an inertial sensor in the electronic device generates the detection signal in real time while the electronic device is in use. According to the detection signal, whether the placement state of the electronic equipment is a landscape screen state or a portrait screen state can be determined.
Fig. 2 is a flowchart of a method for outputting a display canvas using a touch display screen according to some embodiments of the present disclosure. As shown in fig. 2, in some embodiments of the present disclosure, a method of outputting a display canvas using a touch display screen includes steps S1031 to S1033.
S1031: a grip state of the electronic device is determined.
The holding state of the electronic device is a state in which the user holds the electronic device while using the electronic device. The grip state of the electronic device may include: left-hand grip, right-hand grip, upper-hand grip, lower-hand grip, bilateral grip, and quadrilateral grip.
A left grip is a left edge indicating that the user is holding the electronic device. A right grip refers to a user holding the right edge of the electronic device. The upper grip refers to a user holding an upper edge of the electronic device. Lower grip refers to a user gripping the lower edge of the electronic device. The left and right sides holding means that the user holds the left and right edges of the electronic device. The upper and lower double-sided holding is that a user holds the upper and lower edges of the electronic device. A four-sided grip refers to a user holding the four-sided edges of an electronic device.
When the electronic equipment is in different holding states, the situation that the fingers of the user touch the touch display screen of the electronic equipment by mistake is different.
For example, in the left-side holding state, the possibility that the user's hand touches the left area of the touch display screen by mistake is high, and the possibility that the user touches the other areas of the touch display screen by mistake is low. On the contrary, in the right holding state, the possibility that the right hand of the user mistakenly touches the right area of the touch display screen is high, and the possibility that the user mistakenly touches other areas of the touch display screen is low.
In some embodiments of the present disclosure, the step of acquiring the holding state of the electronic device may include steps S10311-S10312.
Step S10311: a detection signal generated by a sensor in an electronic device is acquired.
The sensor used in step S10311 may include at least one of a pressure sensor, a distance sensor, and a touch display screen; when a user holds the electronic device, the holding hand of the user triggers the sensor at the corresponding holding position to generate a detection signal.
Step S10312: and determining the holding state of the electronic equipment according to the detection signal.
In step S10312, the holding state of the electronic device may be determined based on the detection signal and the preset correspondence between the detection signal and the holding state.
For example, in the case that the user holds the electronic device on the left, if the hand of the user contacts the left edge of the touch display screen, the left area of the touch display screen is triggered to generate a detection signal. Correspondingly, according to the detection signal generated by the touch display screen, it can be determined that the user holds the electronic device on the left side.
For another example, if each frame of the electronic device is installed with a pressure sensor, the pressure sensor at the corresponding position may be triggered to generate a pressure signal when the user holds the electronic device. Correspondingly, according to the pressure signal and the position of the pressure sensor corresponding to the pressure signal, the holding state of the electronic device can be determined.
For another example, if a distance sensor is installed at an edge position of the electronic device, when the user holds the electronic device, the distance signal generated by the distance sensor at a position corresponding to the holding hand is a signal indicating that the distance is short. According to the distance signals generated by the distance sensors, which hand of the user is closer to the electronic equipment can be determined, and accordingly the holding state of the electronic equipment is determined.
In some embodiments of the present disclosure, the electronic device is an electronic device such as a smart phone and the like, in which four sides of the electronic device can be held, and in this case, the electronic device may further be configured with an inertial sensor, so as to determine a placement state of the electronic device according to a detection signal generated by the inertial sensor, and then perform comprehensive judgment according to the placement state and the detection signal generated by the pressure sensor, the distance sensor, and the touch display screen, so as to determine a holding state of the electronic device.
After determining the grip state of the electronic device, step S1032 may be performed.
Step S1032: a display position of the display canvas is determined according to the holding state.
In some embodiments of the present disclosure, the display position of the display canvas is determined according to the holding state, so that the display canvas is kept away from the hand of the user as far as possible, and then the user is prevented from shielding the display canvas by the hand and touching the display canvas by mistake.
FIG. 3 is a schematic view of a user holding an electronic device in some embodiments of the present disclosure. As shown in fig. 3, the holding state of the electronic device 31 is a right holding state, specifically, the user holds the right area of the electronic device with the right hand 32. At this time, the right hand of the user may block the right side area of the touch display screen 311 and may touch the right side area by mistake. To avoid the aforementioned occlusion and false touch problems, the display canvas 312 is disposed in the left area of the touch display screen. As shown in FIG. 3, the dashed box represents the display location of the display canvas 312.
Step S1033: the display canvas is output at the display location according to the canvas resolution.
After determining the display area of the touch display screen for displaying the canvas, step S1033 outputs the display canvas in the canvas area according to the canvas resolution, so as to implement playing of the video.
By adopting the video playing method provided by the embodiment of the disclosure, the display position of the display canvas in the touch display screen is determined by determining the holding state of the electronic equipment, so that the display canvas is far away from the hand of the user as far as possible, the situation that the hand shields the played video is avoided, and the situation that the hand touches the area where the display canvas is located by mistake is avoided.
Fig. 4 is a flowchart of another method for outputting a display canvas using a touch display screen according to some embodiments of the present disclosure. As shown in FIG. 4, in some further embodiments of the present disclosure, a method of outputting a display canvas includes steps S1034-S1036.
Step S1034: and outputting the display canvas according to the canvas resolution at the preset position of the touch display screen.
The preset position is preset for outputting a display position of the display canvas. For example, the preset position may be a middle position of the touch display screen, and the corresponding display canvas displays output in the middle of the touch display screen.
Step S1035: a movement operation instruction generated by touching the display canvas is detected.
The moving operation instruction is an instruction for triggering the moving of the display canvas position, and the moving operation instruction may be a sliding instruction or a dragging instruction. In some embodiments of the present disclosure, the moving operation instruction is an instruction generated by a user touching the display canvas, and the moving operation instruction is generated only when the touch operation acts on an area of the display canvas output by the touch display screen.
Step S1036: and adjusting the display position of the display canvas according to the moving operation instruction.
And adjusting the display position of the display canvas according to the operation instruction, namely moving the display position of the display canvas on the touch display screen according to the moving direction and/or the moving distance specified by the moving operation instruction.
Figure 5 is a schematic diagram of display canvas before and after adjustment according to some embodiments of the present disclosure. As shown in fig. 5, according to the detected moving touch instruction, the display canvas 51 moves from the middle position of the touch display screen 53 to the right side of the touch display screen 53 at the display position of the electronic device 52,
through the foregoing steps S1034-S1036, the electronic device may adjust the display position of the display canvas according to the user requirement, so as to adapt to the user requirement, and improve the user experience of the user.
In the foregoing embodiment, after the display canvas is output at the preset position, the display canvas is moved according to the detected moving operation instruction. In other embodiments of the present disclosure, the display position of the display canvas may also be determined by using the foregoing steps S1031 to S1033, and then the moving position of the display canvas may be adjusted by using the steps S1035 to S1036.
In addition to implementing video playing by outputting the display canvas by using the video playing method provided in the foregoing steps S101 to S103 or steps S100 to S103, in some embodiments of the present disclosure, the video playing method may further include step S104: and displaying a preset background in other display areas except the output display canvas in the touch display screen. Step S104 may be performed simultaneously with step S103.
The preset background may be a background of a default setting of the electronic device, for example, a black background. The preset background may also be a user-selected background, such as a user-selected photograph.
The other display areas except the display canvas in the touch display screen are set as the preset background, so that the display content of the touch display screen meets the requirement of a user for watching the video, and the user experience is further improved.
In particular, in some embodiments of the present disclosure, if the preset background device is a black background, the power consumption of the touch display screen may also be reduced. For example, if the touch display screen is an LCD display screen, the power consumption of the touch display screen may be reduced by turning off the backlight light source corresponding to the background area. For another example, if the touch display screen is an LED display screen, the power consumption of the touch display screen may be reduced by turning off the light emitting point corresponding to the background area.
Besides providing the video playing method, the implementation of the present disclosure also provides a video playing device.
Fig. 6 is a schematic structural diagram of a video playing apparatus according to some embodiments of the present disclosure; as shown in fig. 6, the video playback apparatus 600 includes a resolution acquisition unit 601, a canvas determination unit 602, and a video playback unit 603.
The resolution obtaining unit 601 is configured to obtain a video resolution of a video to be played and obtain a screen resolution of a touch display screen in the electronic device.
The canvas determining unit 602 is configured to determine a canvas resolution of the display canvas according to the video resolution and the screen resolution; the canvas resolution is the maximum resolution which enables the video to be played in a non-deformation mode;
the video playing unit 603 is configured to load a video to be played to the full display canvas; and outputting the display canvas on the touch display screen according to the canvas resolution.
By adopting the video playing device provided by the embodiment of the disclosure, when a video to be played is played in a full screen mode on the touch display screen, the canvas resolution is the maximum resolution which enables the video to be played to be output in a non-deformation mode and is determined according to the video resolution and the screen resolution, the screen resolution is not directly set as the screen resolution of the touch display screen in the prior art, and therefore when the display canvas is output to the touch display screen to play the video, part of the display area of the touch display screen is not used for displaying the canvas.
After the touch instruction is generated by mistakenly touching the area outside the display canvas in the display screen, the touch instruction is not sent to the application program generating the display canvas, so that the application program is not triggered to display an output progress bar and a status bar or stop playing the video
Compared with the existing mode that the display canvas with the same resolution of the touch display screen is used for playing the video, the scheme provided by the disclosure reduces the influence on the playing video caused by the fact that the user mistakenly touches the non-video playing area of the display screen, and improves the user experience.
In some embodiments of the present disclosure, the playing apparatus of the video may further include a placement state determining unit; the placement state determining unit is used for determining the placement state of the electronic equipment; the placing state is a horizontal screen state or a vertical screen state; correspondingly, the resolution obtaining unit 601 determines the screen resolution of the touch display screen according to the placement state.
In some embodiments of the present disclosure, the placement state determination unit includes a detection signal acquisition subunit and a placement state determination subunit. The detection signal acquisition subunit is used for acquiring a detection signal generated by an inertial sensor in the electronic equipment. The placement state determining subunit is used for determining the placement state of the electronic equipment according to the detection signal generated by the inertial sensor.
In some embodiments of the present disclosure, the video playing unit 603 includes a holding state determining subunit, a display position determining subunit, and a first video playing subunit. The holding state determining subunit is used for determining the holding state of the electronic equipment; the holding state comprises upper holding, lower holding, left-right holding, upper-lower holding or four-side holding. The display position determining subunit is configured to determine a display position of the display canvas according to the holding state. The first video playing subunit is used for outputting the display canvas at the display position according to the canvas resolution.
In some embodiments of the present disclosure, the grip state determination subunit includes a detection signal acquisition module and a grip state determination module. The detection signal acquisition module is used for acquiring a detection signal generated by a sensor in the electronic equipment; the sensor comprises at least one of a pressure sensor, a distance sensor and a touch display screen. The holding state determining module is used for determining the holding state of the electronic equipment according to the detection signal.
In some embodiments of the present disclosure, the video playing unit 603 includes a second video playing subunit, a movement instruction acquiring subunit, and a display position adjusting subunit. The second video playing subunit is used for outputting and displaying the canvas at a preset position of the touch display screen according to the canvas resolution. The movement instruction acquisition subunit is used for detecting a movement operation instruction generated by touching the display canvas. The display position adjusting subunit is configured to adjust a display position of the display canvas according to the moving operation instruction.
In some embodiments of the present disclosure, the video playing apparatus may further include a background display unit, where the background display unit is configured to display a preset background in the touch display screen in addition to other display areas of the output display canvas.
The embodiment of the present disclosure further provides an electronic device, which includes a processor, a memory and a touch display screen, where the memory stores a computer program, and when the computer program is executed by the processor, the video playing method may be implemented to play a video using the touch display screen.
For example, fig. 7 is a schematic structural diagram of an electronic device in some embodiments of the present disclosure. Referring now specifically to fig. 7, a schematic diagram of an electronic device 700 suitable for use in implementing embodiments of the present disclosure is shown.
As shown in fig. 7, the electronic device 700 may include a processing means 701 (e.g., a central processing unit, a graphics processor, etc.) that may perform various appropriate actions and processes in accordance with a program stored in a read only memory ROM702 or a program loaded from a storage means 708 into a random access memory RAM 703. In the RAM703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch display screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 700 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 embodiments of the present disclosure, the processes described above for the method embodiments may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, 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 in the present disclosure can 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. 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: determining the video resolution of a video to be played and determining the screen resolution of a touch display screen in the electronic equipment; determining the canvas resolution of the display canvas according to the video resolution and the screen resolution; the canvas resolution is the maximum resolution which enables the video to be played in a non-deformation mode; loading a video to be played to a display canvas which is fully paved; and outputting the display canvas on the touch display screen according to the canvas resolution.
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.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A video playback method, comprising:
the method comprises the steps of obtaining the video resolution of a video to be played and obtaining the screen resolution of a touch display screen in the electronic equipment;
determining the canvas resolution of the display canvas according to the video resolution and the screen resolution; the canvas resolution is the maximum resolution for enabling the video to be played in a non-deformation mode;
loading the video to be played to the display canvas which is fully paved; and outputting the display canvas on a touch display screen according to the canvas resolution.
2. The method according to claim 1, wherein before the obtaining the video resolution of the video to be played and obtaining the screen resolution of the touch display screen in the electronic device, the method further comprises:
determining a placement state of the electronic device; the placing state is a horizontal screen state or a vertical screen state;
the method for acquiring the screen resolution of the touch display screen in the electronic equipment comprises the following steps: and determining the screen resolution of the touch display screen according to the placement state.
3. The method of claim 2, wherein the determining the placement state of the electronic device comprises:
acquiring a detection signal generated by an inertial sensor in electronic equipment;
and determining the placement state of the electronic equipment according to the detection signal generated by the inertial sensor.
4. The method of claim 1, wherein outputting the display canvas on a touch-sensitive display screen according to the canvas resolution comprises:
determining a holding state of the electronic device; the holding state comprises a left holding, a right holding, an upper holding, a lower holding, a left holding, a right holding, an upper holding, a lower holding or a four-side holding;
determining a display position of the display canvas according to the holding state;
outputting the display canvas at the display location according to the canvas resolution.
5. The method of claim 4, wherein the determining the grip state of the electronic device comprises:
acquiring a detection signal generated by a sensor in the electronic equipment; the sensor comprises at least one of a pressure sensor, a distance sensor and the touch display screen;
and determining the holding state of the electronic equipment according to the detection signal.
6. The method of claim 1, wherein outputting the display canvas on a touch-sensitive display screen according to the canvas resolution comprises:
outputting the display canvas according to the canvas resolution at a preset position of the touch display screen;
detecting a movement operation instruction generated by touching the display canvas;
and adjusting the display position of the display canvas according to the moving operation instruction.
7. The method of claim 1, further comprising:
and displaying a preset background in other display areas except the display area for outputting the display canvas in the touch display screen.
8. A video playback apparatus, comprising:
the resolution acquisition unit is used for acquiring the video resolution of a video to be played and acquiring the screen resolution of a touch display screen in the electronic equipment;
the canvas determining unit is used for determining the canvas resolution of the display canvas according to the video resolution and the screen resolution; the canvas resolution is the maximum resolution for enabling the video to be played in a non-deformation mode;
the video playing unit is used for loading the video to be played to the display canvas which is fully paved; and outputting the display canvas on a touch display screen according to the canvas resolution.
9. An electronic device is characterized by comprising a processor, a memory and a touch display screen;
the processor calls the program or the instructions stored in the memory to execute the steps of the method according to any one of claims 1 to 7, and plays the video on the touch display screen.
10. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 7.
CN202110726713.6A 2021-06-29 2021-06-29 Video playing method and device, electronic equipment and readable storage medium Pending CN113507634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110726713.6A CN113507634A (en) 2021-06-29 2021-06-29 Video playing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110726713.6A CN113507634A (en) 2021-06-29 2021-06-29 Video playing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113507634A true CN113507634A (en) 2021-10-15

Family

ID=78010822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110726713.6A Pending CN113507634A (en) 2021-06-29 2021-06-29 Video playing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113507634A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356270A (en) * 2022-01-10 2022-04-15 西安数拓网络科技有限公司 Multi-screen animation display method and device and computer equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630144A (en) * 2014-11-26 2016-06-01 华为终端(东莞)有限公司 Handheld terminal and screen display control method thereof
CN106686232A (en) * 2016-12-27 2017-05-17 努比亚技术有限公司 Method for optimizing control interfaces and mobile terminal
CN106855783A (en) * 2016-12-16 2017-06-16 广东欧珀移动通信有限公司 A kind of method of false-touch prevention, device and mobile terminal
CN107831966A (en) * 2017-10-27 2018-03-23 北京珠穆朗玛移动通信有限公司 Method, mobile terminal and the storage medium of false-touch prevention
US20200195877A1 (en) * 2018-12-17 2020-06-18 Beijing Xiaomi Mobile Software Co., Ltd. Operation method, device, apparatus and storage medium of playing video
CN111372126A (en) * 2019-06-27 2020-07-03 杭州海康威视***技术有限公司 Video playing method, device and storage medium
CN111488098A (en) * 2019-01-28 2020-08-04 北京小米移动软件有限公司 Method and device for adjusting parameters of touch screen, electronic equipment and storage medium
CN112104784A (en) * 2020-09-16 2020-12-18 珠海格力电器股份有限公司 Display method, display device, computer-readable storage medium, and electronic apparatus
CN112363647A (en) * 2020-11-06 2021-02-12 北京小米移动软件有限公司 Touch operation method and device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630144A (en) * 2014-11-26 2016-06-01 华为终端(东莞)有限公司 Handheld terminal and screen display control method thereof
CN106855783A (en) * 2016-12-16 2017-06-16 广东欧珀移动通信有限公司 A kind of method of false-touch prevention, device and mobile terminal
CN106686232A (en) * 2016-12-27 2017-05-17 努比亚技术有限公司 Method for optimizing control interfaces and mobile terminal
CN107831966A (en) * 2017-10-27 2018-03-23 北京珠穆朗玛移动通信有限公司 Method, mobile terminal and the storage medium of false-touch prevention
US20200195877A1 (en) * 2018-12-17 2020-06-18 Beijing Xiaomi Mobile Software Co., Ltd. Operation method, device, apparatus and storage medium of playing video
CN111488098A (en) * 2019-01-28 2020-08-04 北京小米移动软件有限公司 Method and device for adjusting parameters of touch screen, electronic equipment and storage medium
CN111372126A (en) * 2019-06-27 2020-07-03 杭州海康威视***技术有限公司 Video playing method, device and storage medium
CN112104784A (en) * 2020-09-16 2020-12-18 珠海格力电器股份有限公司 Display method, display device, computer-readable storage medium, and electronic apparatus
CN112363647A (en) * 2020-11-06 2021-02-12 北京小米移动软件有限公司 Touch operation method and device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356270A (en) * 2022-01-10 2022-04-15 西安数拓网络科技有限公司 Multi-screen animation display method and device and computer equipment
CN114356270B (en) * 2022-01-10 2024-01-26 深圳数拓科技有限公司 Multi-screen animation display method and device and computer equipment

Similar Documents

Publication Publication Date Title
US10019139B2 (en) System and method for content size adjustment
KR100892966B1 (en) Electronic Device With Touch Screen And Method Of Displaying Information Using Same
US9323351B2 (en) Information processing apparatus, information processing method and program
JP5962085B2 (en) Display control apparatus, control method thereof, and program
US20120032988A1 (en) Display control apparatus that displays list of images onto display unit, display control method, and storage medium storing control program therefor
JP6273081B2 (en) Content moving method and apparatus using pointing device
KR20140101169A (en) Guide method for taking a picture and mobile terminal implementing the same
US20180284848A1 (en) Output control using gesture input
KR101861377B1 (en) Method for controlling screen based on motion of mobile terminal and the mobile terminal therefor
CN104094209A (en) Information processing device, information processing method, and computer program
US20190012129A1 (en) Display apparatus and method for controlling display apparatus
CN111310632B (en) Terminal control method, device, terminal and storage medium
US9019315B2 (en) Method of controlling display
CN113507634A (en) Video playing method and device, electronic equipment and readable storage medium
US20150163444A1 (en) Display apparatus, display system including display apparatus, and methods of controlling display apparatus and display system
KR101231513B1 (en) Contents control method and device using touch, recording medium for the same and user terminal having it
US20130321469A1 (en) Method of controlling display
KR20140123936A (en) Information processing device, information processing method, and information processing computer program product
WO2017211108A1 (en) Display method and device
US20150078734A1 (en) Display apparatus and controlling method thereof
AU2017330785A1 (en) Electronic apparatus and controlling method thereof
JP2015032261A (en) Display device and control method
KR20140101324A (en) Portable terminal having touch screen and method for performing function thereof
CN113253874A (en) Display device control method, device, terminal and storage medium
KR20170131327A (en) Portable terminal having touch screen and method for performing function thereof

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211015