WO2019127868A1 - Screen orientation switching method, device, and terminal - Google Patents

Screen orientation switching method, device, and terminal Download PDF

Info

Publication number
WO2019127868A1
WO2019127868A1 PCT/CN2018/076254 CN2018076254W WO2019127868A1 WO 2019127868 A1 WO2019127868 A1 WO 2019127868A1 CN 2018076254 W CN2018076254 W CN 2018076254W WO 2019127868 A1 WO2019127868 A1 WO 2019127868A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
new page
interface
horizontal
screen state
Prior art date
Application number
PCT/CN2018/076254
Other languages
French (fr)
Chinese (zh)
Inventor
黄志传
罗金生
李成
Original Assignee
广州优视网络科技有限公司
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 广州优视网络科技有限公司 filed Critical 广州优视网络科技有限公司
Publication of WO2019127868A1 publication Critical patent/WO2019127868A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging

Definitions

  • the embodiment of the invention relates to the field of computer technology, and in particular, the embodiment of the invention relates to a horizontal and vertical screen switching method, device and terminal.
  • the handheld terminal display interface is often switched between a portrait state and a landscape state.
  • the screen is switched to the landscape state, that is, the full screen, because the container corresponding to the information stream video interface in the Android system responds to the event priority. Higher, it will intercept the operation event triggered by the user after switching the horizontal screen, which will make the user unable to operate the video being played, which reduces the user's convenience for the interface operation after the horizontal and vertical screen switching operation.
  • the embodiment of the present invention aims to provide a horizontal and vertical screen switching method to solve the problem that the user cannot operate the video being played after the current display interface is switched from the portrait screen state to the landscape screen state.
  • an embodiment of the present invention provides a horizontal and vertical screen switching method, including the following steps: detecting a triggering instruction of a display interface to switch from a portrait screen state to a landscape screen state; and determining a stream of information of the control in the vertical screen state
  • the interface is playing a video; a new page is created on top of the control; and the video stream video interface embedded in the new page is played in the horizontal screen state.
  • an embodiment of the present invention provides a horizontal and vertical screen switching apparatus, including the following modules: a first detecting module, configured to detect a triggering instruction that the display interface is switched from a portrait screen state to a landscape screen state; and a determining module, configured to determine The video stream video interface of the control is playing a video in the vertical screen state; the creating module is configured to create a new page on the control; the first playing module is configured to embed the new in the horizontal screen state The video stream video interface of the page plays the video.
  • an embodiment of the present invention provides a terminal, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and are Configuring to be executed by the one or more processors, the one or more programs configured to: detect a triggering instruction that the display interface switches from a portrait state to a landscape state; determine a control in the portrait state The information stream video interface is playing a video; a new page is created on top of the control; and the video stream video interface embedded in the new page is played in the horizontal screen state.
  • an embodiment of the present invention provides a computer readable storage medium carrying one or more computer instruction programs thereon, when the computer instruction program is executed by one or more processors, the one or more processes The method of the first aspect is performed.
  • the embodiment of the invention has the following advantages:
  • the embodiment of the present invention When detecting the triggering instruction that the display interface is switched from the vertical screen state to the horizontal screen state, the embodiment of the present invention creates a new page on the container corresponding to the information flow video interface, so that the information flow video interface is separated from the vertical screen state.
  • the corresponding container is embedded in the new page, so that when the screen is switched to the horizontal screen state, the information flow video interface carried by the new page plays the video. Since the new page floats on the top layer of all interfaces, in the horizontal screen state, the priority capture permission of the user operation event is obtained, and when the user operates the information flow video interface carried by the new page, the user will preferentially respond to the information triggered by the user.
  • the related operations of the streaming video interface solve the problem that the user cannot operate the information stream video interface during the horizontal and vertical screen switching process, and the convenience of the user operation is improved.
  • FIG. 1 is a flow chart of a first method of a method for switching between horizontal and vertical screens according to Embodiment 1;
  • Embodiment 2 is a flow chart of a second method of the method for switching between horizontal and vertical screens in Embodiment 1;
  • FIG. 3 is a flow chart of a third method of the method for switching between horizontal and vertical screens of Embodiment 1;
  • FIG. 4 is a flow chart of a fourth method of the method for switching between the horizontal and vertical screens of the embodiment
  • FIG. 5 is a flowchart of a fifth method for switching a horizontal and vertical screen according to Embodiment 1; FIG.
  • FIG. 6 is a flow chart of a first method of switching a horizontal and vertical screen in the second embodiment
  • FIG. 7 is a flow chart of a second method for switching a horizontal and vertical screen in Embodiment 2;
  • FIG. 8 is a first block diagram of a third embodiment of a horizontal and vertical screen switching device
  • FIG. 9 is a second block diagram of a module of the third embodiment of the horizontal and vertical screen switching device.
  • FIG. 10 is a structural block diagram of a terminal of Embodiment 4.
  • Android mobile phones or tablets generally have the function of switching between horizontal and vertical screens, usually triggered by physical gravity sensing, and correspondingly, in the setting, the user can turn off the horizontal and vertical screen switching of the terminal, and only need to click the "screen rotation" button. You can turn off the horizontal and vertical screen switching function.
  • the setting of the above horizontal and vertical screen switching function is a change to the entire terminal.
  • the currently active application App
  • the interface will switch between horizontal and vertical screens. Due to different parameters such as the interface size of the horizontal and vertical screens (in general, the interface width of the horizontal screen is longer than the height, and the vertical screen is higher than the wide waist).
  • the invention provides a method, a device and a terminal for switching between horizontal and vertical screens. For details, please refer to the following embodiments.
  • an embodiment of the present invention provides a horizontal and vertical screen switching method, including the following steps:
  • S01 detects a triggering instruction that the display interface is switched from a portrait state to a landscape state
  • the terminal usually senses the horizontal and vertical screen switching instructions triggered by the physical gravity sensing through a sensor (such as a gyroscope, etc.), and the triggering of the switching instruction is generally a change in the direction in which the user holds the handheld terminal.
  • the display interface is a currently active application interface; in the vertical screen state, the interface size ratio of the display interface is high ratio width and length; in the horizontal screen state, the interface size ratio of the display interface is a width ratio high length;
  • the switching from the portrait state to the landscape state specifically relates to a change in the interface size and a change in the display direction of the display interface. In this step, it is detected that the display interface is switched from the vertical screen state to the horizontal screen state, in particular, the physical gravity sensing that the terminal receives the sensor sensing changes, thereby triggering the horizontal and vertical screen switching function.
  • S02 determines that the video stream video interface of the control is playing the video in the vertical screen state
  • the control is a container that carries an information stream video interface, and may specifically include a video player for playing a video.
  • the control may include a ListView, a RecyclerView, and a CardView. List one by one.
  • the information stream video interface is a display interface for playing a video in the current active application display interface in the vertical screen state (in this embodiment, can be understood as a video player), and the image is in a portrait state.
  • the following may include the following situations: (1) floating on the current active application display interface, displayed in a small window; (2) embedded in the current active application display interface, as part of the current display interface composition.
  • the determining that the information stream video interface of the control is playing the video in the vertical screen state, in order to determine that the current active application is displayed in the vertical screen state, the user has triggered the playing video or the information stream video.
  • the video is playing on the interface.
  • creating a new page above the control is to create a new page, and floating the page at the top level of all interfaces, so that the information stream video interface currently embedded in the control is from the control. Detach and re-embed into the new page.
  • the specific triggering process is performed when detecting that the terminal switches from the portrait screen state to the landscape screen state.
  • the new page is formed by matching the interface size ratio of the display interface in the current horizontal screen state.
  • S04 plays the video by embedding the information stream video interface of the new page in the horizontal screen state.
  • the information stream video interface embedded in the new page in the horizontal screen state plays the video as the information stream video interface after the new page is to be embedded, and continues in the horizontal screen state.
  • the video that the user has triggered to play or is playing while playing in the portrait state is played.
  • the instruction triggered in the new page will obtain the priority processing permission.
  • the user increases the priority of the operation instruction processing triggered on the display interface of the video playback, and solves the problem that the system intercepts the user due to the priority response after the user switches between the horizontal and vertical screens.
  • the problem of the operation event and the inability to respond improves the convenience of the operation of the user interface, so that the operation on the display interface of the currently playing video can be directly operated in the current horizontal screen state.
  • the horizontal and vertical screen switching method formed by steps S01, S02, S03, and S04 is adapted, and the step S02 determines that after the video stream video interface of the control is playing the video in the vertical screen state, the method further includes step:
  • step S04 plays the video stream video interface embedded in the new page in the horizontal screen state to play the video as:
  • the steps S21 and S22 provide a method for ensuring that the progress of the user watching the video is not affected during the horizontal and vertical screen switching process, which is specifically: receiving the horizontal and vertical screen switching trigger instruction and determining the current control in the vertical screen state.
  • the video stream video interface is playing a video
  • the video is paused first, and after the horizontal and vertical screen switching process is completed, the video is resumed from the pause position while the switching state is completed, thereby avoiding the switching process, that is, the user turns the screen.
  • the step S03 creates a new page on the control, including the steps:
  • S31 adapts to the horizontal screen size and creates a new page that floats above the control and is full screen;
  • the information flow video interface of S32 is detached from the control and embedded in the new page.
  • a new page that can be displayed in full screen in the horizontal screen state is adapted according to the display interface of the current terminal.
  • the step of separating the information flow video interface from the control and embedding the new page is completed, so that the new page is acquired in the horizontal screen after acquiring the information flow video interface.
  • the video is played in the state.
  • the control is the top-level control of the currently active application display interface, that is, a new page is created on the control, so that the new page floats on the top layer of all interfaces, and the user is guaranteed to drop.
  • the display interface that first obtains the user trigger instruction is embedded in the new page.
  • the method further includes the steps of:
  • the method further includes the following steps:
  • S41 determines whether the control receives the touch instruction when the display interface is switched from the portrait state to the landscape state
  • Steps S41, S42, and S43 provide another embodiment of the horizontal and vertical screen switching method adapted to steps S01, S02, S03, and S04.
  • the horizontal screen is displayed.
  • the information stream video interface of the control plays the video, that is, although the terminal perceives the screen-turning operation, it still displays in the horizontal screen state in the vertical screen state, that is, the user changes the grip of the handheld terminal even if the user changes Hold mode, but the display mode of the current display interface does not change. It is convenient for the user's operation.
  • step S42 further includes the following steps after the video stream video interface of the control plays the video in the horizontal screen state:
  • the touch command of the preset horizontal screen is implemented by the information stream video interface embedded in the control and playing the video even when switching to the horizontal screen state, and the preset horizontal screen can still be adopted.
  • the present invention further provides a horizontal and vertical screen switching method adapted to switch from the horizontal screen state to the vertical screen state in steps S01, S02, S03, and S04, which includes the following steps:
  • S61 detects a triggering instruction that the display interface is switched from the horizontal screen state to the vertical screen state
  • this step detects that, in the case of Embodiment 1, it is detected that the direction in which the user holds the gesture terminal changes, thereby triggering the operation of switching from the landscape state to the portrait state.
  • the new page is destroyed, so that the new page is embedded in the horizontal screen state.
  • the information flow video interface is detached from the new page and re-embedded into the control.
  • the S63 re-embeds the information stream video interface of the control in a portrait state to play the video.
  • the information stream video interface of the control is re-embedded, and after the terminal completes switching to the portrait state, the video is played in a portrait state.
  • the embodiment is provided to adapt to the first embodiment, and is mainly adapted to switch from the horizontal screen state to the horizontal screen state and then from the horizontal screen state to the vertical screen state.
  • the method further includes the following steps:
  • S71 determines whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state
  • the information stream video interface is still embedded in the new page in the vertical screen state, and the video continues to be played;
  • steps S71, S72, and S73 provide another embodiment of the horizontal and vertical screen switching method adapted to steps S61, S62, and S63.
  • the vertical screen is displayed.
  • the information flow video interface of the new page plays the video, that is, although the terminal perceives the screen-turning operation, it still displays in the vertical screen state in the horizontal screen state, that is, even if the user changes the handheld terminal Hold mode, but the display mode of the current display interface does not change. It is convenient for the user's operation.
  • the display interface triggers any operation, and can maintain the display state when the horizontal screen state is maintained in the vertical screen state.
  • step S72 is still embedded in the new page in the vertical screen state, and continues to play the video, including the following steps:
  • the information stream video interface is still embedded in the new page, and the video is played by using a horizontal screen size;
  • the above steps are described in a specific application scenario. Assume that the user holds the terminal to watch the video while the user is using the horizontal screen. When the user turns to the side, although the holding action of the handheld terminal does not change, the physical gravity sensing of the terminal changes, which triggers. The command to switch from the horizontal screen state to the vertical screen state. At this time, since the gripping action of the user's handheld terminal does not change, the user's subjective meaning is expressed by default as still wishing to play the video in the horizontal screen state (no horizontal and vertical screen switching occurs). At this time, in the above steps, the user can maintain the horizontal screen size (full screen) by triggering any operation event on the current display interface (the information flow video interface under the new page) while the screen holding operation occurs. Play the video.
  • the information stream video interface is still embedded in the new page, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
  • the video is adapted to a vertical screen. Size, and in the new page, the stream video interface plays the video in portrait size.
  • the step provided in the step S72 is adapted to the case where the user holds the handheld terminal in a short-term side, that is, in a horizontal state, the short-time (within a preset time period) is switched to the vertical state.
  • the embedded carrier of the information stream video interface does not change.
  • the embodiment is also adapted for use by a user who intentionally places the terminal.
  • step S72 is still embedded in the new page in the vertical screen state, and after continuing to play the video, the method further includes the following steps:
  • the new page When detecting a trigger command of the user to trigger the playback of the video, the new page is destroyed, so that the new page created when the screen is switched to the horizontal screen state in the portrait state is destroyed, and the process of not changing the screen multiple times is guaranteed. There are multiple new pages created in .
  • control is used as a container in the Android system, and includes a list (ListView) or a card (CardView) control.
  • an embodiment of the present invention provides a horizontal and vertical screen switching apparatus, including:
  • the first detecting module 81 is configured to detect a triggering instruction that the display interface is switched from the vertical screen state to the horizontal screen state;
  • a determining module 82 configured to determine that a video stream of the control is playing a video in the vertical screen state
  • a creating module 83 configured to create a new page on top of the control
  • the first playing module 84 is configured to play the video in an information stream video interface embedded in the new page in the horizontal screen state.
  • the method further includes: performing the operations of the following modules:
  • a pause module for pausing the video
  • the first playing module 84 is further configured to continue playing the video from the pause position by the information stream video interface embedded in the new page in the landscape mode.
  • the creating module 83 includes a creating unit for adapting the horizontal screen size, creating a new screen floating on the full screen of the control, and an embedding unit, configured to disengage the information stream video interface from the control, and embed the Describe the new page.
  • the method further includes: performing the operations of the following modules:
  • a first determining module configured to determine whether the control receives a touch instruction when the display interface is switched from a portrait state to a landscape state
  • the step of determining that the video stream interface of the control is playing the video in the portrait state is continued.
  • the first determining module includes a preset horizontal screen unit, and is configured to continue to execute the creating module 83 when detecting a touch command of the preset horizontal screen.
  • the embodiment of the present invention further includes the following modules:
  • the second detecting module 91 is configured to detect a triggering instruction that the display interface is switched from the horizontal screen state to the vertical screen state;
  • a destruction module 92 configured to destroy the new page
  • the second playing module 93 is configured to play the video by re-embedding the information stream video interface of the control in a portrait state.
  • the method further includes: performing the following operations:
  • a second determining module configured to determine whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state
  • the information stream video interface is still embedded in the new page in the vertical screen state, and continues to play the video
  • the second judging module includes a first playing unit, wherein the information stream video interface is still embedded in the new page in a portrait state, and the video is played in a horizontal screen size; the second playing unit is configured to: The information stream video interface is still embedded in the new page in the portrait state, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
  • the second determining module further includes a destroying unit, configured to: in the vertical screen state, the information stream video interface is still embedded in the new page, and after continuing to play the video, detecting to exit the playing station The new page is destroyed when the video triggers the instruction.
  • control is used as a container in an Android system that includes a list or card control.
  • the embodiment of the present invention further provides another horizontal and vertical screen switching device, including:
  • At least one processor At least one processor
  • At least one memory communicatively coupled to the at least one processor; the at least one memory comprising processor-executable instructions when the processor-executable instructions are executed by the at least one processor Causing the device to perform at least the following operations:
  • a trigger instruction that switches the display interface from the portrait state to the landscape state is detected
  • the video stream video interface embedded in the new page in the horizontal screen state plays the video.
  • the method further includes the following steps:
  • a trigger instruction for detecting that the display interface is switched from the horizontal screen state to the vertical screen state is detected
  • the video stream video interface that re-embeds the control in the portrait state plays the video.
  • the method further includes the steps of:
  • the information stream video interface is still embedded in the new page in the vertical screen state, and continues to play the video
  • the information flow video interface is still embedded in the new page in the vertical screen state, and continues to play the video, including the steps of:
  • the information flow video interface is still embedded in the new page, and the video is played in a horizontal screen size;
  • the information stream video interface is still embedded in the new page, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
  • the method further includes the steps of:
  • the new page is destroyed when a trigger command to exit the play of the video is detected.
  • the method further includes the step of: pausing the playing of the video;
  • the video stream video interface embedded in the new page in the horizontal screen state plays the video as:
  • the stream video interface embedded in the new page in the landscape mode continues to play the video from the paused position.
  • creating a new page on the control includes the steps of:
  • the information flow video interface is detached from the control and embedded in the new page.
  • the method further includes the steps of:
  • the step of determining that the video stream interface of the control is playing the video in the portrait state is continued.
  • the method further includes the following steps:
  • control is used as a container in the Android system, which includes a list or a card control.
  • the embodiment of the present invention further provides a horizontal and vertical screen switching terminal.
  • the terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, and the terminal is a mobile phone as an example:
  • FIG. 10 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (Wi-Fi) module 1070, and processing.
  • RF radio frequency
  • Device 1080 and components such as power supply 1090.
  • the structure of the handset shown in FIG. 10 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the RF circuit 1010 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 1080. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1010 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • the memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1020.
  • the memory 1020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a voice play function, an image playing function, etc.), and the like; the storage data area may be stored. Data created based on the use of the mobile phone (such as audio data, phone book, etc.).
  • memory 1020 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 1030 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 1030 may include a touch panel 1031 and other input devices 1032.
  • the touch panel 1031 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 1031 or near the touch panel 1031. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 1031 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 1080 is provided and can receive commands from the processor 1080 and execute them.
  • the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1030 may also include other input devices 1032.
  • other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 1040 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 1040 may include a display panel 1041.
  • the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation thereon or nearby, the touch panel 1031 transmits to the processor 1080 to determine the type of the touch event, and then the processor 1080 according to the touch event. The type provides a corresponding visual output on display panel 1041.
  • touch panel 1031 and the display panel 1041 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 10, in some embodiments, the touch panel 1031 may be integrated with the display panel 1041. Realize the input and output functions of the phone.
  • the handset can also include at least one type of sensor 1050, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • An audio circuit 1060, a speaker 1061, and a microphone 1062 can provide an audio interface between the user and the handset.
  • the audio circuit 1060 can transmit the converted electrical data of the received audio data to the speaker 1061, and convert it into a voiceprint signal output by the speaker 1061.
  • the microphone 1062 converts the collected voiceprint signal into an electrical signal by the audio.
  • the circuit 1060 is converted to audio data after being received, and then processed by the audio data output processor 1080, transmitted to the, for example, another mobile phone via the RF circuit 1010, or outputted to the memory 1020 for further processing.
  • Wi-Fi is a short-range wireless transmission technology.
  • the mobile phone can help users to send and receive e-mail, browse web pages and access streaming media through the Wi-Fi module 1070. It provides users with wireless broadband Internet access.
  • FIG. 10 shows the Wi-Fi module 1070, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 1080 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1020, and invoking data stored in the memory 1020, The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 1080.
  • the mobile phone also includes a power source 1090 (such as a battery) that supplies power to various components.
  • a power source 1090 such as a battery
  • the power source can be logically coupled to the processor 1080 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the processor 1080 included in the terminal has the function of performing the horizontal and vertical screen switching method described in any one of the first embodiment and the second embodiment, and details are not described herein.
  • the present application also provides a computer readable storage medium carrying one or more computer instruction programs thereon, and when the computer instruction program is executed by one or more processors, one or more processors perform a horizontal and vertical screen switching method
  • the method includes: detecting a triggering instruction that the display interface is switched from the vertical screen state to the horizontal screen state; determining that the information stream video interface of the control is playing the video in the vertical screen state; creating a new page on the control; The video stream video interface embedded in the new page in the horizontal screen state plays the video.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Business, Economics & Management (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

Embodiments of the present invention provide a screen orientation switching method comprising the following steps: detecting a trigger instruction for switching an interface from portrait orientation to landscape orientation; determining that an information flow video interface of a control in portrait orientation is currently playing a video; creating a new page above the control; embedding an information flow video interface of the new page in landscape orientation and playing the video. Embodiments of the present invention create a new page floating above the control, so as to obtain a priority capture permission with respect to user events while playing the video in the landscape orientation. The invention resolves an issue in which a user control event is blocked because the response of the control to an event has a higher priority and, as a result, the user cannot control the video currently being played. Further provided in embodiments of the present invention are a screen orientation switching device and a terminal.

Description

横竖屏切换方法、装置和终端Horizontal and vertical screen switching method, device and terminal 技术领域Technical field
本发明实施例涉及计算机技术领域,具体而言,本发明实施例涉及一种横竖屏切换方法、装置和终端。The embodiment of the invention relates to the field of computer technology, and in particular, the embodiment of the invention relates to a horizontal and vertical screen switching method, device and terminal.
背景技术Background technique
随着移动终端技术发展,通过智能手机或平板电脑观看视频成为越来越多用户的日常娱乐方式。在用户通过智能手机或平板电脑观看视频的过程中,经常将手持终端显示界面在竖屏状态和横屏状态之间进行切换。在现有技术中,当用户在竖屏状态下触发信息流视频界面播放视频后,切换为横屏状态,即全屏时,由于安卓系统中对应于信息流视频界面的容器对事件响应的优先级更高,会拦截用户切换横屏后触发的操作事件,导致用户无法对正在播放的视频进行操作,降低了用户对进行横竖屏切换操作后对界面操作的便利性。With the development of mobile terminal technology, watching video through a smartphone or tablet has become a daily entertainment mode for more and more users. In the process of watching a video through a smartphone or a tablet, the handheld terminal display interface is often switched between a portrait state and a landscape state. In the prior art, when the user triggers the video stream video interface to play the video in the vertical screen state, the screen is switched to the landscape state, that is, the full screen, because the container corresponding to the information stream video interface in the Android system responds to the event priority. Higher, it will intercept the operation event triggered by the user after switching the horizontal screen, which will make the user unable to operate the video being played, which reduces the user's convenience for the interface operation after the horizontal and vertical screen switching operation.
发明内容Summary of the invention
本发明实施例的旨在提供一种横竖屏切换方法,以解决当前显示界面从竖屏状态切换为横屏状态后用户无法对正在播放的视频进行操作的问题。The embodiment of the present invention aims to provide a horizontal and vertical screen switching method to solve the problem that the user cannot operate the video being played after the current display interface is switched from the portrait screen state to the landscape screen state.
第一方面,本发明实施例提供一种横竖屏切换方法,包括以下步骤:检测到显示界面从竖屏状态切换成横屏状态的触发指令;确定在所述竖屏状态下控件的信息流视频界面正在播放视频;在所述控件之上创建新页面;在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。In a first aspect, an embodiment of the present invention provides a horizontal and vertical screen switching method, including the following steps: detecting a triggering instruction of a display interface to switch from a portrait screen state to a landscape screen state; and determining a stream of information of the control in the vertical screen state The interface is playing a video; a new page is created on top of the control; and the video stream video interface embedded in the new page is played in the horizontal screen state.
第二方面,本发明实施例提供一种横竖屏切换装置,包括以下模块:第一检测模块,用于检测到显示界面从竖屏状态切换成横屏状态的触发指令;确定模块,用于确定在所述竖屏状态下控件的信息流视频界面正在播放视频;创建模块,用于在所述控件之上创建新页面;第一播放模块,用于在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。In a second aspect, an embodiment of the present invention provides a horizontal and vertical screen switching apparatus, including the following modules: a first detecting module, configured to detect a triggering instruction that the display interface is switched from a portrait screen state to a landscape screen state; and a determining module, configured to determine The video stream video interface of the control is playing a video in the vertical screen state; the creating module is configured to create a new page on the control; the first playing module is configured to embed the new in the horizontal screen state The video stream video interface of the page plays the video.
第三方面,本发明实施例提供一种终端,其包括:一个或多个处理器; 存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于:检测到显示界面从竖屏状态切换成横屏状态的触发指令;确定在所述竖屏状态下控件的信息流视频界面正在播放视频;在所述控件之上创建新页面;在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。In a third aspect, an embodiment of the present invention provides a terminal, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and are Configuring to be executed by the one or more processors, the one or more programs configured to: detect a triggering instruction that the display interface switches from a portrait state to a landscape state; determine a control in the portrait state The information stream video interface is playing a video; a new page is created on top of the control; and the video stream video interface embedded in the new page is played in the horizontal screen state.
第四方面,本发明实施例提供一种计算机可读存储介质,其上承载一个或多个计算机指令程序,所述计算机指令程序被一个或多个处理器执行时,所述一个或多个处理器执行第一方面所述的方法。In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium carrying one or more computer instruction programs thereon, when the computer instruction program is executed by one or more processors, the one or more processes The method of the first aspect is performed.
区别于现有技术,本发明实施例具有以下优势:Different from the prior art, the embodiment of the invention has the following advantages:
本发明实施例在检测到显示界面从竖屏状态切换成横屏状态的触发指令时,通过在信息流视频界面所对应的容器上,创建一个新页面,使信息流视频界面脱离在竖屏状态下对应的容器,并嵌入所述新页面中,以在切换为横屏状态时,新页面承载的信息流视频界面进行对视频的播放。由于所述新页面浮在所有界面的顶层,在横屏状态下,获得用户操作事件的优先捕获权限,用户通过对新页面承载的信息流视频界面进行操作时,将优先响应用户触发的对信息流视频界面的相关操作,解决了在横竖屏切换过程中,用户无法对信息流视频界面进行操作的问题,提高了用户操作的便利性。When detecting the triggering instruction that the display interface is switched from the vertical screen state to the horizontal screen state, the embodiment of the present invention creates a new page on the container corresponding to the information flow video interface, so that the information flow video interface is separated from the vertical screen state. The corresponding container is embedded in the new page, so that when the screen is switched to the horizontal screen state, the information flow video interface carried by the new page plays the video. Since the new page floats on the top layer of all interfaces, in the horizontal screen state, the priority capture permission of the user operation event is obtained, and when the user operates the information flow video interface carried by the new page, the user will preferentially respond to the information triggered by the user. The related operations of the streaming video interface solve the problem that the user cannot operate the information stream video interface during the horizontal and vertical screen switching process, and the convenience of the user operation is improved.
本发明实施例附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明实施例的实践了解到。The additional aspects and advantages of the embodiments of the present invention will be set forth in part in the description in the description.
附图说明DRAWINGS
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1为实施例一横竖屏切换方法的第一种方法流程图;1 is a flow chart of a first method of a method for switching between horizontal and vertical screens according to Embodiment 1;
图2为实施例一横竖屏切换方法的第二种方法流程图;2 is a flow chart of a second method of the method for switching between horizontal and vertical screens in Embodiment 1;
图3为实施例一横竖屏切换方法的第三种方法流程图;3 is a flow chart of a third method of the method for switching between horizontal and vertical screens of Embodiment 1;
图4为实施例一横竖屏切换方法的第四种方法流程图;4 is a flow chart of a fourth method of the method for switching between the horizontal and vertical screens of the embodiment;
图5为实施例一横竖屏切换方法的第五种方法流程图;FIG. 5 is a flowchart of a fifth method for switching a horizontal and vertical screen according to Embodiment 1; FIG.
图6为实施例二横竖屏切换方法的第一种方法流程图;6 is a flow chart of a first method of switching a horizontal and vertical screen in the second embodiment;
图7为实施例二横竖屏切换方法的第二种方法流程图;7 is a flow chart of a second method for switching a horizontal and vertical screen in Embodiment 2;
图8为实施例三横竖屏切换装置的第一种模块框图;8 is a first block diagram of a third embodiment of a horizontal and vertical screen switching device;
图9为实施例三横竖屏切换装置的第二种模块框图;9 is a second block diagram of a module of the third embodiment of the horizontal and vertical screen switching device;
图10为实施例四终端的结构框图。FIG. 10 is a structural block diagram of a terminal of Embodiment 4.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。The singular forms "a", "an", "the" It is to be understood that the phrase "comprise" or "an" Integers, steps, operations, components, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element. Further, "connected" or "coupled" as used herein may include either a wireless connection or a wireless coupling. The phrase "and/or" used herein includes all or any one and all combinations of one or more of the associated listed.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art will appreciate that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention belongs, unless otherwise defined. It should also be understood that terms such as those defined in a general dictionary should be understood to have meaning consistent with the meaning in the context of the prior art, and will not be idealized or excessive unless specifically defined as here. The formal meaning is explained.
Android手机或平板一般都会存在横竖屏切换的功能,通常是通过物理重力感应触发,而相应的,通常在设置中用户可以对终端的横竖屏切换进行关闭,其仅需要点击下“屏幕旋转”按钮即可关闭横竖屏切换功能。而上述关闭横竖屏切换功能的设置是对整个终端的更改,当用户没有关闭 横竖屏切换功能时,系统一旦触发横竖屏切换功能,其在缺省状态下,当前活动的应用程序(App)的界面就会进行横竖屏切换,由于横竖屏的界面尺寸等参数不同(一般情况下,横屏状态的界面宽比高要长,竖屏状态下高比宽腰长),很多应用程序在设计和开发过程中都会遭遇横竖屏切换所引发的问题,而在一些视频应用程序由于存在用户使用的刚需问题(如一些观看新闻等的App其必然涉及用户切换横屏观看的问题),无法避免横竖屏切换所引发的问题,解决横竖屏切换的所引发的问题,即成为设计和开发过程中必要解决的问题。目前,适应于一些视频应用程序,亟需的问题在于用户在竖屏状态下播放视频后切换为横屏观看后,无法对切换为横屏状态下显示的视频播放界面进行操作,对此,本发明提供一种横竖屏切换的方法、装置和终端,具体请见下述实施例。Android mobile phones or tablets generally have the function of switching between horizontal and vertical screens, usually triggered by physical gravity sensing, and correspondingly, in the setting, the user can turn off the horizontal and vertical screen switching of the terminal, and only need to click the "screen rotation" button. You can turn off the horizontal and vertical screen switching function. The setting of the above horizontal and vertical screen switching function is a change to the entire terminal. When the user does not turn off the horizontal and vertical screen switching function, once the system triggers the horizontal and vertical screen switching function, in the default state, the currently active application (App) The interface will switch between horizontal and vertical screens. Due to different parameters such as the interface size of the horizontal and vertical screens (in general, the interface width of the horizontal screen is longer than the height, and the vertical screen is higher than the wide waist). Many applications are designed and During the development process, the problems caused by the horizontal and vertical screen switching will be encountered. In some video applications, due to the user's just-needed problems (such as some apps that watch news, etc., which necessarily involve the user switching the horizontal screen), the horizontal and vertical screen cannot be avoided. Switching the problems caused by the problem, solving the problems caused by the horizontal and vertical screen switching, becomes a problem that must be solved in the design and development process. At present, in order to adapt to some video applications, the problem that is urgently needed is that after the user plays the video in the portrait state and then switches to the horizontal screen, the video playback interface displayed in the state of switching to the horizontal screen cannot be operated. The invention provides a method, a device and a terminal for switching between horizontal and vertical screens. For details, please refer to the following embodiments.
实施例一Embodiment 1
结合图1,本发明实施例提供一种横竖屏切换方法,包括以下步骤:With reference to FIG. 1, an embodiment of the present invention provides a horizontal and vertical screen switching method, including the following steps:
S01检测到显示界面从竖屏状态切换成横屏状态的触发指令;S01 detects a triggering instruction that the display interface is switched from a portrait state to a landscape state;
具体地,在Android系统中,终端通常是通过传感器(如陀螺仪等)感应物理重力感应触发的横竖屏切换指令,而该切换指令的触发,一般是用户握持手持终端的方向发生改变。所述显示界面为当前活动的应用程序界面;竖屏状态下,所述显示界面的界面尺寸比例为高比宽长;横屏状态下,所述显示界面的界面尺寸比例为宽比高长;所述从竖屏状态切换成横屏状态具体涉及界面尺寸的变化,以及显示界面的显示方向的变更。在本步骤中,检测到显示界面从竖屏状态切换成横屏状态具体为终端接收到传感器感知的物理重力感应发生变化,从而触发横竖屏切换功能。Specifically, in the Android system, the terminal usually senses the horizontal and vertical screen switching instructions triggered by the physical gravity sensing through a sensor (such as a gyroscope, etc.), and the triggering of the switching instruction is generally a change in the direction in which the user holds the handheld terminal. The display interface is a currently active application interface; in the vertical screen state, the interface size ratio of the display interface is high ratio width and length; in the horizontal screen state, the interface size ratio of the display interface is a width ratio high length; The switching from the portrait state to the landscape state specifically relates to a change in the interface size and a change in the display direction of the display interface. In this step, it is detected that the display interface is switched from the vertical screen state to the horizontal screen state, in particular, the physical gravity sensing that the terminal receives the sensor sensing changes, thereby triggering the horizontal and vertical screen switching function.
S02确定在所述竖屏状态下控件的信息流视频界面正在播放视频;S02 determines that the video stream video interface of the control is playing the video in the vertical screen state;
具体地,所述控件为承载信息流视频界面的容器,其具体可包含用于播放视频的视频播放器等,在本实施例中,所述控件可包括ListView、RecyclerView和CardView等,在此不一一列举。其中,所述信息流视频界面为在竖屏状态下,当前活动应用程序显示界面中,用于播放视频的显示界面(在本实施例中,可理解为视频播放器),其在竖屏状态下可包括以下几种情况:(1)浮于当前活动应用程序显示界面上,以小窗显示;(2) 嵌于当前活动应用程序显示界面上,作为当前显示界面构成的一部分。在本步骤中,所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频为确定在竖屏状态中当前活动应用程序显示状态下,用户已触发播放视频或所述信息流视频界面正在播放视频。Specifically, the control is a container that carries an information stream video interface, and may specifically include a video player for playing a video. In this embodiment, the control may include a ListView, a RecyclerView, and a CardView. List one by one. The information stream video interface is a display interface for playing a video in the current active application display interface in the vertical screen state (in this embodiment, can be understood as a video player), and the image is in a portrait state. The following may include the following situations: (1) floating on the current active application display interface, displayed in a small window; (2) embedded in the current active application display interface, as part of the current display interface composition. In this step, the determining that the information stream video interface of the control is playing the video in the vertical screen state, in order to determine that the current active application is displayed in the vertical screen state, the user has triggered the playing video or the information stream video. The video is playing on the interface.
S03在所述控件之上创建新页面;S03 creates a new page on top of the control;
具体地,在所述控件的上方创建新页面为创建一个新的页面,并使该页面浮在所有界面的最顶层,使得当前嵌于所述控件中的信息流视频界面,从所述控件中脱离,且重新嵌入到所述新页面中。其具体触发过程在检测到终端从竖屏状态切换为横屏状态下进行。进一步地,所述新页面以匹配当前横屏状态下显示界面的界面尺寸比例形成。Specifically, creating a new page above the control is to create a new page, and floating the page at the top level of all interfaces, so that the information stream video interface currently embedded in the control is from the control. Detach and re-embed into the new page. The specific triggering process is performed when detecting that the terminal switches from the portrait screen state to the landscape screen state. Further, the new page is formed by matching the interface size ratio of the display interface in the current horizontal screen state.
S04在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。S04 plays the video by embedding the information stream video interface of the new page in the horizontal screen state.
具体地,所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频为将嵌入所述新页面后的所述信息流视频界面,在所述横屏状态下继续播放在所述竖屏状态时用户已触发播放或正在播放的所述视频。Specifically, the information stream video interface embedded in the new page in the horizontal screen state plays the video as the information stream video interface after the new page is to be embedded, and continues in the horizontal screen state. The video that the user has triggered to play or is playing while playing in the portrait state is played.
其中,由于所述视频在嵌入的所述新页面中的所述信息流视频界面播放,且所述新页面处于当前显示界面的最顶层,在所述新页面中触发的指令将获得优先处理权限,此时,用户在切换为横屏状态之后,提高了在视频播放的显示界面上所触发的操作指令处理的优先级,解决了用户在横竖屏切换之后,系统由于优先级响应的排序拦截用户操作事件而无法响应的问题,同时,提高了用户界面操作的便利性,使得直接在当前横屏状态下正在播放视频的显示界面上操作即可。Wherein, since the video is played in the information stream video interface in the embedded new page, and the new page is at the top level of the current display interface, the instruction triggered in the new page will obtain the priority processing permission. At this time, after switching to the horizontal screen state, the user increases the priority of the operation instruction processing triggered on the display interface of the video playback, and solves the problem that the system intercepts the user due to the priority response after the user switches between the horizontal and vertical screens. The problem of the operation event and the inability to respond, at the same time, improves the convenience of the operation of the user interface, so that the operation on the display interface of the currently playing video can be directly operated in the current horizontal screen state.
进一步地,结合图2,适应于步骤S01、S02、S03、S04所形成的横竖屏切换方法,所述步骤S02确定在所述竖屏状态下控件的信息流视频界面正在播放视频之后,还包括步骤:Further, in conjunction with FIG. 2, the horizontal and vertical screen switching method formed by steps S01, S02, S03, and S04 is adapted, and the step S02 determines that after the video stream video interface of the control is playing the video in the vertical screen state, the method further includes step:
S21暂停播放所述视频;S21 pauses playing the video;
相应地,所述步骤S04在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频为:Correspondingly, the step S04 plays the video stream video interface embedded in the new page in the horizontal screen state to play the video as:
S22在横屏状态下嵌入所述新页面的信息流视频界面从暂停位置继续 播放所述视频。S22, in the horizontal screen state, embeds the information flow video interface of the new page to continue playing the video from the pause position.
具体地,步骤S21、S22提供一种在横竖屏切换过程中保证用户观看视频的进度不受影响的方法,其具体为在接收到横竖屏切换触发指令并确定出当前在竖屏状态下控件的信息流视频界面正在播放视频时,首先暂停播放所述视频,并在完成横竖屏切换过程后,在切换状态完成的同时触发从暂停位置继续播放所述视频,避免了切换过程,即用户转屏过程中由于创建新页面而对视频播放进度造成影响的问题,同时保证了用户还看的效果。Specifically, the steps S21 and S22 provide a method for ensuring that the progress of the user watching the video is not affected during the horizontal and vertical screen switching process, which is specifically: receiving the horizontal and vertical screen switching trigger instruction and determining the current control in the vertical screen state. When the video stream video interface is playing a video, the video is paused first, and after the horizontal and vertical screen switching process is completed, the video is resumed from the pause position while the switching state is completed, thereby avoiding the switching process, that is, the user turns the screen. In the process, the problem of affecting the progress of video playback due to the creation of a new page, while ensuring the effect that the user still sees.
其中,结合图3,在本实施例中,所述步骤S03所述在所述控件之上创建新页面,包括步骤:With reference to FIG. 3, in the embodiment, the step S03 creates a new page on the control, including the steps:
S31适应横屏尺寸,创建浮于所述控件之上全屏的新页面;S31 adapts to the horizontal screen size and creates a new page that floats above the control and is full screen;
S32所述信息流视频界面脱离所述控件,并嵌入所述新页面。The information flow video interface of S32 is detached from the control and embedded in the new page.
由于每个终端的显示界面尺寸有所差异,在创建一个新页面时,需根据当前终端的显示界面适配一个在横屏状态下可全屏显示的新页面。其中,在所述新页面生成后,需要完成所述信息流视频界面从所述控件上脱离并嵌入所述新页面的步骤,使得所述新页面获取到所述信息流视频界面后在横屏状态下完成视频的播放。Since the display interface size of each terminal is different, when creating a new page, a new page that can be displayed in full screen in the horizontal screen state is adapted according to the display interface of the current terminal. After the new page is generated, the step of separating the information flow video interface from the control and embedding the new page is completed, so that the new page is acquired in the horizontal screen after acquiring the information flow video interface. The video is played in the state.
优选地,本实施例中默认所述控件为当前活动应用程序显示界面的最上层控件,即在所述控件至上创建新页面,使得所述新页面浮于所有界面的最顶层,保证在用户降终端切换为横屏状态后,最前获取到用户触发指令的显示界面嵌入在所述新页面中。Preferably, in the embodiment, the control is the top-level control of the currently active application display interface, that is, a new page is created on the control, so that the new page floats on the top layer of all interfaces, and the user is guaranteed to drop. After the terminal switches to the horizontal screen state, the display interface that first obtains the user trigger instruction is embedded in the new page.
进一步地,还包括步骤:Further, the method further includes the steps of:
判断所述控件是否处于当前活动应用程序显示界面的顶层,若否,在浮于所有界面的顶层创建新页面。保证所述新页面处于最顶层。Determine whether the control is at the top level of the currently active application display interface, and if not, create a new page at the top level of all interfaces. Make sure the new page is at the top.
进一步地,结合图4,所述步骤S01检测到显示界面从竖屏状态切换成横屏状态的触发指令之后,还包括步骤:Further, in conjunction with FIG. 4, after the step S01 detects that the display interface is switched from the vertical screen state to the horizontal screen state, the method further includes the following steps:
S41判断当显示界面从竖屏状态切换成横屏状态时,所述控件是否接收到触控指令;S41 determines whether the control receives the touch instruction when the display interface is switched from the portrait state to the landscape state;
S42若是,在所述横屏状态下所述控件的信息流视频界面播放视频;S42. If yes, playing the video on the information stream video interface of the control in the horizontal screen state;
S43若否,继续所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频的步骤。S43. If no, proceed to the step of determining that the video stream interface of the control is playing a video in the vertical screen state.
其中,步骤S41、S42、S43提供一种适应于步骤S01、S02、S03、S04所形成的横竖屏切换方法的另一种实施例。具体地,当在横竖屏状态发生切换操作时,用户同时对当前显示界面发出触控操作时,亦即,用户在改变手持终端握持方向的同时在当前显示界面发出任意操作时,在横屏状态下所述控件的信息流视频界面播放视频,亦即虽然终端感知到转屏操作,但仍保持以竖屏状态下的显示方式在横屏状态下显示,即用户即使改变了手持终端的握持方式,但当前显示界面的显示方式不发生任何变化。其利于用户的操作便利性,当用户不希望在横屏握持的方式下全屏观看视频,或仍希望对原界面中如评论区等区域进行操作时,用户只需要在转屏动作发生的同时点击或随意对当前显示界面触发任意操作,即可保持在横屏状态下仍保持竖屏状态时的显示状态。Steps S41, S42, and S43 provide another embodiment of the horizontal and vertical screen switching method adapted to steps S01, S02, S03, and S04. Specifically, when the user performs a touch operation on the current display interface when the switching operation occurs in the horizontal and vertical screen states, that is, when the user performs an arbitrary operation on the current display interface while changing the holding direction of the handheld terminal, the horizontal screen is displayed. In the state, the information stream video interface of the control plays the video, that is, although the terminal perceives the screen-turning operation, it still displays in the horizontal screen state in the vertical screen state, that is, the user changes the grip of the handheld terminal even if the user changes Hold mode, but the display mode of the current display interface does not change. It is convenient for the user's operation. When the user does not want to watch the video in full screen in the way of holding the horizontal screen, or still wants to operate on the original interface such as the comment area, the user only needs to rotate the screen at the same time. Click or randomly trigger any operation on the current display interface to maintain the display state when the screen is still in the horizontal state.
更进一步地,结合图5,所述步骤S42在所述横屏状态下所述控件的信息流视频界面播放视频之后,还包括步骤:Further, in conjunction with FIG. 5, the step S42 further includes the following steps after the video stream video interface of the control plays the video in the horizontal screen state:
S51检测到预置横屏的触控指令时,继续所述在所述控件之上创建新页面的步骤。When the S51 detects the touch command of the preset landscape screen, the step of creating a new page on the control is continued.
具体地,所述预置横屏的触控指令所实施的为即使在切换为横屏状态时所述信息流视频界面仍嵌于所述控件中并播放视频,后续仍可通过预置横屏的触控指令,完成新页面创建的步骤。Specifically, the touch command of the preset horizontal screen is implemented by the information stream video interface embedded in the control and playing the video even when switching to the horizontal screen state, and the preset horizontal screen can still be adopted. The touch command to complete the steps of creating a new page.
实施例二Embodiment 2
结合图6,本发明还提供一种适应于步骤S01、S02、S03、S04的从横屏状态切换为竖屏状态的横竖屏切换方法,其包括以下步骤:With reference to FIG. 6, the present invention further provides a horizontal and vertical screen switching method adapted to switch from the horizontal screen state to the vertical screen state in steps S01, S02, S03, and S04, which includes the following steps:
S61检测到显示界面从横屏状态切换成竖屏状态的触发指令;S61 detects a triggering instruction that the display interface is switched from the horizontal screen state to the vertical screen state;
具体地,与步骤S01不同的是本步骤检测到的是基于实施例一的情形下,检测到用户握持手势终端的方向发生变化,从而触发到从横屏状态切换成竖屏状态的操作。Specifically, different from step S01, this step detects that, in the case of Embodiment 1, it is detected that the direction in which the user holds the gesture terminal changes, thereby triggering the operation of switching from the landscape state to the portrait state.
S62销毁所述新页面;S62 destroys the new page;
具体地,在检测到用户从实施例一的方法下,从横屏状态重新切换为 竖屏状态时,将所述新页面销毁,致使在所述横屏状态时嵌于所述新页面的所述信息流视频界面从所述新页面中脱离,并重新嵌入到所述控件中。Specifically, when it is detected that the user switches from the horizontal screen state to the vertical screen state from the method of the first embodiment, the new page is destroyed, so that the new page is embedded in the horizontal screen state. The information flow video interface is detached from the new page and re-embedded into the control.
S63在竖屏状态下重新嵌入所述控件的信息流视频界面播放所述视频。The S63 re-embeds the information stream video interface of the control in a portrait state to play the video.
具体地,重新嵌入所述控件的信息流视频界面,在终端完成切换为竖屏状态后,在竖屏状态下播放所述视频。Specifically, the information stream video interface of the control is re-embedded, and after the terminal completes switching to the portrait state, the video is played in a portrait state.
本实施例以适应于实施例一而提供,其主要为适应于从竖屏状态切换为横屏状态后,又重新从横屏状态切换为竖屏状态的模式。The embodiment is provided to adapt to the first embodiment, and is mainly adapted to switch from the horizontal screen state to the horizontal screen state and then from the horizontal screen state to the vertical screen state.
进一步地,结合图7,所述步骤S61检测到显示界面从横屏状态切换成竖屏状态的触发指令之后,还包括步骤:Further, in conjunction with FIG. 7, after the step S61 detects that the display interface is switched from the horizontal screen state to the vertical screen state, the method further includes the following steps:
S71判断当显示界面从横屏状态切换成竖屏状态时,所述新页面是否接收到触控指令;S71 determines whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state;
S72若是,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频;If the S72 is, the information stream video interface is still embedded in the new page in the vertical screen state, and the video continues to be played;
S73若否,继续所述销毁所述新页面的步骤。S73, if no, continue the step of destroying the new page.
其中,步骤S71、S72、S73提供一种适应于步骤S61、S62、S63所形成的横竖屏切换方法的另一种实施例。具体地,当在横竖屏状态发生切换操作时,用户同时对当前显示界面发出触控操作时,亦即,用户在改变手持终端握持方向的同时在当前显示界面发出任意操作时,在竖屏状态下所述新页面的信息流视频界面播放视频,亦即虽然终端感知到转屏操作,但仍保持以横屏状态下的显示方式在竖屏状态下显示,即用户即使改变了手持终端的握持方式,但当前显示界面的显示方式不发生任何变化。其利于用户的操作便利性,当用户希望在竖屏握持的方式下全屏观看视频,或在预定时间内切换为横屏状态时,用户只需要在转屏动作发生的同时点击或随意对当前显示界面触发任意操作,即可保持在竖屏状态下仍保持横屏状态时的显示状态。Among them, steps S71, S72, and S73 provide another embodiment of the horizontal and vertical screen switching method adapted to steps S61, S62, and S63. Specifically, when the user performs a touch operation on the current display interface when the switching operation occurs in the horizontal and vertical screen states, that is, when the user performs an arbitrary operation on the current display interface while changing the holding direction of the handheld terminal, the vertical screen is displayed. In the state, the information flow video interface of the new page plays the video, that is, although the terminal perceives the screen-turning operation, it still displays in the vertical screen state in the horizontal screen state, that is, even if the user changes the handheld terminal Hold mode, but the display mode of the current display interface does not change. It is convenient for the user's operation. When the user wants to watch the video in full screen in the vertical screen, or when switching to the horizontal screen state within a predetermined time, the user only needs to click or randomly click on the current screen. The display interface triggers any operation, and can maintain the display state when the horizontal screen state is maintained in the vertical screen state.
具体地,所述步骤S72在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频,包括步骤:Specifically, the step S72 is still embedded in the new page in the vertical screen state, and continues to play the video, including the following steps:
在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并采用横屏尺 寸播放所述视频;In the vertical screen state, the information stream video interface is still embedded in the new page, and the video is played by using a horizontal screen size;
具体地,对上述步骤以具体应用场景进行说明。假设用户手持终端躺卧观看视频,此时用户采用横屏的握持方式;当用户转身为侧卧时,虽手持终端的握持动作没变,但由于终端的物理重力感应发生变化,会触发从横屏状态切换成竖屏状态的指令,此时,由于用户手持终端的握持动作没变,可默认为用户的主观意思表达为仍旧希望以横屏状态播放视频(不发生横竖屏切换),此时,在上述步骤中,为用户在发生转屏握持动作发生同时,对当前显示界面(新页面下的信息流视频界面)触发任意操作事件,即可保持采用横屏尺寸(全屏)播放所述视频。Specifically, the above steps are described in a specific application scenario. Assume that the user holds the terminal to watch the video while the user is using the horizontal screen. When the user turns to the side, although the holding action of the handheld terminal does not change, the physical gravity sensing of the terminal changes, which triggers. The command to switch from the horizontal screen state to the vertical screen state. At this time, since the gripping action of the user's handheld terminal does not change, the user's subjective meaning is expressed by default as still wishing to play the video in the horizontal screen state (no horizontal and vertical screen switching occurs). At this time, in the above steps, the user can maintain the horizontal screen size (full screen) by triggering any operation event on the current display interface (the information flow video interface under the new page) while the screen holding operation occurs. Play the video.
或,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并把所述视频适配为竖屏尺寸,采用竖屏尺寸播放所述视频。Or, in the vertical screen state, the information stream video interface is still embedded in the new page, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
上述步骤中,提供一种在所述信息流视频界面仍嵌于所述新页面时,当前终端的显示状态从横屏状态切换为竖屏状态的情况下,将所述视频适配为竖屏尺寸,并在所述新页面中,所述信息流视频界面以竖屏尺寸播放所述视频。In the above steps, when the information flow video interface is still embedded in the new page, when the display state of the current terminal is switched from the horizontal screen state to the vertical screen state, the video is adapted to a vertical screen. Size, and in the new page, the stream video interface plays the video in portrait size.
上述步骤S72所包括的步骤提供的实施方式适应于用户对手持终端握持动作为短暂侧放的情况,亦即在横屏状态下短暂时间(预置时间段内)切换为竖屏状态,此时所述信息流视频界面的嵌入载体不发生变化。进一步地,本实施例还适应于有意侧放终端的用户使用。The step provided in the step S72 is adapted to the case where the user holds the handheld terminal in a short-term side, that is, in a horizontal state, the short-time (within a preset time period) is switched to the vertical state. The embedded carrier of the information stream video interface does not change. Further, the embodiment is also adapted for use by a user who intentionally places the terminal.
更进一步地,结合图7,所述步骤S72在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频之后,还包括步骤:Further, in conjunction with FIG. 7, the step S72 is still embedded in the new page in the vertical screen state, and after continuing to play the video, the method further includes the following steps:
S74检测到退出播放所述视频的触发指令时,销毁所述新页面。When the S74 detects the trigger instruction to exit the playing of the video, the new page is destroyed.
在检测到用户触发的退出播放所述视频的触发指令时,销毁所述新页面,使得销毁在竖屏状态下切换为横屏状态时创建的新页面,保证不会再多次转屏的过程中创建有多个新页面。When detecting a trigger command of the user to trigger the playback of the video, the new page is destroyed, so that the new page created when the screen is switched to the horizontal screen state in the portrait state is destroyed, and the process of not changing the screen multiple times is guaranteed. There are multiple new pages created in .
适应于实施例一和实施例二,所述控件在安卓系统中用作容器,其包括列表(ListView)或卡片(CardView)控件。Applicable to the first embodiment and the second embodiment, the control is used as a container in the Android system, and includes a list (ListView) or a card (CardView) control.
实施例三Embodiment 3
结合图8,本发明实施例提供一种横竖屏切换装置,包括:With reference to FIG. 8, an embodiment of the present invention provides a horizontal and vertical screen switching apparatus, including:
第一检测模块81,用于检测到显示界面从竖屏状态切换成横屏状态的触发指令;The first detecting module 81 is configured to detect a triggering instruction that the display interface is switched from the vertical screen state to the horizontal screen state;
确定模块82,用于确定在所述竖屏状态下控件的信息流视频界面正在播放视频;a determining module 82, configured to determine that a video stream of the control is playing a video in the vertical screen state;
创建模块83,用于在所述控件之上创建新页面;a creating module 83, configured to create a new page on top of the control;
第一播放模块84,用于在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。The first playing module 84 is configured to play the video in an information stream video interface embedded in the new page in the horizontal screen state.
其中,所述确定模块82被执行之后,还包括执行以下模块的操作:After the determining module 82 is executed, the method further includes: performing the operations of the following modules:
暂停模块,用于暂停播放所述视频;a pause module for pausing the video;
相应地,所述第一播放模块84还用于在横屏状态下嵌入所述新页面的信息流视频界面从暂停位置继续播放所述视频。Correspondingly, the first playing module 84 is further configured to continue playing the video from the pause position by the information stream video interface embedded in the new page in the landscape mode.
其中,所述创建模块83包括创建单元,用于适应横屏尺寸,创建浮于所述控件之上全屏的新页面;嵌入单元,用于所述信息流视频界面脱离所述控件,并嵌入所述新页面。The creating module 83 includes a creating unit for adapting the horizontal screen size, creating a new screen floating on the full screen of the control, and an embedding unit, configured to disengage the information stream video interface from the control, and embed the Describe the new page.
进一步地,所述第一检测模块81被执行之后,还包括执行以下模块的操作:Further, after the first detecting module 81 is executed, the method further includes: performing the operations of the following modules:
第一判断模块,用于判断当显示界面从竖屏状态切换成横屏状态时,所述控件是否接收到触控指令;a first determining module, configured to determine whether the control receives a touch instruction when the display interface is switched from a portrait state to a landscape state;
若是,在所述横屏状态下所述控件的信息流视频界面播放视频;If yes, playing the video in the information stream video interface of the control in the horizontal screen state;
若否,继续所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频的步骤。If not, the step of determining that the video stream interface of the control is playing the video in the portrait state is continued.
更进一步地,所述第一判断模块包括预置横屏单元,用于检测到预置横屏的触控指令时,继续执行所述创建模块83。Further, the first determining module includes a preset horizontal screen unit, and is configured to continue to execute the creating module 83 when detecting a touch command of the preset horizontal screen.
进一步地,结合附图9,本发明实施例还包括以下模块:Further, with reference to FIG. 9, the embodiment of the present invention further includes the following modules:
第二检测模块91,用于检测到显示界面从横屏状态切换成竖屏状态的触发指令;The second detecting module 91 is configured to detect a triggering instruction that the display interface is switched from the horizontal screen state to the vertical screen state;
销毁模块92,用于销毁所述新页面;a destruction module 92, configured to destroy the new page;
第二播放模块93,用于在竖屏状态下重新嵌入所述控件的信息流视频界面播放所述视频。The second playing module 93 is configured to play the video by re-embedding the information stream video interface of the control in a portrait state.
更进一步地,所述第二检测模块91被执行之后,还包括执行以下模块的操作:Further, after the second detecting module 91 is executed, the method further includes: performing the following operations:
第二判断模块,用于判断当显示界面从横屏状态切换成竖屏状态时,所述新页面是否接收到触控指令;a second determining module, configured to determine whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state;
若是,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频;If yes, the information stream video interface is still embedded in the new page in the vertical screen state, and continues to play the video;
若否,继续所述销毁所述新页面的步骤。If not, continue with the step of destroying the new page.
所述第二判断模块包括第一播放单元,用于在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并采用横屏尺寸播放所述视频;第二播放单元,用于在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并把所述视频适配为竖屏尺寸,采用竖屏尺寸播放所述视频。The second judging module includes a first playing unit, wherein the information stream video interface is still embedded in the new page in a portrait state, and the video is played in a horizontal screen size; the second playing unit is configured to: The information stream video interface is still embedded in the new page in the portrait state, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
进一步地,所述第二判断模块还包括销毁单元,用于所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频之后,检测到退出播放所述视频的触发指令时,销毁所述新页面。Further, the second determining module further includes a destroying unit, configured to: in the vertical screen state, the information stream video interface is still embedded in the new page, and after continuing to play the video, detecting to exit the playing station The new page is destroyed when the video triggers the instruction.
具体地,所述控件在安卓系统中用作容器,其包括列表或卡片控件。In particular, the control is used as a container in an Android system that includes a list or card control.
优选地,本发明实施例还提供另一种横竖屏切换装置,包括:Preferably, the embodiment of the present invention further provides another horizontal and vertical screen switching device, including:
至少一个处理器;At least one processor;
以及,至少一个存储器,其与所述至少一个处理器可通信地连接;所述至少一个存储器包括处理器可执行的指令,当所述处理器可执行的指令由所述至少一个处理器执行时,致使所述装置执行至少以下操作:And at least one memory communicatively coupled to the at least one processor; the at least one memory comprising processor-executable instructions when the processor-executable instructions are executed by the at least one processor Causing the device to perform at least the following operations:
检测到显示界面从竖屏状态切换成横屏状态的触发指令;A trigger instruction that switches the display interface from the portrait state to the landscape state is detected;
确定在所述竖屏状态下控件的信息流视频界面正在播放视频;Determining that the video stream video interface of the control is playing the video in the vertical screen state;
在所述控件之上创建新页面;Create a new page on top of the control;
在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。The video stream video interface embedded in the new page in the horizontal screen state plays the video.
进一步地,所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频之后,还包括步骤:Further, after the video stream video interface embedded in the new page in the horizontal screen state plays the video, the method further includes the following steps:
检测到显示界面从横屏状态切换成竖屏状态的触发指令;A trigger instruction for detecting that the display interface is switched from the horizontal screen state to the vertical screen state is detected;
销毁所述新页面;Destroy the new page;
在竖屏状态下重新嵌入所述控件的信息流视频界面播放所述视频。The video stream video interface that re-embeds the control in the portrait state plays the video.
更进一步地,所述检测到显示界面从横屏状态切换成竖屏状态的触发指令之后,还包括步骤:Further, after detecting the triggering instruction that the display interface is switched from the horizontal screen state to the vertical screen state, the method further includes the steps of:
判断当显示界面从横屏状态切换成竖屏状态时,所述新页面是否接收到触控指令;Determining whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state;
若是,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频;If yes, the information stream video interface is still embedded in the new page in the vertical screen state, and continues to play the video;
若否,继续所述销毁所述新页面的步骤。If not, continue with the step of destroying the new page.
具体地,,所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频,包括步骤:Specifically, the information flow video interface is still embedded in the new page in the vertical screen state, and continues to play the video, including the steps of:
在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并采用横屏尺寸播放所述视频;In the vertical screen state, the information flow video interface is still embedded in the new page, and the video is played in a horizontal screen size;
或,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并把所述视频适配为竖屏尺寸,采用竖屏尺寸播放所述视频。Or, in the vertical screen state, the information stream video interface is still embedded in the new page, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
优选地,所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频之后,还包括步骤:Preferably, after the information stream video interface is still embedded in the new page in the vertical screen state, and after the video is played, the method further includes the steps of:
检测到退出播放所述视频的触发指令时,销毁所述新页面。The new page is destroyed when a trigger command to exit the play of the video is detected.
进一步地,所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频之后,还包括步骤:暂停播放所述视频;Further, after determining that the information stream video interface of the control is playing the video in the vertical screen state, the method further includes the step of: pausing the playing of the video;
所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频为:The video stream video interface embedded in the new page in the horizontal screen state plays the video as:
在横屏状态下嵌入所述新页面的信息流视频界面从暂停位置继续播放所述视频。The stream video interface embedded in the new page in the landscape mode continues to play the video from the paused position.
进一步地,所述在所述控件之上创建新页面,包括步骤:Further, the creating a new page on the control includes the steps of:
适应横屏尺寸,创建浮于所述控件之上全屏的新页面;Adapt to the horizontal screen size and create a new page that floats above the control and is full screen;
所述信息流视频界面脱离所述控件,并嵌入所述新页面。The information flow video interface is detached from the control and embedded in the new page.
进一步地,所述检测到显示界面从竖屏状态切换成横屏状态的触发指令之后,还包括步骤:Further, after detecting the triggering instruction that the display interface is switched from the portrait state to the landscape state, the method further includes the steps of:
判断当显示界面从竖屏状态切换成横屏状态时,所述控件是否接收到触控指令;Determining whether the control receives a touch instruction when the display interface is switched from a portrait state to a landscape state;
若是,在所述横屏状态下所述控件的信息流视频界面播放视频;If yes, playing the video in the information stream video interface of the control in the horizontal screen state;
若否,继续所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频的步骤。If not, the step of determining that the video stream interface of the control is playing the video in the portrait state is continued.
更进一步地,所述在所述横屏状态下所述控件的信息流视频界面播放视频之后,还包括步骤:Further, after the video stream video interface of the control plays the video in the horizontal screen state, the method further includes the following steps:
检测到预置横屏的触控指令时,继续所述在所述控件之上创建新页面的步骤。When the touch command of the preset landscape is detected, the step of creating a new page on the control is continued.
其中,所述控件在安卓系统中用作容器,其包括列表或卡片控件。Wherein, the control is used as a container in the Android system, which includes a list or a card control.
实施例四Embodiment 4
本发明实施例还提供了横竖屏切换终端,如图10所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以终端为手机为例:The embodiment of the present invention further provides a horizontal and vertical screen switching terminal. As shown in FIG. 10, for the convenience of description, only parts related to the embodiment of the present invention are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present invention. . The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, and the terminal is a mobile phone as an example:
图10示出的是与本发明实施例提供的终端相关的手机的部分结构的框图。参考图10,手机包括:射频(Radio Frequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、传感器1050、音频电路1060、无线保真(wireless fidelity,Wi-Fi)模块1070、处理器1080、以及电源1090等部件。本领域技术人员可以理解,图10中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 10 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention. Referring to FIG. 10, the mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (Wi-Fi) module 1070, and processing. Device 1080, and components such as power supply 1090. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 10 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
下面结合图10对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to FIG. 10:
RF电路1010可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1080处理;另外,将设计上行的数据发送给基站。通常,RF电路1010包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1010还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无 线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1010 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 1080. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1010 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
存储器1020可用于存储软件程序以及模块,处理器1080通过运行存储在存储器1020的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1020可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声纹播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1020可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1020. The memory 1020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a voice play function, an image playing function, etc.), and the like; the storage data area may be stored. Data created based on the use of the mobile phone (such as audio data, phone book, etc.). Moreover, memory 1020 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元1030可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1030可包括触控面板1031以及其他输入设备1032。触控面板1031,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上或在触控面板1031附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1080,并能接收处理器1080发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032。具体地,其他输入设备1032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1030 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 1031 or near the touch panel 1031. Operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 1080 is provided and can receive commands from the processor 1080 and execute them. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1040可包括显示面板1041,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic  Light-Emitting Diode,OLED)等形式来配置显示面板1041。进一步的,触控面板1031可覆盖显示面板1041,当触控面板1031检测到在其上或附近的触摸操作后,传送给处理器1080以确定触摸事件的类型,随后处理器1080根据触摸事件的类型在显示面板1041上提供相应的视觉输出。虽然在图10中,触控面板1031与显示面板1041是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1031与显示面板1041集成而实现手机的输入和输出功能。The display unit 1040 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Alternatively, the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation thereon or nearby, the touch panel 1031 transmits to the processor 1080 to determine the type of the touch event, and then the processor 1080 according to the touch event. The type provides a corresponding visual output on display panel 1041. Although the touch panel 1031 and the display panel 1041 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 10, in some embodiments, the touch panel 1031 may be integrated with the display panel 1041. Realize the input and output functions of the phone.
手机还可包括至少一种传感器1050,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1041的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1041和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset can also include at least one type of sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and/or when the mobile phone moves to the ear. Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
音频电路1060、扬声器1061,传声器1062可提供用户与手机之间的音频接口。音频电路1060可将接收到的音频数据转换后的电信号,传输到扬声器1061,由扬声器1061转换为声纹信号输出;另一方面,传声器1062将收集的声纹信号转换为电信号,由音频电路1060接收后转换为音频数据,再将音频数据输出处理器1080处理后,经RF电路1010以发送给比如另一手机,或者将音频数据输出至存储器1020以便进一步处理。An audio circuit 1060, a speaker 1061, and a microphone 1062 can provide an audio interface between the user and the handset. The audio circuit 1060 can transmit the converted electrical data of the received audio data to the speaker 1061, and convert it into a voiceprint signal output by the speaker 1061. On the other hand, the microphone 1062 converts the collected voiceprint signal into an electrical signal by the audio. The circuit 1060 is converted to audio data after being received, and then processed by the audio data output processor 1080, transmitted to the, for example, another mobile phone via the RF circuit 1010, or outputted to the memory 1020 for further processing.
Wi-Fi属于短距离无线传输技术,手机通过Wi-Fi模块1070可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图10示出了Wi-Fi模块1070,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users to send and receive e-mail, browse web pages and access streaming media through the Wi-Fi module 1070. It provides users with wireless broadband Internet access. Although FIG. 10 shows the Wi-Fi module 1070, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the invention.
处理器1080是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1020内的软件程序和/或模块, 以及调用存储在存储器1020内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1080可包括一个或多个处理单元;优选的,处理器1080可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1080中。The processor 1080 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1020, and invoking data stored in the memory 1020, The phone's various functions and processing data, so that the overall monitoring of the phone. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 1080.
手机还包括给各个部件供电的电源1090(比如电池),优选的,电源可以通过电源管理系统与处理器1080逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power source 1090 (such as a battery) that supplies power to various components. Preferably, the power source can be logically coupled to the processor 1080 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
在本发明实施例中,该终端所包括的处理器1080具备执行上述的实施例一、二中任一实施例所述的横竖屏切换方法的功能,在此不再赘述。In the embodiment of the present invention, the processor 1080 included in the terminal has the function of performing the horizontal and vertical screen switching method described in any one of the first embodiment and the second embodiment, and details are not described herein.
本申请还提供一种计算机可读存储介质,其上承载一个或多个计算机指令程序,计算机指令程序被一个或多个处理器执行时,一个或多个处理器执行实现一种横竖屏切换方法,包括:检测到显示界面从竖屏状态切换成横屏状态的触发指令;确定在所述竖屏状态下控件的信息流视频界面正在播放视频;在所述控件之上创建新页面;在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。The present application also provides a computer readable storage medium carrying one or more computer instruction programs thereon, and when the computer instruction program is executed by one or more processors, one or more processors perform a horizontal and vertical screen switching method The method includes: detecting a triggering instruction that the display interface is switched from the vertical screen state to the horizontal screen state; determining that the information stream video interface of the control is playing the video in the vertical screen state; creating a new page on the control; The video stream video interface embedded in the new page in the horizontal screen state plays the video.
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of the drawings are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in the flowchart of the drawings may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the execution order thereof is also It is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a part of the embodiments of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims (22)

  1. 一种横竖屏切换方法,包括以下步骤:A horizontal and vertical screen switching method includes the following steps:
    检测到显示界面从竖屏状态切换成横屏状态的触发指令;A trigger instruction that switches the display interface from the portrait state to the landscape state is detected;
    确定在所述竖屏状态下控件的信息流视频界面正在播放视频;Determining that the video stream video interface of the control is playing the video in the vertical screen state;
    在所述控件之上创建新页面;Create a new page on top of the control;
    在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。The video stream video interface embedded in the new page in the horizontal screen state plays the video.
  2. 根据权利要求1所述的横竖屏切换方法,其特征在于,所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频之后,还包括步骤:The horizontal and vertical screen switching method according to claim 1, wherein after the video stream video interface embedded in the new page is played in the horizontal screen state, the video stream video interface further includes the following steps:
    检测到显示界面从横屏状态切换成竖屏状态的触发指令;A trigger instruction for detecting that the display interface is switched from the horizontal screen state to the vertical screen state is detected;
    销毁所述新页面;Destroy the new page;
    在竖屏状态下重新嵌入所述控件的信息流视频界面播放所述视频。The video stream video interface that re-embeds the control in the portrait state plays the video.
  3. 根据权利要求2所述的横竖屏切换方法,其特征在于,所述检测到显示界面从横屏状态切换成竖屏状态的触发指令之后,还包括步骤:The horizontal and vertical screen switching method according to claim 2, wherein after the triggering of the triggering of the display interface to switch from the horizontal screen state to the vertical screen state, the method further comprises the steps of:
    判断当显示界面从横屏状态切换成竖屏状态时,所述新页面是否接收到触控指令;Determining whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state;
    若是,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频;If yes, the information stream video interface is still embedded in the new page in the vertical screen state, and continues to play the video;
    若否,继续所述销毁所述新页面的步骤。If not, continue with the step of destroying the new page.
  4. 根据权利要求3所述的横竖屏切换方法,其特征在于,所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频,包括步骤:The horizontal and vertical screen switching method according to claim 3, wherein the information flow video interface is still embedded in the new page in the vertical screen state, and the video is continuously played, including the steps of:
    在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并采用横屏尺寸播放所述视频;In the vertical screen state, the information flow video interface is still embedded in the new page, and the video is played in a horizontal screen size;
    或,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并把所述视频适配为竖屏尺寸,采用竖屏尺寸播放所述视频。Or, in the vertical screen state, the information stream video interface is still embedded in the new page, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
  5. 根据权利要求4所述的横竖屏切换方法,其特征在于,所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频之后,还包括步骤:The horizontal and vertical screen switching method according to claim 4, wherein after the information stream video interface is still embedded in the new page in the vertical screen state and continues to play the video, the method further includes the steps of:
    检测到退出播放所述视频的触发指令时,销毁所述新页面。The new page is destroyed when a trigger command to exit the play of the video is detected.
  6. 根据权利要求1所述的横竖屏切换方法,其特征在于,所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频之后,还包括步骤:暂停播放所述视频;The horizontal and vertical screen switching method according to claim 1, wherein the determining that after the video stream video interface of the control is playing the video in the vertical screen state, the method further comprises the step of: pausing the video;
    所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频为:The video stream video interface embedded in the new page in the horizontal screen state plays the video as:
    在横屏状态下嵌入所述新页面的信息流视频界面从暂停位置继续播放所述视 频。The stream video interface embedded in the new page in the landscape mode continues to play the video from the paused position.
  7. 根据权利要求1所述的横竖屏切换方法,其特征在于,所述在所述控件之上创建新页面,包括步骤:The horizontal and vertical screen switching method according to claim 1, wherein the creating a new page on the control comprises the steps of:
    适应横屏尺寸,创建浮于所述控件之上全屏的新页面;Adapt to the horizontal screen size and create a new page that floats above the control and is full screen;
    所述信息流视频界面脱离所述控件,并嵌入所述新页面。The information flow video interface is detached from the control and embedded in the new page.
  8. 根据权利要求1所述的横竖屏切换方法,其特征在于,所述检测到显示界面从竖屏状态切换成横屏状态的触发指令之后,还包括步骤:The method for switching between horizontal and vertical screens according to claim 1, wherein after detecting the triggering command of the display interface to switch from the portrait screen state to the landscape mode, the method further comprises the steps of:
    判断当显示界面从竖屏状态切换成横屏状态时,所述控件是否接收到触控指令;Determining whether the control receives a touch instruction when the display interface is switched from a portrait state to a landscape state;
    若是,在所述横屏状态下所述控件的信息流视频界面播放视频;If yes, playing the video in the information stream video interface of the control in the horizontal screen state;
    若否,继续所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频的步骤。If not, the step of determining that the video stream interface of the control is playing the video in the portrait state is continued.
  9. 根据权利要求8所述的横竖屏切换方法,其特征在于,所述在所述横屏状态下所述控件的信息流视频界面播放视频之后,还包括步骤:The horizontal and vertical screen switching method according to claim 8, wherein after the video stream video interface of the control plays the video in the horizontal screen state, the method further comprises the steps of:
    检测到预置横屏的触控指令时,继续所述在所述控件之上创建新页面的步骤。When the touch command of the preset landscape is detected, the step of creating a new page on the control is continued.
  10. 根据权利要求1所述的横竖屏切换方法,其特征在于,所述控件在安卓系统中用作容器,其包括列表或卡片控件。The horizontal and vertical screen switching method according to claim 1, wherein the control is used as a container in an Android system, and includes a list or a card control.
  11. 一种横竖屏切换装置,包括以下模块:A horizontal and vertical screen switching device includes the following modules:
    第一检测模块,用于检测到显示界面从竖屏状态切换成横屏状态的触发指令;a first detecting module, configured to detect a triggering instruction that the display interface is switched from a vertical screen state to a horizontal screen state;
    确定模块,用于确定在所述竖屏状态下控件的信息流视频界面正在播放视频;a determining module, configured to determine that a video stream of the control is playing a video in the vertical screen state;
    创建模块,用于在所述控件之上创建新页面;Creating a module for creating a new page on top of the control;
    第一播放模块,用于在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。a first playing module, configured to play the video in an information stream video interface embedded in the new page in the horizontal screen state.
  12. 一种终端,其包括:A terminal comprising:
    一个或多个处理器;One or more processors;
    存储器;Memory
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于:One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to:
    检测到显示界面从竖屏状态切换成横屏状态的触发指令;A trigger instruction that switches the display interface from the portrait state to the landscape state is detected;
    确定在所述竖屏状态下控件的信息流视频界面正在播放视频;Determining that the video stream video interface of the control is playing the video in the vertical screen state;
    在所述控件之上创建新页面;Create a new page on top of the control;
    在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频。The video stream video interface embedded in the new page in the horizontal screen state plays the video.
  13. 根据权利要求12所述的终端,其特征在于,所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频之后,还包括步骤:The terminal according to claim 12, wherein after the video stream video interface embedded in the new page in the horizontal screen state plays the video, the method further comprises the steps of:
    检测到显示界面从横屏状态切换成竖屏状态的触发指令;A trigger instruction for detecting that the display interface is switched from the horizontal screen state to the vertical screen state is detected;
    销毁所述新页面;Destroy the new page;
    在竖屏状态下重新嵌入所述控件的信息流视频界面播放所述视频。The video stream video interface that re-embeds the control in the portrait state plays the video.
  14. 根据权利要求13所述的终端,其特征在于,所述检测到显示界面从横屏状态切换成竖屏状态的触发指令之后,还包括步骤:The terminal according to claim 13, wherein after detecting the triggering instruction that the display interface is switched from the horizontal screen state to the vertical screen state, the method further comprises the steps of:
    判断当显示界面从横屏状态切换成竖屏状态时,所述新页面是否接收到触控指令;Determining whether the new page receives the touch instruction when the display interface is switched from the horizontal screen state to the vertical screen state;
    若是,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频;If yes, the information stream video interface is still embedded in the new page in the vertical screen state, and continues to play the video;
    若否,继续所述销毁所述新页面的步骤。If not, continue with the step of destroying the new page.
  15. 根据权利要求14所述的终端,其特征在于,所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频,包括步骤:The terminal according to claim 14, wherein the information stream video interface is still embedded in the new page in the vertical screen state, and the video is continuously played, including the steps of:
    在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并采用横屏尺寸播放所述视频;In the vertical screen state, the information flow video interface is still embedded in the new page, and the video is played in a horizontal screen size;
    或,在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并把所述视频适配为竖屏尺寸,采用竖屏尺寸播放所述视频。Or, in the vertical screen state, the information stream video interface is still embedded in the new page, and the video is adapted to a vertical screen size, and the video is played in a vertical screen size.
  16. 根据权利要求15所述的终端,其特征在于,所述在竖屏状态下所述信息流视频界面仍嵌于所述新页面,并继续播放所述视频之后,还包括步骤:The terminal according to claim 15, wherein after the information stream video interface is still embedded in the new page in the vertical screen state and continues to play the video, the method further includes the steps of:
    检测到退出播放所述视频的触发指令时,销毁所述新页面。The new page is destroyed when a trigger command to exit the play of the video is detected.
  17. 根据权利要求12所述的终端,其特征在于,所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频之后,还包括步骤:暂停播放所述视频;The terminal according to claim 12, wherein the determining that after the video stream video interface of the control is playing the video in the vertical screen state, the method further comprises the step of: pausing the video to be played;
    所述在所述横屏状态下嵌入所述新页面的信息流视频界面播放所述视频为:The video stream video interface embedded in the new page in the horizontal screen state plays the video as:
    在横屏状态下嵌入所述新页面的信息流视频界面从暂停位置继续播放所述视频。The stream video interface embedded in the new page in the landscape mode continues to play the video from the paused position.
  18. 根据权利要求12所述的终端,其特征在于,所述在所述控件之上创建新页面,包括步骤:The terminal according to claim 12, wherein said creating a new page on top of said control comprises the steps of:
    适应横屏尺寸,创建浮于所述控件之上全屏的新页面;Adapt to the horizontal screen size and create a new page that floats above the control and is full screen;
    所述信息流视频界面脱离所述控件,并嵌入所述新页面。The information flow video interface is detached from the control and embedded in the new page.
  19. 根据权利要求12所述的终端,其特征在于,所述检测到显示界面从竖屏状态切换成横屏状态的触发指令之后,还包括步骤:The terminal according to claim 12, wherein after detecting the triggering instruction that the display interface is switched from the portrait screen state to the landscape mode, the method further comprises the steps of:
    判断当显示界面从竖屏状态切换成横屏状态时,所述控件是否接收到触控指令;Determining whether the control receives a touch instruction when the display interface is switched from a portrait state to a landscape state;
    若是,在所述横屏状态下所述控件的信息流视频界面播放视频;If yes, playing the video in the information stream video interface of the control in the horizontal screen state;
    若否,继续所述确定在所述竖屏状态下控件的信息流视频界面正在播放视频的步骤。If not, the step of determining that the video stream interface of the control is playing the video in the portrait state is continued.
  20. 根据权利要求19所述的终端,其特征在于,所述在所述横屏状态下所述控件的信息流视频界面播放视频之后,还包括步骤:The terminal according to claim 19, wherein after the video stream video interface of the control plays the video in the horizontal screen state, the method further comprises the steps of:
    检测到预置横屏的触控指令时,继续所述在所述控件之上创建新页面的步骤。When the touch command of the preset landscape is detected, the step of creating a new page on the control is continued.
  21. 根据权利要求12所述的终端,其特征在于,所述控件在安卓系统中用作容器,其包括列表或卡片控件。The terminal of claim 12, wherein the control is used as a container in an Android system, including a list or card control.
  22. 一种计算机可读存储介质,其上承载一个或多个计算机指令程序,所述计算机指令程序被一个或多个处理器执行时,所述一个或多个处理器执行权利要求1-10任一项所述的方法。A computer readable storage medium having one or more computer program programs thereon, the one or more processors executing any one of claims 1-10 when the computer program program is executed by one or more processors The method described in the item.
