Search

EP-4738088-A1 - METHOD FOR SCREEN PROJECTION, APPARATUS, ELECTRONIC DEVICE AND STORAGE MEDIUM

EP4738088A1EP 4738088 A1EP4738088 A1EP 4738088A1EP-4738088-A1

Abstract

A method for screen projection, includes: determining (101) a position to which a first mirroring window displayed in an initial mirroring area of a screen projection receiving device is to be moved; determining (102) a target mirroring area corresponding to the first mirroring window and a display form in the target mirroring area according to the position to be moved to; and displaying (103) a second mirroring window corresponding to the first mirroring window in the target mirroring area according to the display form.

Inventors

  • SHI, Cheng

Assignees

  • Beijing Xiaomi Mobile Software Co., Ltd.

Dates

Publication Date
20260506
Application Date
20250530

Claims (15)

  1. A method for screen projection, comprising: determining (101) a position to which a first mirroring window displayed in an initial mirroring area of a screen projection receiving device is to be moved; determining (102) a target mirroring area corresponding to the first mirroring window and a display form in the target mirroring area according to the position to be moved to; and displaying (103) a second mirroring window corresponding to the first mirroring window in the target mirroring area according to the display form.
  2. The method according to claim 1, wherein determining (101) the position to which the first mirroring window displayed in the initial mirroring area of the screen projection receiving device is to be moved comprises: in response to detecting that a dragging operation is performed on a touch point set in the first mirroring window, obtaining (201) a window screenshot of the first mirroring window; adjusting (202) a display position of a window indication icon for indicating the first mirroring window in the display screen according to the window screenshot of the first mirroring window and a position to which the touch point moves in a display screen of the screen projection receiving device; in response to detecting that the dragging operation is finished, determining (203) a position where movement of the touch point is terminated; and determining (204) the position to which the first mirroring window is to be moved according to the position where the movement is terminated.
  3. The method according to claim 2, wherein obtaining (201) the window screenshot of the first mirroring window comprises: generating a target touch screen event for the first mirroring window; transmitting the target touch screen event to a screen projection device, wherein the target touch screen event is used for the screen projection device to obtain the window screenshot of the first mirroring window according to the target touch screen event; and obtaining the window screenshot of the first mirroring window transmitted by the screen projection device.
  4. The method according to claim 2 or 3, wherein adjusting (202) the display position of the window indication icon for indicating the first mirroring window in the display screen according to the window screenshot of the first mirroring window and the position to which the touch point moves in the display screen of the screen projection receiving device, comprises: comparing the position with a position of the initial mirroring area; in response to the position being located in the initial mirroring area, taking the window screenshot as the window indication icon of the first mirroring window; and adjusting the display position of the window screenshot in the display screen; or, comparing the position with a position of the initial mirroring area; in response to the position being not located in the initial mirroring area, generating a window mask of the window screenshot; taking the window mask as the window indication icon for indicating the first mirroring window; and adjusting the display position of the window indication icon in the display screen.
  5. The method according to any one of claims 2 to 4, further comprising: hiding the first mirroring window in the initial mirroring area.
  6. The method according to any one of the preceding claims, wherein determining (102) the target mirroring area corresponding to the first mirroring window and the display form in the target mirroring area according to the position to be moved to, comprises: in response to the position to be moved to being located in the initial mirroring area, determining (205) that the target mirroring area corresponding to the first mirroring window is the initial mirroring area, and determining that the display form in the initial mirroring area is an original display form of the first mirroring window in the initial mirroring area.
  7. The method according to claim 6, wherein displaying (103) the second mirroring window corresponding to the first mirroring window in the target mirroring area according to the display form comprises: displaying (206) a rebound animation corresponding to the first mirroring window; and displaying the first mirroring window hidden in the initial mirroring area according to the original display form.
  8. The method according to any one of the preceding claims, wherein determining (102) the target mirroring area corresponding to the first mirroring window and the display form in the target mirroring area according to the position to be moved to, comprises: in response to the position to be moved to being not located in the initial mirroring area, obtaining (207) position information of an indication area corresponding to at least one candidate mirroring area; and according to the position to be moved to and position information of an indication area of each candidate mirroring area, determining (208) the target mirroring area from the at least one candidate mirroring area, and determining the display form in the target mirroring area.
  9. The method according to claim 8, wherein displaying (103) the second mirroring window corresponding to the first mirroring window in the target mirroring area according to the display form comprises: determining (209) size information of the second mirroring window according to the display form; transmitting (210) the size information of the second mirroring window to a screen projection device; obtaining (211) a data stream of the second mirroring window obtained by the screen projection device performing size adjustment on the first mirroring window based on the size information; and displaying (212) the second mirroring window in the target mirroring area according to the data stream of the second mirroring window.
  10. The method according to any one of claims 1 to 9, further comprising: receiving screen projection information of at least one application transmitted by a screen projection device; displaying an icon of the at least one application in a set area of the screen projection receiving device based on the screen projection information of the at least one application; in response to detecting that a target operation is performed on an icon of a target application in the at least one application, transmitting a screen projection control instruction of the target application to the screen projection device, wherein the screen projection control instruction is used for the screen projection device to generate a data stream of the first mirroring window corresponding to a screen projection window of the target application according to the screen projection control instruction; and displaying the first mirroring window in the initial mirroring area according to the received data stream of the first mirroring window transmitted by the screen projection device.
  11. A method for screen projection, comprising: obtaining (701) size information of a second mirroring window to be displayed corresponding to a first mirroring window, wherein the size information is determined according to a display form; and controlling (702) a screen projection receiving device to display the second mirroring window corresponding to the first mirroring window in a target mirroring area according to the size information, wherein the target mirroring area and the display form in the target mirroring area are determined according to a determined position to which the first mirroring window displayed in an initial mirroring area of the screen projection receiving device is to be moved.
  12. The method according to claim 11, wherein controlling (702) the screen projection receiving device to display the second mirroring window corresponding to the first mirroring window in the target mirroring area according to the size information comprises: obtaining a data stream of the second mirroring window by performing size adjustment on the first mirroring window based on the size information; and transmitting the data stream of the second mirroring window to the screen projection receiving device, wherein the data stream of the second mirroring window is used for the screen projection receiving device to display the second mirroring window in the target mirroring area according to the data stream of the second mirroring window.
  13. The method according to claim 11 or 12, further comprising: receiving a target touch screen event for the first mirroring window transmitted by the screen projection receiving device; obtaining, according to the target touch screen event, a window screenshot of the first mirroring window by taking a screenshot of a screen projection window displayed in a screen projection device and corresponding to the first mirroring window; and transmitting the window screenshot of the first mirroring window to the screen projection receiving device.
  14. An electronic device (800), comprising a memory (804), a processor (820) and a computer program stored in the memory and executable on the processor (820), wherein when the processor (820) executes the computer program, the method according to any one of claims 1 to 10 is implemented, or the method according to any one of claims 11 to 13 is implemented.
  15. A non-transitory computer-readable storage medium, wherein a computer program is stored on the non-transitory computer-readable storage medium, when the computer program is executed by a processor (820), the method according to any one of claims 1 to 10 is implemented, or the method according to any one of claims 11 to 13 is implemented.

Description

TECHNICAL FIELD The present invention relates to the field of computer technology, and in particular to a method for screen projection, an apparatus, an electronic device and a storage medium. BACKGROUND At present, with the development of intelligence and the accumulation of Internet of Things technology by various manufacturers, more and more devices are involved in display, the devices including TVs, computers, and pads, so that the display content of the mobile terminal may be screen-projected onto different display devices, improving the viewing effect and greatly facilitating people's life, work, and entertainment. SUMMARY The present invention aims to solve one of the technical problems in the related art at least to some extent. In view of this, the present invention provides a method, an apparatus, an electronic device and a storage medium, in which, by moving the mirroring window on the screen projection receiving device, the change of the mirroring area and the display form of the mirroring window is realized, the separate screen projection display of the mirroring window is realized, and the operational convenience in the screen projection scene is improved. According to an aspect of embodiments of the present invention, there is provided a method for screen projection, including: determining a position to which a first mirroring window displayed in an initial mirroring area of a screen projection receiving device is to be moved;determining a target mirroring area corresponding to the first mirroring window and a display form in the target mirroring area according to the position to be moved to; anddisplaying a second mirroring window corresponding to the first mirroring window in the target mirroring area according to the display form. According to an aspect of embodiments of the present invention, there is provided another method for screen projection, including: obtaining size information of a second mirroring window to be displayed corresponding to a first mirroring window, where the size information is determined according to a display form;controlling a screen projection receiving device to display the second mirroring window corresponding to the first mirroring window in a target mirroring area according to the size information, where the target mirroring area and the display form in the target mirroring area are determined according to a determined position to which the first mirroring window displayed in an initial mirroring area of the screen projection receiving device is to be moved. According to another aspect of embodiments of the present invention, there is provided an apparatus for screen projection, including: a first determination module, configured to determine a position to which a first mirroring window displayed in an initial mirroring area of a screen projection receiving device is to be moved;a second determination module, configured to determine a target mirroring area corresponding to the first mirroring window and a display form in the target mirroring area according to the position to be moved to; anda display module, configured to display a second mirroring window corresponding to the first mirroring window in the target mirroring area according to the display form. According to another aspect of embodiments of the present invention, there is provided another apparatus for screen projection, including: an obtaining module, configured to obtain size information of a second mirroring window to be displayed corresponding to a first mirroring window, where the size information is determined according to a display form; anda control module, configured to control a screen projection receiving device to display the second mirroring window corresponding to the first mirroring window in a target mirroring area according to the size information, where the target mirroring area and the display form in the target mirroring area are determined based on a determined position to which the first mirroring window displayed in an initial mirroring area of the screen projection receiving device is to be moved. According to another aspect of embodiments of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method according to one of the foregoing aspects is implemented. According to another aspect of embodiments of the present invention, there is provided a non-transitory computer-readable storage medium, and a computer program is stored on the non-transitory computer-readable storage medium. When the computer program is executed by a processor, the method according to one of the foregoing aspects is implemented. According to another aspect of embodiments of the present invention, there is provided a computer program product on which a computer program is stored. When the program is executed by a processor, the method desc