PCT/CN2018/076254 2017-12-29 2018-02-11 Screen orientation switching method, device, and terminal WO2019127868A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711479043.2A CN108234763B (en) 2017-12-29 2017-12-29 Horizontal and vertical screen switching method and device and terminal
CN201711479043.2 2017-12-29

Publications (1)

Publication Number Publication Date
WO2019127868A1 true WO2019127868A1 (en) 2019-07-04

Family

ID=62647028

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076254 WO2019127868A1 (en) 2017-12-29 2018-02-11 Screen orientation switching method, device, and terminal

Country Status (2)

Country Link
CN (1) CN108234763B (en)
WO (1) WO2019127868A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181165A (en) * 2020-10-27 2021-01-05 维沃移动通信有限公司 Input method and device and electronic equipment
CN112333513A (en) * 2020-07-09 2021-02-05 深圳Tcl新技术有限公司 Method and device for creating vertical screen video library and storage medium
CN116325761A (en) * 2020-05-19 2023-06-23 聚好看科技股份有限公司 Display equipment and media asset playing method
WO2024114569A1 (en) * 2022-11-30 2024-06-06 华为技术有限公司 Video processing method, and electronic device

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688455B (en) * 2018-12-27 2021-03-09 北京字节跳动网络技术有限公司 Video playing method, device and equipment
CN111726666A (en) * 2019-03-18 2020-09-29 北京京东尚科信息技术有限公司 Video display control method and device
CN110336923B (en) * 2019-07-16 2021-06-18 网易(杭州)网络有限公司 Method and device for switching play modes, electronic equipment and storage medium
CN112399231B (en) * 2019-08-19 2023-10-24 上海哔哩哔哩科技有限公司 Playing method
CN112667327B (en) * 2019-10-15 2024-05-28 深圳市万普拉斯科技有限公司 Method and device for displaying screen turning picture, computer equipment and storage medium
CN111277659B (en) * 2020-01-21 2022-09-30 上海万物新生环保科技集团有限公司 Method and device for detecting display state of transverse screen and vertical screen of mobile phone
CN111338537B (en) * 2020-02-11 2021-06-25 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for displaying video
CN111400631B (en) * 2020-03-16 2021-06-18 出通科技(上海)有限公司 Asymmetric information stream reading method and device, terminal and storage medium
CN112188274B (en) * 2020-09-30 2022-07-12 北京字节跳动网络技术有限公司 Method and device for adjusting video playing progress and electronic equipment
CN114489875A (en) * 2020-10-23 2022-05-13 武汉斗鱼鱼乐网络科技有限公司 Player control method and device, storage medium and electronic equipment
CN113077470B (en) * 2021-03-26 2022-01-18 天翼爱音乐文化科技有限公司 Method, system, device and medium for cutting horizontal and vertical screen conversion picture
CN113141529B (en) * 2021-04-25 2022-02-25 聚好看科技股份有限公司 Display device and media asset playing method
CN113220399B (en) * 2021-05-17 2023-08-15 百度在线网络技术(北京)有限公司 Interface display method and device, intelligent screen device and storage medium
CN113467878A (en) * 2021-07-15 2021-10-01 掌阅科技股份有限公司 Page horizontal and vertical screen display method, electronic equipment and storage medium
CN113867579A (en) * 2021-08-05 2021-12-31 北京字跳网络技术有限公司 Horizontal screen interaction method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978115A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Content display method and device
CN105306997A (en) * 2014-05-30 2016-02-03 广州市动景计算机科技有限公司 Mobile terminal play mode switching method and device
CN106325719A (en) * 2016-08-05 2017-01-11 武汉斗鱼网络科技有限公司 Gravity sensing and manual control combined screen rotation control method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834938A (en) * 2010-03-25 2010-09-15 中兴通讯股份有限公司 Device and method for realizing horizontal/vertical screen switching of mobile terminal
CN106406848A (en) * 2016-03-28 2017-02-15 乐视控股(北京)有限公司 Terminal horizontal/vertical screen switching method and device
CN106339092B (en) * 2016-08-31 2019-08-13 北京小米移动软件有限公司 Horizontal/vertical screen switching method and apparatus
CN106648056A (en) * 2016-09-30 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Method and device for switching between landscape display and portrait display of mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978115A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Content display method and device
CN105306997A (en) * 2014-05-30 2016-02-03 广州市动景计算机科技有限公司 Mobile terminal play mode switching method and device
CN106325719A (en) * 2016-08-05 2017-01-11 武汉斗鱼网络科技有限公司 Gravity sensing and manual control combined screen rotation control method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116325761A (en) * 2020-05-19 2023-06-23 聚好看科技股份有限公司 Display equipment and media asset playing method
CN116325761B (en) * 2020-05-19 2024-05-03 聚好看科技股份有限公司 Display equipment and media asset playing method
CN112333513A (en) * 2020-07-09 2021-02-05 深圳Tcl新技术有限公司 Method and device for creating vertical screen video library and storage medium
CN112333513B (en) * 2020-07-09 2024-02-06 深圳Tcl新技术有限公司 Method, equipment and storage medium for creating vertical screen video library
CN112181165A (en) * 2020-10-27 2021-01-05 维沃移动通信有限公司 Input method and device and electronic equipment
WO2024114569A1 (en) * 2022-11-30 2024-06-06 华为技术有限公司 Video processing method, and electronic device

Also Published As

Publication number Publication date
CN108234763B (en) 2021-02-26
CN108234763A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
WO2019127868A1 (en) Screen orientation switching method, device, and terminal
WO2019154181A1 (en) Display control method and mobile terminal
CN108021305B (en) Application association starting method and device and mobile terminal
WO2019196929A1 (en) Video data processing method and mobile terminal
WO2021169959A1 (en) Application starting method and electronic device
CN110837327B (en) Message viewing method and terminal
WO2019085774A1 (en) Application control method and mobile terminal
WO2019154182A1 (en) Method for setting volume of application program, and mobile terminal
WO2019201271A1 (en) Call processing method and mobile terminal
WO2019174459A1 (en) Application processing method and mobile terminal
WO2021036711A1 (en) Network control method and related product
WO2019174541A1 (en) Operation method for mobile terminal and mobile terminal
WO2017215635A1 (en) Sound effect processing method and mobile terminal
CN106406924B (en) Control method and device for starting and quitting picture of application program and mobile terminal
CN108446156B (en) Application program control method and terminal
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
WO2021068885A1 (en) Control method and electronic device
WO2019169991A1 (en) Display method and mobile terminal
US11989330B2 (en) Permission management method and terminal device
WO2020024770A1 (en) Method for determining communication object, and mobile terminal
WO2020228538A1 (en) Screenshot method and mobile terminal
WO2020238445A1 (en) Screen recording method and terminal
WO2017215511A1 (en) Control method of scene sound effect and related products
WO2019011335A1 (en) Mobile terminal and control method therefor, and readable storage medium
WO2017206853A1 (en) Swiping response acceleration method and related products

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18895676

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18895676

Country of ref document: EP

Kind code of ref document: A1