WO2022068311A1 - 多媒体资源切换方法及装置 - Google Patents

多媒体资源切换方法及装置 Download PDF

Info

Publication number
WO2022068311A1
WO2022068311A1 PCT/CN2021/105539 CN2021105539W WO2022068311A1 WO 2022068311 A1 WO2022068311 A1 WO 2022068311A1 CN 2021105539 W CN2021105539 W CN 2021105539W WO 2022068311 A1 WO2022068311 A1 WO 2022068311A1
Authority
WO
WIPO (PCT)
Prior art keywords
view
user interface
multimedia resource
moving
multimedia
Prior art date
Application number
PCT/CN2021/105539
Other languages
English (en)
French (fr)
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 WO2022068311A1 publication Critical patent/WO2022068311A1/zh

Links

Images

Classifications

    • 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
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a method and device for switching multimedia resources.
  • the video application when a user views a video through a video application (such as a short video application) in an electronic device, the video application can directly switch and replace the video according to the user's video switching operation, and the image is visually divided. Strong, poor visual effect.
  • the present disclosure provides a method and device for switching multimedia resources.
  • a method for switching multimedia resources including: displaying a first multimedia resource in a user interface through a first view; receiving a multimedia switching operation implemented on the user interface, and determining to be The second multimedia resource to be switched; wherein, the second multimedia resource is displayed through a second view; according to the operation information of the multimedia switching operation, the first view is controlled to move away from the user interface and the first view respectively.
  • the second view moves into the user interface until the second view completely occupies the user interface and displays the second multimedia resource; wherein, the second view covers at least part of the time during the moving process. at least part of the presentation content of the first multimedia resource.
  • the controlling the first view to move away from the user interface and the second view to move into the user interface respectively according to the operation information of the multimedia switching operation includes: according to the Operation information of the multimedia switching operation, controlling the second view to move into the user interface; in response to detecting that the second view is moved to the preset position of the user interface, according to the operation information of the multimedia switching operation , controlling the first view to move away from the user interface.
  • the moving speed of the first view is greater than the moving speed of the second view.
  • controlling the first view to move away according to operation information of the multimedia switching operation includes: obtaining, according to the preset position, the remaining moving position required by the second view to completely occupy the user interface; and determining the position of the first view according to the operation information of the multimedia switching operation.
  • Movement direction according to the movement direction of the first view, obtain the movement position required by the first view to leave the user interface, wherein the movement position is greater than the remaining movement position; according to the movement direction of the second view the moving speed, the moving position and the remaining moving position, determine the moving speed of the first view; control the first view to move away from the user at the moving speed of the first view in the moving direction interface.
  • the determining the movement speed of the first view according to the movement speed of the second view, the movement position and the remaining movement position includes: according to the second view The moving speed of the second view and the remaining moving position are determined, and the moving time of the second view is determined; the moving speed of the first view is determined according to the moving position and the moving time of the second view.
  • the controlling the second view to move into the user interface according to the operation information of the multimedia switching operation includes: according to the Operation information of the sliding operation, determine the sliding direction and sliding distance of the sliding operation; determine the moving direction of the second view according to the sliding direction, and determine the moving distance of the second view according to the sliding distance; The moving direction and the moving distance control the second view to move into the user interface.
  • in response to the multimedia switching operation being a sliding operation in response to detecting that the second view is moved to a preset position of the user interface, according to the multimedia switching operation operation information, and controlling the first view to move away from the user interface includes: determining the sliding direction of the sliding operation according to the operation information of the sliding operation; determining the moving direction of the first view according to the sliding direction ; and in response to detecting that the second view is moved to a preset position of the user interface, controlling the first view to move away from the user interface according to the moving direction of the first view.
  • the controlling the first view to move away from the user interface and the second view to move into the user interface respectively according to the operation information of the multimedia switching operation includes: according to the The operation information of the multimedia switching operation determines the moving direction of the second view and the moving direction of the first view; and determines the moving direction of the first multimedia resource according to the moving direction of the first view, wherein , the moving directions of the second view and the first view are the same with respect to the user interface, the moving direction of the first multimedia resource is opposite to the moving direction of the first view, and the first The moving speed of the multimedia resource is the same as the moving speed of the first view; controlling the second view to move into the user interface according to the moving direction of the second view; controlling the moving direction of the first view When the first view moves away from the user interface, the first multimedia resource is controlled to move relative to the first view according to the moving direction of the first multimedia resource.
  • the method further includes: in response to detecting that the second view is moved to a preset position of the user interface, adjusting the moving direction of the first multimedia resource, the The moving direction of the first multimedia resource before adjustment is opposite to the adjusted moving direction; and according to the adjusted moving direction, the first multimedia resource is controlled to move away from the user interface.
  • the method further includes: controlling the first multimedia resource to be in a playing state; or, controlling the The first multimedia resource is in a suspended state.
  • the method further includes: controlling the second multimedia resource to be in a play state or a pause state.
  • the method further includes: in response to detecting that the second multimedia resource has not been loaded, controlling the The preview multimedia resource of the second multimedia resource is displayed on the second view; in response to detecting that the loading of the second multimedia resource is completed, the second multimedia resource is controlled to be in a playing state.
  • an apparatus for switching multimedia resources including: a first display module, configured to display a first multimedia resource through a first view in a user interface; a determination module, configured to receiving a multimedia switching operation implemented on the user interface, and determining a second multimedia resource to be switched; wherein, the second multimedia resource is displayed through a second view; the first control module is configured to Operation information of the multimedia switching operation, respectively controlling the first view to move away from the user interface and the second view to move into the user interface, until the second view completely occupies the user interface, and the second view is displayed.
  • a media resource wherein, during the moving process of the second view, at least part of the displayed content of the first multimedia resource is covered at least part of the time.
  • the first control module includes: a first control sub-module configured to control the second view to move into the user interface according to the operation information of the multimedia switching operation;
  • the second control submodule is configured to, in response to detecting that the second view is moved to a preset position of the user interface, control the first view to move away from the user interface according to the operation information of the multimedia switching operation User Interface.
  • the moving speed of the first view is greater than the moving speed of the second view.
  • the second control sub-module includes: a first acquisition unit, configured to acquire, according to the preset position, the remaining amount required for the second view to completely occupy the user interface a moving position; a first determining unit configured to determine a moving direction of the first view according to the operation information of the multimedia switching operation; a second obtaining unit configured to obtain a moving direction of the first view according to the moving direction a moving position required by the first view to leave the user interface, wherein the moving position is greater than the remaining moving position; a second determining unit is configured to, according to the moving speed of the second view, the moving the position and the remaining moving position, determine the moving speed of the first view; the control unit is configured to control the first view to move away from the user at the moving speed of the first view in the moving direction interface.
  • the second determining unit is specifically configured to: determine the moving time of the second view according to the moving speed of the second view and the remaining moving position; The moving position and the moving time of the second view determine the moving speed of the first view.
  • the first control submodule in response to the multimedia switching operation being a sliding operation, is specifically configured to: determine the sliding direction of the sliding operation according to the operation information of the sliding operation and sliding distance; determine the moving direction of the second view according to the sliding direction, and determine the moving distance of the second view according to the sliding distance; control the first view according to the moving direction and the moving distance The second view moves into the user interface.
  • the second control sub-module in response to the multimedia switching operation being a sliding operation, is specifically configured to: determine the sliding direction of the sliding operation according to the operation information of the sliding operation ; determining the moving direction of the first view according to the sliding direction; and in response to detecting that the second view is moved to a preset position of the user interface, controlling the moving direction of the first view according to the moving direction of the first view The first view is moved away from the user interface.
  • the first control module includes: a first determination sub-module configured to determine, according to operation information of the multimedia switching operation, the moving direction of the second view, the first A moving direction of a view; a second determining submodule configured to determine a moving direction of the first multimedia resource according to the moving direction of the first view, wherein the second view and the first The moving direction of the view is the same as that of the user interface, the moving direction of the first multimedia resource is opposite to the moving direction of the first view, and the moving speed of the first multimedia resource is the same as that of the first multimedia resource.
  • the moving speed of one view is the same; the third control sub-module is configured to control the second view to move into the user interface according to the moving direction of the second view; the fourth control sub-module is configured to control the user interface according to the moving direction of the second view;
  • the moving direction of the first view controls the movement of the first view away from the user interface, and controls the relative movement of the first multimedia resource relative to the first view according to the moving direction of the first multimedia resource. move.
  • the apparatus further includes: an adjustment module configured to adjust the first multimedia resource in response to detecting that the second view is moved to a preset position of the user interface The moving direction of the first multimedia resource before adjustment is opposite to the adjusted moving direction; the second control module is configured to control the first multimedia resource according to the adjusted moving direction The resource moves away from the user interface.
  • the apparatus further includes: a third control module configured to control the first view during the process that the first control module controls the first view to move away from the user interface.
  • a multimedia resource is in a play state; or, the first multimedia resource is controlled to be in a pause state.
  • the apparatus further includes: a fourth control module, configured to control the first control module to control the first control module to move the second view into the user interface.
  • the multimedia resource is in a play state or a pause state.
  • the apparatus further includes: a fifth control module configured to, in the process of controlling the second view to move into the user interface, in response to detecting the second multimedia If the volume resource has not been loaded, control to display the preview multimedia resource of the second multimedia resource on the second view; in response to detecting that the loading of the second multimedia resource is completed, control the second multimedia resource The volume resource is playing.
  • a fifth control module configured to, in the process of controlling the second view to move into the user interface, in response to detecting the second multimedia If the volume resource has not been loaded, control to display the preview multimedia resource of the second multimedia resource on the second view; in response to detecting that the loading of the second multimedia resource is completed, control the second multimedia resource The volume resource is playing.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to achieve The multimedia resource switching method proposed by the embodiment of the first aspect of the present disclosure.
  • a non-volatile computer-readable storage medium when instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the first aspect of the present disclosure
  • the multimedia resource switching method proposed by the embodiment is provided, when instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the first aspect of the present disclosure
  • a computer program product which, when executed by a processor of an electronic device, enables the electronic device to execute the multimedia resource switching method provided by the embodiment of the first aspect of the present disclosure.
  • the second multimedia resource to be switched is determined based on the multimedia switching operation, and the multimedia resource is determined according to the multimedia switching operation.
  • the operation information of the switching operation respectively controls the first view to move away from the user interface and the second view for displaying the second multimedia resource to move into the user interface, until the second view completely occupies the user interface and displays the second multimedia resource and, during the moving process of the second view, at least part of the displayed content of the first multimedia resource is covered at least part of the time.
  • the second multimedia resource covers part of the displayed content of the first multimedia resource for a part of the time, which can avoid the occurrence of a sense of separation due to the direct switching of the replacement view, and realizes the During the switching process, the animation layers are rich, providing a variety of switching effects while achieving smooth switching effects.
  • Fig. 1 is a flow chart of a method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 2 is a flow chart of another method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 3 is a flow chart of another method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 4 is a flow chart of another method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 5 is a flow chart of another method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 6 is a flowchart showing another method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 7 is a flow chart of another method for switching multimedia resources according to an exemplary embodiment.
  • Fig. 8 is a flow chart of another method for switching multimedia resources according to an exemplary embodiment.
  • FIG. 9 is an example diagram of a part of the user interface during the video switching process.
  • Fig. 10 is a block diagram of an apparatus for switching multimedia resources according to an exemplary embodiment.
  • Fig. 11 is a block diagram of another apparatus for switching multimedia resources according to an exemplary embodiment.
  • Fig. 12 is a block diagram of another apparatus for switching multimedia resources according to an exemplary embodiment.
  • Fig. 13 is a block diagram of another apparatus for switching multimedia resources according to an exemplary embodiment.
  • Fig. 14 is a block diagram of an electronic device used for presentation control of an application interface according to an exemplary embodiment.
  • Fig. 1 is a flow chart of a method for switching multimedia resources according to an exemplary embodiment.
  • the embodiment of the present disclosure is exemplified by the multimedia resource switching method being configured in a multimedia resource switching apparatus.
  • the multimedia resource switching apparatus may be implemented by software and/or hardware.
  • the multimedia resource switching apparatus may be configured in an electronic device to The electronic device is enabled to perform a multimedia resource switching function.
  • the electronic device can be any device with computing capability, such as a PC (Personal Computer, personal computer), a mobile terminal, a server, etc.
  • the mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, Hardware devices such as in-vehicle devices with various operating systems, touch screens and/or display screens.
  • the method for switching multimedia resources may include the following steps.
  • step 101 a first multimedia resource is displayed in a user interface through a first view.
  • the multimedia resources involved in the embodiments of the present disclosure may include, but are not limited to, images, animations, videos, music clips, etc.
  • the multimedia resources may be set in combination with specific business requirements, which are not made in this embodiment. Specific restrictions.
  • step 102 a multimedia switching operation implemented on a user interface is received, and a second multimedia resource to be switched is determined, wherein the second multimedia resource is displayed through a second view.
  • the multimedia switching operation is an interactive operation implemented on the user interface to trigger the switching of the first multimedia resource being displayed to the multimedia resource desired to be played by the user.
  • the multimedia switching operation may be an operation type supported by the user interface or preset preferences of the user.
  • a control for switching multimedia is provided on the user interface, and the multimedia switching operation can be triggered by triggering the control on the user interface.
  • the multimedia switching operation can be triggered by sliding the user interface, and the multimedia switching operation is not specifically limited in this embodiment.
  • the first switching instruction to switch to the previous multimedia resource is determined. is triggered, can obtain the last multimedia resource adjacent to the first multimedia resource according to the first switching instruction and the first multimedia resource, and use the obtained last multimedia resource as the second multimedia resource resource.
  • the second switching instruction for switching to the next multimedia resource is triggered, and according to the second switching instruction and the first multimedia resource, it is possible to obtain The next multimedia resource adjacent to the first multimedia resource is used as the second multimedia resource.
  • the sliding direction may be determined according to the operation information of the sliding operation, and the second multimedia resource may be determined according to the sliding direction and the first multimedia resource.
  • the sliding direction being the upward direction
  • the last multimedia resource adjacent to the first multimedia resource may be obtained, and the obtained last multimedia resource may be used as the second multimedia resource.
  • the next multimedia resource adjacent to the first multimedia resource may be acquired, and the acquired next multimedia resource may be used as the second multimedia resource.
  • the sliding direction being the left direction
  • the last multimedia resource adjacent to the first multimedia resource may be obtained, and the obtained last multimedia resource may be used as the second multimedia resource.
  • the next multimedia resource adjacent to the first multimedia resource may be acquired, and the acquired next multimedia resource may be used as the second multimedia resource.
  • the triggered multimedia resource identifier can be acquired, the multimedia resource corresponding to the multimedia resource identifier can be acquired, and the acquired multimedia resource can be used as the second multimedia resource.
  • step 103 according to the operation information of the multimedia switching operation, respectively control the first view to move away from the user interface and the second view to move into the user interface, until the second view completely occupies the user interface and displays the second multimedia resource.
  • the operation information of the sliding operation may include a sliding direction and a sliding speed.
  • a possible implementation manner of the above step 103 may be: according to the sliding direction, Determine the moving direction of the first view and the second view, control the second view to move into the user interface at a sliding speed in the moving direction of the second view, and control the first view after detecting that the second view has moved for a preset time In the moving direction of the first view, the view leaves the mobile user interface at a second moving speed, wherein the second moving speed is greater than the sliding speed, and the moving directions of the first view and the second view are the same.
  • the sliding direction may be the same as the moving direction of the first view and the second view, or may be opposite, which is not specifically limited in this embodiment.
  • the preset time may be a preset time in the multimedia resource switching device, or may be determined based on the sliding speed. For example, if it is detected that the sliding speed exceeds the preset speed, the preset time is set as the first time time, if it is detected that the sliding speed is less than the preset speed, the preset time is set as the second time, wherein the first time is less than the second time.
  • the above sliding operation may be an up and down sliding operation.
  • the above-mentioned sliding operation may be a left-right sliding operation, that is, the switching of multimedia resources may be realized by sliding left and right.
  • the above-mentioned multimedia switching operation is implemented by triggering a control, and a possible implementation manner of the above-mentioned step 103 is: according to the triggered control, the operation information of the above-mentioned multimedia switching operation can be determined, The operation information includes direction information. Then, the second view can be controlled to move into the user interface at the first moving speed on the direction information, and after detecting that the second view has moved for a preset time, the first view can be controlled on the direction information to move at the second moving speed Exit the mobile user interface, wherein the second movement speed is greater than the first movement speed. As a result, direct switching of alternate views is avoided, thereby achieving a smooth switching effect.
  • the above-mentioned direction information in response to detecting that the control for switching to the previous multimedia resource is triggered, is the first direction information.
  • the above-mentioned direction information is second direction information, wherein the first direction information and the second direction information are opposite directions, for example, the first direction information is an upward direction,
  • the second direction information may be an upward direction.
  • the first direction information may be the left direction
  • the second direction information may be the right direction.
  • the A multimedia resource is playing.
  • the first multimedia resource may also be controlled to be in a suspended state. In this way, it is possible to reduce the impact on the user caused by continuing the multimedia resources during the multimedia switching process.
  • whether to play the first multimedia resource in the process of switching the multimedia resource may be preset according to actual service requirements.
  • the second multimedia resource can be controlled to be playing state.
  • the second multimedia resource may be controlled to be in a suspended state.
  • the second multimedia resource to be switched usually needs to be loaded, and it takes a certain time to load the multimedia resource.
  • the preview multimedia resource of the second multimedia resource can be controlled to be displayed on the second view.
  • the second multimedia resource is controlled to be in a playing state.
  • the previewed multimedia resource may be a partial resource segment of the second multimedia resource, for example, the above-mentioned multimedia resource is a video, and the previewed multimedia resource may be a video cover of the video.
  • the first view and the second view may be connected or separated by a certain distance. This embodiment does not specifically limit whether the first view and the second view are connected. When implemented, it can be set according to actual business needs.
  • the multimedia resource switching method in the process of displaying the first multimedia resource in the user interface through the first view, after receiving the multimedia switching operation implemented in the user interface, based on the multimedia switching operation, determine the to-be-switched the second multimedia resource, and according to the operation information of the multimedia switching operation, respectively control the first view to move away from the user interface and the second view for displaying the second multimedia resource to move into the user interface until the second view is completely occupied
  • the user interface displays the second multimedia resource, and during the moving process of the second view, at least part of the displayed content of the first multimedia resource is covered at least part of the time.
  • the second multimedia resource covers part of the displayed content of the first multimedia resource for a part of the time, which can avoid the occurrence of a sense of separation due to the direct switching of the replacement view, and realizes the During the switching process, the animation layers are rich, providing a variety of switching effects while achieving smooth switching effects.
  • controlling the first view to move away from the user interface and the second view to move into the user interface according to the operation information of the multimedia switching operation can be implemented in various ways.
  • the following describes a possible implementation manner of controlling the first view to move away from the user interface and the second view to move into the user interface according to the operation information of the multimedia switching operation, as shown in FIG. 2 , which may include:
  • step 201 according to the operation information of the multimedia switching operation, the second view is controlled to move into the user interface.
  • step 202 in response to detecting that the second view is moved to a preset position of the user interface, the first view is controlled to move away from the user interface according to the operation information of the multimedia switching operation.
  • the preset position is a preset position according to actual business requirements, for example, the preset position may be 40%, 50%, 60%, or 70% of the user interface.
  • the richness of animation levels can be enriched in the process of switching the multimedia resources, a smoother switching vision can be realized, and the switching effect of the multimedia resources can be further improved.
  • the moving speed of the first view in the embodiment of the present disclosure is greater than the moving speed of the second view.
  • a possible way to control the first view to move away from the user interface may include:
  • step 301 according to the preset position, the remaining moving positions required by the second view to completely occupy the user interface are acquired.
  • step 302 the moving direction of the first view is determined according to the operation information of the multimedia switching operation.
  • step 303 according to the moving direction of the first view, the moving position required for the first view to leave the user interface is acquired, wherein the moving position is greater than the remaining moving position.
  • step 304 the moving speed of the first view is determined according to the moving speed, the moving position and the remaining moving position of the second view.
  • the movement time of the second view is determined according to the movement speed and the remaining movement position of the second view; the movement speed of the first view is determined according to the movement position and the movement time of the second view.
  • the moving speed, moving position and remaining moving position of the second view may be input into a preset calculation model, so as to determine the first view's Moving speed.
  • the formula for calculating the moving speed of the first view in the calculation model is:
  • V 1 in the above formula represents the moving speed of the first view
  • S 1 represents the required moving position of the first view
  • V 2 represents the moving speed of the second view
  • S 2 represents the remaining moving position of the second view.
  • step 305 the first view is controlled to move away from the user interface at the moving speed of the first view in the moving direction.
  • the sliding direction and sliding speed can be used to control the movement of the second view into the user interface.
  • a possible implementation manner of controlling the second view to move into the user interface may include:
  • step 401 the sliding direction and sliding distance of the sliding operation are determined according to the operation information of the sliding operation.
  • step 402 the moving direction of the second view is determined according to the sliding direction, and the moving distance of the second view is determined according to the sliding distance.
  • step 403 the second view is controlled to move into the user interface according to the moving direction and the moving distance.
  • the sliding direction and the sliding speed of the sliding operation are determined in combination with the operation information of the sliding operation, and the movement of the second view into the user interface is accurately controlled in combination with the sliding direction and the sliding speed, so that the movement of the second view can be accurately controlled. It can be performed according to the sliding direction and sliding speed, which facilitates the control of the movement of the second view through the sliding operation, and enriches the effect of multimedia switching.
  • the first view in response to the multimedia switching operation being a sliding operation, when it is detected that the second view is moved to a preset position of the user interface, the first view is controlled to move according to the operation information of the multimedia switching operation
  • the multimedia switching operation being a sliding operation
  • step 501 the sliding direction of the sliding operation is determined according to the operation information of the sliding operation.
  • step 502 the moving direction of the first view is determined according to the sliding direction.
  • the moving direction of the first view may be the same as or different from the sliding direction, which is not specifically limited in this embodiment.
  • the moving direction of the second view may be the upward direction.
  • the moving direction of the second view may be the downward direction.
  • the moving direction of the second view in response to the sliding direction being the upward direction, may be the leftward direction.
  • the moving direction of the second view in response to the sliding direction being the upward direction, may be the rightward direction.
  • step 503 in response to detecting that the second view is moved to a preset position of the user interface, control the first view to move away from the user interface according to the moving direction of the first view.
  • the moving speed of the first view and the moving speed of the second view may be the same or different.
  • the moving speed of the first view may be greater than the moving speed of the second view.
  • the moving direction of the first view is controlled in combination with the sliding direction of the sliding operation, so that in the process of switching, the control of the first view is realized. control, which enriches the effect of multimedia switching.
  • FIG. 6 Another possible implementation manner of controlling the first view to move away from the user interface and the second view to move into the user interface respectively according to the operation information of the multimedia switching operation is described below with reference to FIG. 6 .
  • it can include:
  • step 601 the moving direction of the second view and the moving direction of the first view are determined according to the operation information of the multimedia switching operation.
  • the sliding direction of the sliding operation can be determined according to the operation information of the sliding operation, and the moving directions of the second view and the first view can be determined according to the sliding direction.
  • the moving direction of the first view and the second view may be the same as the sliding direction, or may be opposite.
  • the operation information of the above-mentioned multimedia switching operation may be determined according to the triggered control, wherein the operation information includes direction information, and then, according to the direction information to determine the moving direction of the first view and the second view.
  • the moving directions of the first view and the second view may be the same as the above-mentioned direction information, or may be different.
  • the above-mentioned direction information is the first direction information.
  • the above-mentioned direction information is second direction information, wherein the first direction information and the second direction information are opposite directions, for example, the first direction information is an upward direction,
  • the second direction information may be an upward direction.
  • the first direction information may be a left direction
  • the second direction information may be a right direction.
  • step 602 the moving direction of the first multimedia resource is determined according to the moving direction of the first view, wherein the moving directions of the second view and the first view are the same with respect to the user interface, and the moving direction of the first multimedia resource The direction is opposite to the moving direction of the first view, and the moving speed of the first multimedia resource is the same as the moving speed of the first view.
  • step 603 the second view is controlled to move into the user interface according to the moving direction of the second view.
  • step 604 while controlling the first view to move away from the user interface according to the moving direction of the first view, the first multimedia resource is controlled to move relative to the first view according to the moving direction of the first multimedia resource.
  • the moving direction of the first view and the second view is determined in combination with the operation information of the multimedia switching operation, and the moving direction of the first multimedia resource is determined in combination with the moving direction of the second view, and the moving direction of the first multimedia resource is determined according to the moving direction of the second view.
  • the moving direction of the second view controls the second view to move into the user interface, and controls the first view to move away from the user interface according to the moving direction of the first view, and controls the first multimedia resource according to the moving direction of the first multimedia resource.
  • the volume resource moves relative to the first view.
  • the method may include:
  • step 701 the moving direction of the second view and the moving direction of the first view are determined according to the operation information of the multimedia switching operation.
  • step 702 the moving direction of the first multimedia resource is determined according to the moving direction of the first view, wherein the moving directions of the second view and the first view are the same with respect to the user interface, and the moving direction of the first multimedia resource The direction is opposite to the moving direction of the first view, and the moving speed of the first multimedia resource is the same as the moving speed of the first view.
  • step 703 the second view is controlled to move into the user interface according to the moving direction of the second view.
  • step 704 while controlling the first view to move away from the user interface according to the moving direction of the first view, the first multimedia resource is controlled to move relative to the first view according to the moving direction of the first multimedia resource.
  • step 705 in response to detecting that the second view is moved to a preset position of the user interface, adjust the moving direction of the first multimedia resource, the moving direction before adjustment and the adjusted moving direction of the first multimedia resource In the opposite direction.
  • step 706 according to the adjusted moving direction, the first multimedia resource is controlled to move away from the user interface.
  • the moving speed of the first multimedia resource can be adjusted, so that the adjusted movement The speed is greater than the moving speed of the second multimedia resource.
  • the moving position required for the first multimedia to move away from the user interface may be obtained, and according to the preset position, the remaining moving position required for the second view to completely occupy the user interface may be obtained, and then, according to the preset position
  • the moving speed and the remaining moving position of the second view determine the moving time of the second view; the moving speed of the first multimedia resource is determined according to the moving position and the moving time of the second view.
  • the moving modes of the first view and the second view do not change, and continue to move in the above-mentioned moving mode until the second view is moved. All occupy the user interface.
  • the second view before it is detected that the second view has not been moved to the preset position of the user interface, according to the operation information of the multimedia switching operation, the second view is controlled to move into the user interface and the first view to move away from the user, respectively. interface, while controlling the first view to move away from the user interface, control the first multimedia resource to move relative to the first view, the moving direction of the first multimedia resource is opposite to the moving direction of the first view, and the first multimedia resource is moved relative to the first view.
  • the moving speed of the media resource is the same as the moving speed of the first view, and in response to detecting that the second view is moved to a preset position of the user interface, adjusting the moving direction of the first multimedia resource, the first multimedia resource
  • the moving direction before adjustment is opposite to the moving direction after adjustment.
  • the first multimedia resource is controlled to move away from the user interface according to the adjusted moving direction.
  • the multimedia resource switching method of this embodiment will be further described with reference to FIGS. As shown in Figure 8, the multimedia resource switching method may include:
  • step 801 a first video is displayed in a user interface through a first view.
  • the above-mentioned user interface may only include the above-mentioned first view, that is, the size information of the first view is the same as that of the user interface. That is, the first view is displayed in the form of a full screen in the electronic device.
  • the first video is the first video, wherein an example diagram of the user interface of the first video is included, as shown in a diagram in FIG. 9 .
  • step 802 the upward sliding operation implemented on the user interface is received, and the second video to be switched is determined.
  • the second video is displayed through the second view.
  • the previous video adjacent to the first video may be acquired according to the upward sliding operation and the first video, and the acquired previous video may be used as the second video.
  • step 803 the moving direction of the second view and the moving direction of the first view are determined according to the operation information of the upward sliding operation.
  • step 804 the moving direction of the first video is determined according to the moving direction of the first view, wherein the moving directions of the second view and the first view are the same with respect to the user interface, and the moving direction of the first video is relative to the first view
  • the moving direction of the first video is opposite, and the moving speed of the first video is the same as the moving speed of the first view.
  • step 805 the second view is controlled to move into the user interface according to the moving direction of the second view.
  • step 806 while controlling the first view to move away from the user interface according to the moving direction of the first view, the first video is controlled to move relative to the first view according to the moving direction of the first video.
  • step 807 in response to detecting that the second view is moved to a preset position of the user interface, the moving direction of the first video is adjusted, and the moving direction of the first video before adjustment is opposite to the moving direction after adjustment.
  • step 808 the first video is controlled to move away from the user interface according to the adjusted moving direction.
  • step 809 after detecting that the second views are all displayed on the user interface, the second video is displayed.
  • the second video in order to reduce the trouble of manually triggering playback of the second video, the second video may be displayed and played when it is detected that all the second views are displayed on the user interface.
  • the preset position is 50% as an example for illustration.
  • the second view and the first view are moved upward respectively.
  • the first video moves downward, and the moving speed of the first view is the same as that of the first video.
  • the example diagram of the user interface including the first view and the second view as shown in the b diagram in FIG. 9, can be seen from the b diagram in FIG. obscured by the second view.
  • the occluded area of the video picture of the first video in the first view will gradually increase.
  • the first video shows an example diagram of the user interface after the content is reduced, as shown in the picture c in FIG. 9 .
  • its corresponding user interface is as shown in figure c in FIG. 9 .
  • the first video can be controlled to move upwards to accelerate, for example, the first video can be controlled to quickly leave the user interface at twice the moving speed of the second view, so as to realize the visual effect of fast switching.
  • Figure d and e the example of the first video moving upward and leaving the user interface is shown in Figure d and e in Figure 9. It can be seen from Figure d and e that the first video moves upward, and gradually moves to the position of the first video. bottom.
  • Each view is also a video view implemented by UIView, which is used to carry each video screen delivered by the multimedia resource stream (multimedia resource feed) interface.
  • UIView multimedia resource stream
  • you need to go to the multiplexing pool to get a view The view carries the video image, and sets the masksToBounds property of the Layer of each Cell view to yes to implement the masking effect in each view.
  • the direction of displacement and the animation time of the Cell1 view are the same as those of the Cell2 view, but it is necessary to judge when Cell2 slides to half the height of the screen, and then set the Frame.origin.y property of the ContentView of Cell1, and the animation animation is the same as that of Cell2. same.
  • the moving speed of the above ContentView is twice that of Cell2, so that when the ContentView slides to the bottom of the video, the shift animation of the ContentView ends at the same time, and the switching is completed quickly.
  • Fig. 10 is a block diagram of an apparatus for switching multimedia resources according to an exemplary embodiment.
  • the multimedia resource switching device 1 includes a first presentation module 11, a determination module 12 and a first control module 13, wherein:
  • the first display module 11 is configured to display the first multimedia resource through a first view in the user interface.
  • the determining module 12 is configured to receive the multimedia switching operation implemented in the user interface, and determine the second multimedia resource to be switched.
  • the second multimedia resource is displayed through the second view.
  • the first control module 13 is configured to respectively control the first view to move away from the user interface and the second view to move into the user interface according to the operation information of the multimedia switching operation, until the second view completely occupies the user interface and displays the second multimedia resource.
  • the first control module 13 may include:
  • the first control sub-module 131 is configured to control the second view to move into the user interface according to the operation information of the multimedia switching operation.
  • the second control submodule 132 is configured to, in response to detecting that the second view is moved to a preset position of the user interface, control the first view to move away from the user interface according to the operation information of the multimedia switching operation.
  • the moving speed of the first view in the embodiment of the present disclosure is greater than the moving speed of the second view.
  • the second control sub-module 132 may further include:
  • the first obtaining unit 1321 is configured to obtain, according to the preset position, the remaining moving position required by the second view to completely occupy the user interface.
  • the first determining unit 1322 is configured to determine the moving direction of the first view according to the operation information of the multimedia switching operation.
  • the second obtaining unit 1323 is configured to obtain, according to the moving direction of the first view, the moving position required for the first view to leave the user interface, wherein the moving position is greater than the remaining moving position.
  • the second determining unit 1324 is configured to determine the moving speed of the first view according to the moving speed, the moving position and the remaining moving position of the second view.
  • the control unit 1325 is configured to control the first view to move away from the user interface at the moving speed of the first view in the moving direction.
  • the second determining unit 1324 is specifically configured to: determine the movement time of the second view according to the movement speed and the remaining movement position of the second view; according to the movement position and the movement time of the second view , to determine the movement speed of the first view.
  • the first control submodule 131 in response to the multimedia switching operation being a sliding operation, is specifically configured to: determine the sliding direction and sliding distance of the sliding operation according to the operation information of the sliding operation; The moving direction of the second view is determined, and the moving distance of the second view is determined according to the sliding distance; according to the moving direction and the moving distance, the second view is controlled to move into the user interface.
  • the second control submodule 132 in response to the multimedia switching operation being a sliding operation, is specifically configured to: determine the sliding direction of the sliding operation according to the operation information of the sliding operation; determine the first sliding direction according to the sliding direction. a moving direction of a view; and in response to detecting that the second view is moved to a preset position of the user interface, controlling the first view to move away from the user interface according to the moving direction of the first view.
  • the first control module 13 includes:
  • the first determining sub-module 133 is configured to determine the moving direction of the second view and the moving direction of the first view according to the operation information of the multimedia switching operation.
  • the second determining submodule 134 is configured to determine the moving direction of the first multimedia resource according to the moving direction of the first view, wherein the moving directions of the second view and the first view are the same with respect to the user interface, and the first The moving direction of the media resource is opposite to the moving direction of the first view, and the moving speed of the first multimedia resource is the same as the moving speed of the first view.
  • the third control sub-module 135 is configured to control the movement of the second view into the user interface according to the movement direction of the second view.
  • the fourth control submodule 136 is configured to control the first view to move away from the user interface according to the moving direction of the first view, and to control the relative movement of the first multimedia resource relative to the View moves.
  • the apparatus may further include:
  • the adjustment module 14 is configured to adjust the moving direction of the first multimedia resource, the moving direction before adjustment and the adjusted moving direction of the first multimedia resource in response to detecting that the second view is moved to a preset position of the user interface In the opposite direction.
  • the second control module 15 is configured to control the first multimedia resource to move away from the user interface according to the adjusted moving direction.
  • the device further includes:
  • the third control module 16 is configured to control the first multimedia resource to be in a play state during the process that the first control module controls the first view to move away from the user interface; or, to control the first multimedia resource to be in a pause state.
  • the device further includes:
  • the fourth control module 17 is configured to control the second multimedia resource to be in a play state or a pause state during the process that the first control module controls the second view to move into the user interface.
  • the device further includes:
  • the fifth control module 18 is configured to, in the process of controlling the second view to move into the user interface, in response to detecting that the second multimedia resource is not loaded, control the display of the second multimedia resource on the second view. Previewing the multimedia resource; in response to detecting that the loading of the second multimedia resource is completed, controlling the second multimedia resource to be in a playing state.
  • the device to be switched in the process of displaying the first multimedia resource in the user interface through the first view, after receiving the multimedia switching operation implemented in the user interface, based on the multimedia switching operation, the device to be switched is determined.
  • the second multimedia resource and according to the operation information of the multimedia switching operation, respectively control the first view to move away from the user interface and the second view for displaying the second multimedia resource to move into the user interface until the second view is completely occupied
  • the user interface displays the second multimedia resource, and during the moving process of the second view, at least part of the displayed content of the first multimedia resource is covered at least part of the time.
  • the second multimedia resource covers part of the displayed content of the first multimedia resource for a part of the time, which can avoid the occurrence of a sense of separation due to the direct switching of the replacement view, and realizes the During the switching process, the animation layers are rich, providing a variety of switching effects while achieving smooth switching effects.
  • the embodiments of the present disclosure further provide an electronic device.
  • the electronic device includes: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the instructions, so as to implement the foregoing method for switching multimedia resources.
  • FIG. 14 is a block diagram of an electronic device 200 for display control of an application interface according to an exemplary embodiment. As shown in FIG. 14 , the above electronic device 200 may further include:
  • the memory 210 and the processor 220 are connected to a bus 230 of different components (including the memory 210 and the processor 220).
  • the memory 210 stores a computer program.
  • the processor 220 executes the program, the multimedia resource switching method of the embodiment of the present disclosure is implemented.
  • Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.
  • Electronic device 200 typically includes a variety of electronic device-readable media. These media can be any available media that can be accessed by electronic device 200, including volatile and non-volatile media, removable and non-removable media.
  • Memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and/or cache memory 250 .
  • Server 200 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 260 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 14, commonly referred to as a "hard drive”).
  • a disk drive for reading and writing to removable non-volatile magnetic disks eg "floppy disks"
  • removable non-volatile optical disks eg CD-ROM, DVD-ROM
  • each drive may be connected to bus 230 through one or more data media interfaces.
  • the memory 210 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present disclosure.
  • Program modules 270 generally perform the functions and/or methods in the embodiments described in this disclosure.
  • the electronic device 200 may also communicate with one or more external devices 290 (eg, keyboard, pointing device, display 291, etc.), with one or more devices that enable a user to interact with the electronic device 200, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. Such communication may take place through input/output (I/O) interface 292 . Also, the electronic device 200 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 293 . As shown, network adapter 293 communicates with other modules of electronic device 200 via bus 230 . It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives and data backup storage systems.
  • the processor 220 executes various functional applications and data processing by executing programs stored in the memory 210 .
  • the first multimedia switching operation to be switched is determined based on the multimedia switching operation.
  • Two multimedia resources, and according to the operation information of the multimedia switching operation respectively control the first view to move away from the user interface and the second view for displaying the second multimedia resource to move into the user interface, until the second view completely occupies the user interface
  • the interface displays the second multimedia resource, and during the moving process of the second view, at least part of the displayed content of the first multimedia resource is covered at least part of the time.
  • the second multimedia resource covers part of the displayed content of the first multimedia resource for a part of the time, which can avoid the occurrence of a sense of separation due to the direct switching of the replacement view, and realizes the During the switching process, the animation layers are rich, providing a variety of switching effects while achieving smooth switching effects.
  • the embodiments of the present disclosure further provide a storage medium.
  • the electronic device when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the method for switching multimedia resources as before.
  • the present disclosure also provides a computer program product, when the computer program is executed by the processor of the electronic device, the electronic device can execute the above method for switching multimedia resources.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本公开关于一种多媒体资源切换方法、装置、电子设备及存储介质,涉及计算机技术领域,其中,该方法包括:在用户界面中通过第一视图展示第一多媒体资源,并基于多媒体切换操作,确定待切换的第二多媒体资源,并根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及用于展示第二多媒体资源的第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源。

Description

多媒体资源切换方法及装置
相关申请的交叉引用
本申请基于申请号为202011060017.8、申请日为2020年09月30日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及计算机技术领域,尤其涉及一种多媒体资源切换方法及装置。
背景技术
随着电子设备智能化的普及和互联网技术的发展,通过移动终端等电子设备中的视频类应用来观看视频,已成为人们的日常生活方式。
相关技术中,在用户通过电子设备中的视频类应用(例如短视频类应用)查看视频的过程中,视频类应用程序可根据用户的视频切换操作,将视频直接切换替换,视觉上图像割裂感强,视觉效果不佳。
发明内容
本公开提供一种多媒体资源切换方法及装置。
本公开的技术方案如下:
根据本公开实施例的一些实施例,提供一种多媒体资源切换方法,包括:在用户界面中通过第一视图展示第一多媒体资源;接收实施于所述用户界面的多媒体切换操作,确定待切换的第二多媒体资源;其中,所述第二多媒体资源通过第二视图展示;根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,直至所述第二视图完全占据所述用户界面,展示所述第二多媒体资源;其中,所述第二视图在移动过程中,至少有部分时间遮盖所述第一多媒体资源的至少部分展示内容。
在本公开的一个实施例中,所述根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,包括:根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面;响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面。
在本公开的一个实施例中,所述第一视图的移动速度大于所述第二视图的移动速度。
在本公开的一个实施例中,所述响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面,包括:根据所述预设位置,获取所述第二视图完全占据所述用户界面所需要的剩余移动位置;根据所述多媒体切换操作的操作信息,确定所述第一视图的移动方向;根据所述第一视图的移动方向,获取所述第一视图离开所述用户界面所需要的移动位置,其中,所述移动位置大于所述剩余移动位置;根据所述第二视图的移动速度、所述移动位置和所述剩余移动位置,确定所述第一视图的移动速度;控制所述第一视图在所述移动方向上以所述第一视图的移动速度移动离开所述用户界面。
在本公开的一个实施例中,所述根据所述第二视图的移动速度、所述移动位置和所述剩余移动位置,确定所述第一视图的移动速度,包括:根据所述第二视图的移动速度和所述剩余移动位置,确定所述第二视图的移动时间;根据所述移动位置和所述第二视图的移动时间,确定所述第一视图的移动速度。
在本公开的一个实施例中,响应于所述多媒体切换操作为滑动操作,所述根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面,包括:根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向和滑动距离;根据所述滑动方向确定所述第二视图的移动方向,并根据所述滑动距离确定所述第二视图的移动距离;根据所述移动方向和所述移动距离,控制所述第二视图移动进入所述用户界面。
在本公开的一个实施例中,响应于所述多媒体切换操作为滑动操作,所述响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面,包括:根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向;根据所述滑动方向确定所述第一视图的移动方向;以及响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述第一视图的移动方向,控制所述第一视图移动离开所述用户界面。
在本公开的一个实施例中,所述根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,包括:根据所述多媒体切换操作的操作信息,确定所述第二视图的移动方向、所述第一视图的移动方向;根据所述第一视图的移动方向,确定所述第一多媒体资源的移动方向,其中,所述第二视图和所述第一视图的移动方向相对于所述用户界面相同,所述第一多媒体资源的移动方向相对于所述第一视图的移动方向相反,所述第一多媒体资源的移动速度和所述第一视图的移动速度相同;根据所述第二视图的移动方向控制所述第二视图移动进入所述用户界面;根据所述第一视图的移动方向控制所述第一视图移动离开所述用户界面的同时,根据所述第一多媒体资源的移动方向,控制所述第一多媒体资源相对于所述第一视图移动。
在本公开的一个实施例中,所述方法还包括:响应于检测到所述第二视图被移动到所 述用户界面的预设位置,调整所述第一多媒体资源的移动方向,所述第一多媒体资源调整前的移动方向和调整后的移动方向相反;根据所述调整后的移动方向,控制所述第一多媒体资源移动离开所述用户界面。
在本公开的一个实施例中,在控制所述第一视图移动离开所述用户界面的过程中,所述方法还包括:控制所述第一多媒体资源处于播放状态;或者,控制所述第一多媒体资源处于暂停状态。
在本公开的一个实施例中,在控制所述第二视图移动进入所述用户界面的过程中,所述方法还包括:控制所述第二多媒体资源处于播放状态或者暂停状态。
在本公开的一个实施例中,在控制所述第二视图移动进入所述用户界面的过程中,所述方法还包括:响应于检测到所述第二多媒体资源未加载完成,控制在所述第二视图上展示所述第二多媒体资源的预览多媒体资源;响应于检测到所述第二多媒体资源加载完成,控制所述第二多媒体资源处于播放状态。
根据本公开实施例的一些实施例,提供一种多媒体资源切换装置,包括:第一展示模块,被配置为在用户界面中通过第一视图展示第一多媒体资源;确定模块,被配置为接收实施于所述用户界面的多媒体切换操作,确定待切换的第二多媒体资源;其中,所述第二多媒体资源通过第二视图展示;第一控制模块,被配置为根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,直至所述第二视图完全占据所述用户界面,展示所述第二多媒体资源;其中,所述第二视图在移动过程中,至少有部分时间遮盖所述第一多媒体资源的至少部分展示内容。
在本公开的一个实施例中,所述第一控制模块,包括:第一控制子模块,被配置为根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面;第二控制子模块,被配置为响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面。
在本公开的一个实施例中,所述第一视图的移动速度大于所述第二视图的移动速度。
在本公开的一个实施例中,所述第二控制子模块,包括:第一获取单元,被配置为根据所述预设位置,获取所述第二视图完全占据所述用户界面所需要的剩余移动位置;第一确定单元,被配置为根据所述多媒体切换操作的操作信息,确定所述第一视图的移动方向;第二获取单元,被配置为根据所述第一视图的移动方向,获取所述第一视图离开所述用户界面所需要的移动位置,其中,所述移动位置大于所述剩余移动位置;第二确定单元,被配置为根据所述第二视图的移动速度、所述移动位置和所述剩余移动位置,确定所述第一视图的移动速度;控制单元,被配置为控制所述第一视图在所述移动方向上以所述第一视图的移动速度移动离开所述用户界面。
在本公开的一个实施例中,所述第二确定单元,具体被配置为:根据所述第二视图的移动速度和所述剩余移动位置,确定所述第二视图的移动时间;根据所述移动位置和所述 第二视图的移动时间,确定所述第一视图的移动速度。
在本公开的一个实施例中,响应于所述多媒体切换操作为滑动操作,所述第一控制子模块,具体被配置为:根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向和滑动距离;根据所述滑动方向确定所述第二视图的移动方向,并根据所述滑动距离确定所述第二视图的移动距离;根据所述移动方向和所述移动距离,控制所述第二视图移动进入所述用户界面。
在本公开的一个实施例中,响应于所述多媒体切换操作为滑动操作,所述第二控制子模块,具体被配置为:根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向;根据所述滑动方向确定所述第一视图的移动方向;以及响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述第一视图的移动方向,控制所述第一视图移动离开所述用户界面。
在本公开的一个实施例中,所述第一控制模块,包括:第一确定子模块,被配置为根据所述多媒体切换操作的操作信息,确定所述第二视图的移动方向、所述第一视图的移动方向;第二确定子模块,被配置为根据所述第一视图的移动方向,确定所述第一多媒体资源的移动方向,其中,所述第二视图和所述第一视图的移动方向相对于所述用户界面相同,所述第一多媒体资源的移动方向相对于所述第一视图的移动方向相反,所述第一多媒体资源的移动速度和所述第一视图的移动速度相同;第三控制子模块,被配置为根据所述第二视图的移动方向控制所述第二视图移动进入所述用户界面;第四控制子模块,被配置为根据所述第一视图的移动方向控制所述第一视图移动离开所述用户界面的同时,根据所述第一多媒体资源的移动方向,控制所述第一多媒体资源相对于所述第一视图移动。
在本公开的一个实施例中,所述装置还包括:调整模块,用于响应于检测到所述第二视图被移动到所述用户界面的预设位置,调整所述第一多媒体资源的移动方向,所述第一多媒体资源调整前的移动方向和调整后的移动方向相反;第二控制模块,被配置为根据所述调整后的移动方向,控制所述第一多媒体资源移动离开所述用户界面。
在本公开的一个实施例中,所述装置还包括:第三控制模块,被配置为在所述第一控制模块控制所述第一视图移动离开所述用户界面的过程中,控制所述第一多媒体资源处于播放状态;或者,控制所述第一多媒体资源处于暂停状态。
在本公开的一个实施例中,所述装置还包括:第四控制模块,被配置为在所述第一控制模块控制所述第二视图移动进入所述用户界面的过程中,控制所述第二多媒体资源处于播放状态或者暂停状态。
在本公开的一个实施例中,所述装置还包括:第五控制模块,被配置为在控制所述第二视图移动进入所述用户界面的过程中,响应于检测到所述第二多媒体资源未加载完成,控制在所述第二视图上展示所述第二多媒体资源的预览多媒体资源;响应于检测到所述第二多媒体资源加载完成,控制所述第二多媒体资源处于播放状态。
根据本公开实施例的一些实施例,提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现本公开第一方面实施例提出的多媒体资源切换方法。
根据本公开实施例的一些实施例,提供一种非易失性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行本公开第一方面实施例提出的多媒体资源切换方法。
根据本公开实施例的一些实施例,提供一种计算机程序产品,该计算机程序产品由电子设备的处理器执行时,使得电子设备能够执行本公开第一方面实施例提出的多媒体资源切换方法。
本公开的实施例提供的技术方案:
在用户界面中通过第一视图展示第一多媒体资源的过程中,在接收实施于用户界面的多媒体切换操作后,基于多媒体切换操作,确定待切换的第二多媒体资源,并根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及用于展示第二多媒体资源的第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源,并且,在第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。由此,在多媒体资源切换的过程中,通过第二多媒体资源有部分时间遮盖第一多媒体资源的部分展示内容,可避免直接切换替换视图从而造成换割裂感情况的发生,实现了切换过程中动画层次丰富,提供多样化切换效果的同时,可实现流畅的切换效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是根据一示例性实施例示出的一种多媒体资源切换方法的流程图。
图2是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图3是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图4是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图5是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图6是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图7是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图8是根据一示例性实施例示出的另一种多媒体资源切换方法的流程图。
图9是视频切换过程中部分用户界面的示例图。
图10是根据一示例性实施例示出的一种多媒体资源切换装置的框图。
图11是根据一示例性实施例示出的另一种多媒体资源切换装置的框图。
图12是根据一示例性实施例示出的另一种多媒体资源切换装置的框图。
图13是根据一示例性实施例示出的另一种多媒体资源切换装置的框图。
图14是根据一示例性实施例示出的一种用于应用界面的展示控制的电子设备的框图。
具体实施方式
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种多媒体资源切换方法的流程图。
本公开实施例以该多媒体资源切换方法被配置于多媒体资源切换装置中来举例说明,该多媒体资源切换装置可以由软件和/或硬件的方式实现,该多媒体资源切换装置可以配置在电子设备,以使该电子设备可以执行多媒体资源切换功能。
其中,电子设备可以为任一具有计算能力的设备,例如可以为PC(Personal Computer,个人电脑)、移动终端、服务器等,移动终端例如可以为手机、平板电脑、个人数字助理、穿戴式设备、车载设备等具有各种操作系统、触摸屏和/或显示屏的硬件设备。
如图1所示,多媒体资源切换方法可以包括以下步骤。
在步骤101中,在用户界面中通过第一视图展示第一多媒体资源。
在本公开的实施例中所涉及到的多媒体资源可以包括但不限于图像、动画、视频、音乐短片等,在实际应用过程中,可结合具体业务需求来设置多媒体资源,该实施例对此不作具体限定。
在步骤102中,接收实施于用户界面的多媒体切换操作,确定待切换的第二多媒体资源,其中,第二多媒体资源通过第二视图展示。
在本公开的实施例中,多媒体切换操作是实施于用户界面触发正在展示的第一多媒体资源切换为用户期望播放多媒体资源的交互操作。该多媒体切换操作可以是用户界面可支持的操作类型或者用户的偏好预先设置,例如,在用户界面上设置有用于切换多媒体的控件,可通过触发用户界面上的该控件,以触发多媒体切换操作。又例如,如果上述用户界面可支持滑动操作,可通过对用户界面进行滑动的方式来触发多媒体切换操作,该实施例对多媒体切换操作不作具体限定。
作为一种示例,在多媒体切换操作是通过触发相应控件而实现的情况下,响应于检测 到用于切换到上一个多媒体资源的控件被触发,则确定切换到上一个多媒体资源的第一切换指令被触发,可根据第一切换指令和第一多媒体资源,可获取与第一多媒体资源相邻的上一个多媒体资源,并将所获取到的上一个多媒体资源作为第二多媒体资源。另外,响应于检测到用于切换到下一个多媒体资源的控件被触发,确定切换到下一个多媒体资源的第二切换指令被触发,可根据第二切换指令和第一多媒体资源,可获取与第一多媒体资源相邻的下一个多媒体资源,并将所获取到的下一个多媒体资源作为第二多媒体资源。
作为另一种示例,响应于上述多媒体切换操作为滑动操作,可根据滑动操作的操作信息,确定滑动方向,并根据滑动方向和第一多媒体资源,确定第二多媒体资源。例如,响应于滑动方向为向上方向,可获取与第一多媒体资源相邻的上一个多媒体资源,并将所获取到的上一个多媒体资源作为第二多媒体资源。响应于滑动方向为向下方向下,可获取与第一多媒体资源相邻的下一个多媒体资源,并将所获取到的下一个多媒体资源作为第二多媒体资源。又例如,响应于滑动方向为向左方向,可获取与第一多媒体资源相邻的上一个多媒体资源,并将所获取到的上一个多媒体资源作为第二多媒体资源。响应于滑动方向为向右方向,可获取与第一多媒体资源相邻的下一个多媒体资源,并将所获取到的下一个多媒体资源作为第二多媒体资源。
作为另一种示例,响应于用户界面上还显示包含多媒体资源标识的资源列表,响应于检测到资源列表中的任意一个多媒体资源标识被触发,可确定接收到针对用户界面的多媒体切换操作,此时,可获取被触发的多媒体资源标识,并获取与该多媒体资源标识对应的多媒体资源,并将所获取到的多媒体资源作为第二多媒体资源。
在步骤103中,根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源。
在本公开的一些实施例中,响应于上述多媒体切换操作为滑动操作,滑动操作的操作信息可以包括滑动方向和滑动速度,上述步骤103的一种可能的实现方式可以为:可根据滑动方向,确定第一视图和第二视图的移动方向,控制第二视图在第二视图的移动方向上,以滑动速度移动进入用户界面,并在检测到第二视图移动了预设时间后,控制第一视图在第一视图的移动方向上,以第二移动速度离开移动用户界面,其中,第二移动速度大于滑动速度,上述第一视图和第二视图的移动方向相同。
在一些实施例中,上述滑动方向可以与上述第一视图和第二视图的移动方向相同,也可以相反,在该实施例对此不作具体限定。
其中,上述预设时间可以是多媒体资源切换装置中预先设置的时间,也可以是基于滑动速度而确定的,例如,如果检测到滑动速度超过预设速度,则将上述预设时间设置为第一时间,如果检测到滑动速度小于预设速度,则将上述预设时间设置为第二时间,其中,第一时间小于第二时间。
可以理解的是,在一些实施例中,上述滑动操作可以为上下滑动操作。在另一些实施例中,上述滑动操作可以为左右滑动操作,即,可通过左右滑动的方式来实现多媒体资源的切换。
在本公开的另一些实施例中,在上述多媒体切换操作是通过触发控件来实现的,上述步骤103的一种可能的实现方式为:可根据被触发控件,确定上述多媒体切换操作的操作信息,其中,操作信息包括方向信息。然后,可控制第二视图在方向信息上,以第一移动速度移动进入用户界面,并在检测到第二视图移动了预设时间后,控制第一视图在方向信息上,以第二移动速度离开移动用户界面,其中,第二移动速度大于第一移动速度。由此,避免了直接切换替换视图,从而实现了流畅的切换效果。
可以理解的是,响应于检测到切换到上一个多媒体资源的控件被触发,上述方向信息为第一方向信息。响应于检测到切换到下一个多媒体资源的控件被触发,上述方向信息为第二方向信息,其中,第一方向信息与第二方向信息为相反的方向,例如,第一方向信息为向上方向,第二方向信息可以为向上方向。又例如,第一方向信息为向左方向,第二方向信息可以为向右方向。
其中,第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。
在本公开的实施例中,为了在多媒体切换的过程中可以继续观看第一多媒体资源,在本公开的一个实施例中,在控制第一视图移动离开用户界面的过程中,可控制第一多媒体资源处于播放状态。
在一些实施例中,在控制第一视图移动离开用户界面的过程中,还可以控制第一多媒体资源处于暂停状态。由此,可以减少多媒体切换的过程中继续多媒体资源对用户造成影响。
在一些实施例中,为了提高智能性,可根据实际业务需求,预先设置是否在切换多媒体资源的过程中是否播放第一多媒体资源。
同样地,对于第二视图而言,为了使得在切换的过程中可观看到第二多媒体资源,在控制第二视图移动进入用户界面的过程中,可控制第二多媒体资源处于播放状态。
另外,在一些实施例中,在控制第二视图移动进入用户界面的过程中,可控制第二多媒体资源处于暂停状态。
在一些实施例中,通常待切换的第二多媒体资源是需要加载的,而加载多媒体资源是需要一定时间,为了提供更好的切换体验,在控制第二视图移动进入用户界面的过程中,本公开的实施例中可在检测到第二多媒体资源未加载完成的情况下,控制在第二视图上展示第二多媒体资源的预览多媒体资源。响应于检测到第二多媒体资源加载完成,控制第二多媒体资源处于播放状态。
其中,预览多媒体资源可以为第二多媒体资源的部分资源片段,例如,上述多媒体资 源为视频,预览多媒体资源可以为视频的视频封面。
在一些实施例中,上述第一视图和第二视图之间可以是相接的,也可以是间隔一定距离的,该实施例对第一视图和第二视图是否相接不作具体限定,在实际实现时,可根据实际业务需求进行设置。
本公开实施例的多媒体资源切换方法,在用户界面中通过第一视图展示第一多媒体资源的过程中,在接收实施于用户界面的多媒体切换操作后,基于多媒体切换操作,确定待切换的第二多媒体资源,并根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及用于展示第二多媒体资源的第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源,并且,在第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。由此,在多媒体资源切换的过程中,通过第二多媒体资源有部分时间遮盖第一多媒体资源的部分展示内容,可避免直接切换替换视图从而造成换割裂感情况的发生,实现了切换过程中动画层次丰富,提供多样化切换效果的同时,可实现流畅的切换效果。
基于上述实施例的基础上,在不同的应用场景中,上述根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及第二视图移动进入用户界面可通过多种方式实现。下面结合图2对根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及第二视图移动进入用户界面的一种可能实现方式进行描述,如图2所示,可以包括:
在步骤201中,根据多媒体切换操作的操作信息,控制第二视图移动进入用户界面。
在步骤202中,响应于检测到第二视图被移动到用户界面的预设位置,根据多媒体切换操作的操作信息,控制第一视图移动离开用户界面。
其中,预设位置是根据实际业务需求预先设置的位置,例如,预设位置可以为用户界面的40%、50%、6O%或者70%等。
在本公开的实施例中,结合多媒体切换操作的操作信息,先控制第二视图移动进入用户界面,并响应于检测到第二视图被移动到用户界面的预设位置,结合多媒体切换操作的操作信息,再控制第一视图移动离开用户界面。由此,可以丰富多媒体资源切换过程中,动画层次的丰富性,实现更为流畅的切换视觉,进一步提高了多媒体资源的切换效果。
基于上述实施例的基础上,在本公开的一个实施例中,为了实现快速切换的视觉效果本公开的实施例中的第一视图的移动速度大于第二视图的移动速度。
在本公开的一个实施例中,为了可以对第一视图和第二视图的移动速度进行准确控制,上述响应于检测到第二视图被移动到用户界面的预设位置,根据多媒体切换操作的操作信息,控制第一视图移动离开用户界面的一种可能的方式,如图3所示,可以包括:
在步骤301中,根据预设位置,获取第二视图完全占据用户界面所需要的剩余移动位置。
在步骤302中,根据多媒体切换操作的操作信息,确定第一视图的移动方向。
在步骤303中,根据第一视图的移动方向,获取第一视图离开用户界面所需要的移动位置,其中,移动位置大于剩余移动位置。
在步骤304中,根据第二视图的移动速度、移动位置和剩余移动位置,确定第一视图的移动速度。
其中,可以理解的是,在不同的应用场景中,上述根据第二视图的移动速度、移动位置和剩余移动位置,确定第一视图的移动速度实现方式不同,举例说明如下:
作为一种可能实现方式的示例,根据第二视图的移动速度和剩余移动位置,确定第二视图的移动时间;根据移动位置和第二视图的移动时间,确定第一视图的移动速度。
作为另一种可能实现方式的示例,可将根据第二视图的移动速度、移动位置和剩余移动位置输入到预设的计算模型中,以通过该计算模型输出的结果,来确定第一视图的移动速度。
其中,计算模型中计算第一视图的移动速度的公式为:
Figure PCTCN2021105539-appb-000001
其中,上述公式中的V 1表示第一视图的移动速度,S 1表示第一视图所需要的移动位置,V 2表示第二视图的移动速度,S 2表示第二视图的剩余移动位置。
在步骤305中,控制第一视图在移动方向上以第一视图的移动速度移动离开用户界面。
在本公开的一个实施例中,响应于多媒体切换操作为滑动操作,为了可以获取更好的切换效果,可结合滑动方向以及滑动速度对第二视图移动进入用户界面进行控制,上述根据多媒体切换操作的操作信息,控制第二视图移动进入用户界面的一种可能的实现方式,如图4所示,可以包括:
在步骤401中,根据滑动操作的操作信息,确定滑动操作的滑动方向和滑动距离。
在步骤402中,根据滑动方向确定第二视图的移动方向,并根据滑动距离确定第二视图的移动距离。
在步骤403中,根据移动方向和移动距离,控制第二视图移动进入用户界面。
本公开的实施例中,结合滑动操作的操作信息,确定滑动操作的滑动方向以及滑动速度,并结合滑动方向以及滑动速度对第二视图移动进入用户界面进行准确控制,从而使得第二视图的移动可以随着滑动方向和滑动速度而进行,方便了通过滑动操作,对第二视图的移动进行控制,丰富了多媒体切换的效果。
在本公开的一个实施例中,响应于多媒体切换操作为滑动操作,在检测到第二视图被移动到用户界面的预设位置的情况下,根据多媒体切换操作的操作信息,控制第一视图移动离开用户界面的一种可能的实现方式,如图5所示,可以包括:
在步骤501中,根据滑动操作的操作信息,确定滑动操作的滑动方向。
在步骤502中,根据滑动方向确定第一视图的移动方向。
在一些实施例中,第一视图的移动方向可以与滑动方向相同,也可以不同,该实施例对此不作具体限定。
例如,响应于滑动方向为向上方向,第二视图的移动方向可以为向上方向。例如,响应于滑动方向为向上方向,第二视图的移动方向可以为向下方向。又例如,响应于滑动方向为向上方向,第二视图的移动方向可以为向左方向。又例如,响应于滑动方向为向上方向,第二视图的移动方向可以为向右方向。
在步骤503中,响应检测到第二视图被移动到用户界面的预设位置,根据第一视图的移动方向,控制第一视图移动离开用户界面。
在一些实施例中,第一视图的移动速度和第二视图的移动速度可以相同,也可以不同。
在一些实施例中,为了实现快速切换的效果,上述第一视图的移动速度可以大于第二视图的移动速度。
本公开的实施例中,在控制第一视图移动离开用户界面的过程中,结合滑动操作的滑动方向,对第一视图的移动方向进行控制,从而在切换的过程中,实现了对第一视图的控制,丰富了多媒体切换的效果。
在本公开的一个实施例中,下面结合图6对根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及第二视图移动进入用户界面的另一种可能实现方式进行描述。如图6所示,可以包括:
在步骤601中,根据多媒体切换操作的操作信息,确定第二视图的移动方向、第一视图的移动方向。
作为一种示例性的实现方式,响应于上述多媒体切换操作为滑动操作,可根据滑动操作的操作信息,确定滑动操作的滑动方向,并根据滑动方向,确定第二视图和第一视图的移动方向。
其中,上述第一视图和第二视图的移动方向可以与滑动方向相同,也可以相反。
作为另一种示例性的实现方式,在上述多媒体切换操作是通过触发控件来实现时,可根据被触发控件,确定上述多媒体切换操作的操作信息,其中,操作信息包括方向信息,然后,根据方向信息,确定第一视图和第二视图的移动方向。
其中,第一视图和第二视图的移动方向可以上述方向信息相同,也可以是不相同的。
可以理解的是,在检测到切换到上一个多媒体资源的控件被触发的情况下,上述方向信息为第一方向信息。响应于检测到切换到下一个多媒体资源的控件被触发,上述方向信息为第二方向信息,其中,第一方向信息与第二方向信息为相反的方向,例如,第一方向信息为向上方向,第二方向信息可以为向上方向,又例如,第一方向信息为向左方向,第二方向信息可以为向右方向。
在步骤602中,根据第一视图的移动方向,确定第一多媒体资源的移动方向,其中,第二视图和第一视图的移动方向相对于用户界面相同,第一多媒体资源的移动方向相对于 第一视图的移动方向相反,第一多媒体资源的移动速度和第一视图的移动速度相同。
在步骤603中,根据第二视图的移动方向控制第二视图移动进入用户界面。
在步骤604中,根据第一视图的移动方向控制第一视图移动离开用户界面的同时,根据第一多媒体资源的移动方向,控制第一多媒体资源相对于第一视图移动。
在本公开的实施例中,结合多媒体切换操作的操作信息,确定第一视图和第二视图的移动方向,并结合第二视图的移动方向,确定第一多媒体资源的移动方向,并根据第二视图的移动方向控制第二视图移动进入用户界面,以及根据第一视图的移动方向控制第一视图移动离开用户界面的同时,根据第一多媒体资源的移动方向,控制第一多媒体资源相对于第一视图移动。由此,丰富了多媒体资源切换过程中的动画效果,避免了直接多媒体切换替换造成切换割裂感情况的发生,提高了流畅的多媒体切换效果。
在本公开的一个实施例中,为了进一步提高多媒体切换过程中的视觉效果,基于上述图6所示的实施例的基础上,如图7所示,该方法可以包括:
在步骤701中,根据多媒体切换操作的操作信息,确定第二视图的移动方向、第一视图的移动方向。
在步骤702中,根据第一视图的移动方向,确定第一多媒体资源的移动方向,其中,第二视图和第一视图的移动方向相对于用户界面相同,第一多媒体资源的移动方向相对于第一视图的移动方向相反,第一多媒体资源的移动速度和第一视图的移动速度相同。
在步骤703中,根据第二视图的移动方向控制第二视图移动进入用户界面。
在步骤704中,根据第一视图的移动方向控制第一视图移动离开用户界面的同时,根据第一多媒体资源的移动方向,控制第一多媒体资源相对于第一视图移动。
其中,需要说明的是,关于上述步骤701至步骤704的具体描述,可参见上述实施例对步骤601至步骤604的描述,此处不再赘述。
在步骤705中,响应于检测到第二视图被移动到用户界面的预设位置下,调整第一多媒体资源的移动方向,第一多媒体资源调整前的移动方向和调整后的移动方向相反。
在步骤706中,根据调整后的移动方向,控制第一多媒体资源移动离开用户界面。
在本公开的一个实施例中,为了实现快速切换的视觉效果,在第一多媒体资源的移动方向调整后,可对第一多媒体资源的移动速度进行调整,从而使得调整后的移动速度大于第二多媒体资源的移动速度。
作为一种示例性的实施方式,可获取第一多媒体移动离开用户界面所需要的移动位置,并根据预设位置,获取第二视图完全占据用户界面所需要的剩余移动位置,然后,根据第二视图的移动速度和剩余移动位置,确定第二视图的移动时间;根据移动位置和第二视图的移动时间,确定第一多媒体资源的移动速度。
其中,可以理解的是,在检测到第二视图被移动到用户界面的预设位置后,上述第一视图和第二视图的移动方式没有改变,继续以上述移动方式进行移动,直至第二视图全部 占据用户界面。
在本公开的实施例中,在检测到第二视图未被移动到用户界面的预设位置之前,根据多媒体切换操作的操作信息,分别控制第二视图移动进入用户界面和第一视图移动离开用户界面,在控制第一视图移动离开用户界面的同时,控制第一多媒体资源相对于第一视图移动,第一多媒体资源的移动方向相对于第一视图的移动方向相反,第一多媒体资源的移动速度和第一视图的移动速度相同,以及响应于检测到第二视图被移动到用户界面的预设位置,调整第一多媒体资源的移动方向,第一多媒体资源调整前的移动方向和调整后的移动方向相反,在继续移动第一视图和第二视图的过程中,根据调整后的移动方向,控制第一多媒体资源移动离开用户界面。由此,进一步丰富了多媒体切换过程中的动画效果,丰富了多媒体切换效果,可提高多媒体切换的用户体验度。
为了使得本领域的技术人员可以清楚地了解本公开,下面以多媒体为视频,多媒体切操作为向上滑动操作为例,并结合图8以及图9对该实施例的多媒体资源切换方法进行进一步描述,如图8所示,该多媒体资源切换方法可以包括:
在步骤801中,在用户界面中通过第一视图展示第一视频。
在本公开的一个实施例中,为了可获得沉浸式的体验,上述用户界面上可以仅包括上述第一视图,即,第一视图的尺寸信息与用户界面的尺寸信息相同。也就是说,在电子设备中以全屏的形式显示第一视图。例如,第一视频为第一视频,其中,包含第一视频的用户界面的示例图,如图9中的a图所示。
在步骤802中,接收实施于用户界面的向上滑动操作,确定待切换的第二视频。
其中,第二视频通过第二视图展示。
在本公开的一个实施例中,可根据向上滑动操作和第一视频,获取与第一视频相邻的上一个视频,并将所获取到的上一个视频作为第二视频。
在步骤803中,根据向上滑动操作的操作信息,确定第二视图的移动方向、第一视图的移动方向。
在步骤804中,根据第一视图的移动方向,确定第一视频的移动方向,其中,第二视图和第一视图的移动方向相对于用户界面相同,第一视频的移动方向相对于第一视图的移动方向相反,第一视频的移动速度和第一视图的移动速度相同。
在步骤805中,根据第二视图的移动方向控制第二视图移动进入用户界面。
在步骤806中,根据第一视图的移动方向控制第一视图移动离开用户界面的同时,根据第一视频的移动方向,控制第一视频相对于第一视图移动。
在步骤807中,响应于检测到第二视图被移动到用户界面的预设位置,调整第一视频的移动方向,第一视频调整前的移动方向和调整后的移动方向相反。
在步骤808中,根据调整后的移动方向,控制第一视频移动离开用户界面。
在步骤809中,在检测到第二视图全部显示在用户界面上,展示第二视频。
在本公开的一个实施例中,为了减少手动触发播放第二视频的麻烦,在检测到第二视图全部显示在用户界面上,可展示并播放第二视频。
其中,第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。
可以理解的是,在根据调整后的移动方向,控制第一多媒体资源移动离开用户界面的过程中,上述第一视图和第二视图是继续移动的,直至第二视图全部显示在用户界面上。
为了使得本领域的技术人员可以清楚了解本公开,下面结合图9进行一步描述,其中,本公开的实施例中以预设位置为50%为例进行示意。根据向上滑动操作,分别向上移动第二视图和第一视图,另外,在第一视图向上移动的过程,第一视频向下移动,并且第一视图的移动速度和第一视频的移动速度相同。其中,包含第一视图和第二视图的用户界面的示例图,如图9中的b图所示,通过图9中的b图,可以看出,第一视图中第一视频的部分视频画面被第二视图遮挡住。响应于继续向上滑动,第一视图中第一视频的视频画面被遮挡的面积将逐渐增大。也就是说,在用户界面上第一视频所展示的内容逐渐变小。其中,第一视频展示内容变小后的用户界面的示例图,如图9中的c图所示。响应于检测到第二视图被移动到用户界面的一半,其对应的用户界面,如图9中的c图所示。此时,可控制第一视频向上加速移动,例如,控制第一视频以2倍第二视图的移动速度快速离开用户界面,实现快速切换的视觉效果。其中,第一视频向上移动离开用户界面的示例,如图9中的d图和e图所示,通过d图和e图可以看出,第一视频向上移动,并逐渐移动到第一视频的底部。
为了使得本领域的技术人员可以清楚地了解本公开,下面结合电子设备以操作系统为IOS系统,且多媒体资源为视频,以滑动方向为向上为例,对该实施例的具体技术方案进行进一步描述。
1、用iOS系统UIKit框架里提供的用户界面视图UIView组件实现一个内容视图ContentView用来承载整个视频滑动界面,界面里面会有多个视图。
2、每个视图也是用UIView实现的视频视图,用来承载多媒体资源流(多媒体资源feed)接口下发的每一个视频画面,在应用进到首页的时候,根据服务端下发的多媒体资源流的数量来初始用户界面可展示的视图的数量,并且创建一个视图的复用池,当一个视图需要展示的时候(视频画面需要滑到屏幕里面的时候),需要去复用池里去获取一个视图承载视频画面,并且设置每个Cell视图的Layer的masksToBounds属性为yes,实现每个视图内的遮罩效果。
3、在ContentView上添加UIPanGestureRecognizer用来识别用户的滑动手势,当用户开始滑动屏幕的时候,需要监听UIGestureRecognizerStateBegin事件来计算出用户实际在屏幕滑动的距离Offset。
4、获取在当前屏幕上展示的第一视图cell1和第二视图cell2,把上面步骤中计算出 来的Offset赋值给Cell1和Cell2的Frame.origin.y属性,实现两个Cell视图的同步移动,但是同时设置Cell1里面的ContentView的Frame.origin.y属性,实现里面内容反向同距离移动,实现视频画面静止不动的效果。当Cell2上移到屏幕高度的一半的时候,将Offset值乘以2并把计算出来的值设置给Cell1的ContentView的Frame.origin.y属性,实现Cell1画面快速画出的切换效果,Cell2的移动效果保持不变。
5、响应于用户快速在屏幕上向上滑动,可以监听UIGestureRecognizerStateEnd事件来获取手指滑动方向的滑动速度Velocity,然后再计算出将要滑动进屏幕的Cell2视图顶部距离屏幕顶部的距离distance,用distance除以前面的Velocity得出需要滚动的时间time,然后将time与视频切换时间(例如0.3秒)进行比较,并选择两者中的最大值,作为移动动画时间animationTime,然后用系统UIView的animation动画进行Cell2的位移动画。同理Cell1视图位移的方向和位移的动画时间和Cell2视图相同,只是需要判断当Cell2滑动到屏幕高度一半的时候,再去设置Cell1的ContentView的Frame.origin.y属性,并且animation动画时候与Cell2相同。
其中,上述ContentView的移动速度是Cell2的移动速度的两倍,从而使得ContentView滑动结束至视频底部的同时,ContentView的移位动画同时结束,快速完成切换。
其中,可以理解的是,响应于用户在屏幕上向下滑动,Cell1和Cell2移动的方向和视觉效果与上面叙述过程相反,此处不再赘述。
其中,需要说明的是本示例中是以Cell1和Cell2,这两个视图是相接的为例进行描述的。
图10是根据一示例性实施例示出的一种多媒体资源切换装置框图。
如图10所示,该多媒体资源切换装置1包括第一展示模块11、确定模块12和第一控制模块13,其中:
第一展示模块11,被配置为在用户界面中通过第一视图展示第一多媒体资源。
确定模块12,被配置为接收实施于用户界面的多媒体切换操作,确定待切换的第二多媒体资源。
其中,第二多媒体资源通过第二视图展示。
第一控制模块13,被配置为根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源。
其中,第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。
在本公开的一个实施例中,为了实现快速切换的视觉效果,在图10所示的实施例的基础上,如图11所示,该第一控制模块13,可以包括:
第一控制子模块131,被配置为根据多媒体切换操作的操作信息,控制第二视图移动 进入用户界面。
第二控制子模块132,被配置为响应于检测到第二视图被移动到用户界面的预设位置,根据多媒体切换操作的操作信息,控制第一视图移动离开用户界面。
在本公开的一个实施例中,为了实现快速切换的视觉效果,本公开的实施例中的第一视图的移动速度大于第二视图的移动速度。
在本公开的一个实施例中,如图11所示,第二控制子模块132可以进一步包括:
第一获取单元1321,被配置为根据预设位置,获取第二视图完全占据用户界面所需要的剩余移动位置。
第一确定单元1322,被配置为根据多媒体切换操作的操作信息,确定第一视图的移动方向。
第二获取单元1323,被配置为根据第一视图的移动方向,获取第一视图离开用户界面所需要的移动位置,其中,移动位置大于剩余移动位置。
第二确定单元1324,被配置为根据第二视图的移动速度、移动位置和剩余移动位置,确定第一视图的移动速度。
控制单元1325,被配置为控制第一视图在移动方向上以第一视图的移动速度移动离开用户界面。
在本公开的一个实施例中,第二确定单元1324,具体被配置为:根据第二视图的移动速度和剩余移动位置,确定第二视图的移动时间;根据移动位置和第二视图的移动时间,确定第一视图的移动速度。
在本公开的一个实施例中,响应于多媒体切换操作为滑动操作,第一控制子模块131,具体被配置为:根据滑动操作的操作信息,确定滑动操作的滑动方向和滑动距离;根据滑动方向确定第二视图的移动方向,并根据滑动距离确定第二视图的移动距离;根据移动方向和移动距离,控制第二视图移动进入用户界面。
在本公开的一个实施例中,响应于在多媒体切换操作为滑动操作,第二控制子模块132,具体被配置为:根据滑动操作的操作信息,确定滑动操作的滑动方向;根据滑动方向确定第一视图的移动方向;以及响应于检测到第二视图被移动到用户界面的预设位置,根据第一视图的移动方向,控制第一视图移动离开用户界面。
在本公开的一个实施例中,在图10所示的装置实施例的基础上,如图12所示,该第一控制模块13,包括:
第一确定子模块133,被配置为根据多媒体切换操作的操作信息,确定第二视图的移动方向、第一视图的移动方向。
第二确定子模块134,被配置为根据第一视图的移动方向,确定第一多媒体资源的移动方向,其中,第二视图和第一视图的移动方向相对于用户界面相同,第一多媒体资源的移动方向相对于第一视图的移动方向相反,第一多媒体资源的移动速度和第一视图的移动 速度相同。
第三控制子模块135,被配置为根据第二视图的移动方向控制第二视图移动进入用户界面。
第四控制子模块136,被配置为根据第一视图的移动方向控制第一视图移动离开用户界面的同时,根据第一多媒体资源的移动方向,控制第一多媒体资源相对于第一视图移动。
在本公开的一个实施例中,如图12所示,该装置还可以包括:
调整模块14,用于响应于检测到第二视图被移动到用户界面的预设位置,调整第一多媒体资源的移动方向,第一多媒体资源调整前的移动方向和调整后的移动方向相反。
第二控制模块15,被配置为根据调整后的移动方向,控制第一多媒体资源移动离开用户界面。
在本公开的一个实施例中,如图12所示,该装置还包括:
第三控制模块16,被配置为在第一控制模块控制第一视图移动离开用户界面的过程中,控制第一多媒体资源处于播放状态;或者,控制第一多媒体资源处于暂停状态。
在本公开的一个实施例中,如图12所示,该装置还包括:
第四控制模块17,被配置为在第一控制模块控制第二视图移动进入用户界面的过程中,控制第二多媒体资源处于播放状态或者暂停状态。
在本公开的一个实施例中,如图13所示,该装置还包括:
第五控制模块18,被配置为在控制第二视图移动进入用户界面的过程中,响应于检测到第二多媒体资源未加载完成,控制在第二视图上展示第二多媒体资源的预览多媒体资源;响应于检测到第二多媒体资源加载完成,控制第二多媒体资源处于播放状态。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本公开实施例的多媒体资源切换装置,在用户界面中通过第一视图展示第一多媒体资源的过程中,在接收实施于用户界面的多媒体切换操作后,基于多媒体切换操作,确定待切换的第二多媒体资源,并根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及用于展示第二多媒体资源的第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源,并且,在第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。由此,在多媒体资源切换的过程中,通过第二多媒体资源有部分时间遮盖第一多媒体资源的部分展示内容,可避免直接切换替换视图从而造成换割裂感情况的发生,实现了切换过程中动画层次丰富,提供多样化切换效果的同时,可实现流畅的切换效果。
为了实现上述实施例,本公开实施例还提出了一种电子设备。其中,电子设备包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令,以实现如前的多媒体资源切换方法。
作为一种示例,图14是根据一示例性实施例示出的一种用于应用界面的展示控制的电子设备200的框图,如图14所示,上述电子设备200,还可以包括:
存储器210及处理器220,连接不同组件(包括存储器210和处理器220)的总线230,存储器210存储有计算机程序,当处理器220执行程序时实现本公开实施例的多媒体资源切换方法。
总线230表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。
电子设备200典型地包括多种电子设备可读介质。这些介质可以是任何能够被电子设备200访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
存储器210还可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)240和/或高速缓存存储器250。服务器200可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统260可以用于读写不可移动的、非易失性磁介质(图14未显示,通常称为“硬盘驱动器”)。尽管图14中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线230相连。存储器210可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。
具有一组(至少一个)程序模块270的程序/实用工具280,可以存储在例如存储器210中,这样的程序模块270包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块270通常执行本公开所描述的实施例中的功能和/或方法。
电子设备200也可以与一个或多个外部设备290(例如键盘、指向设备、显示器291等)通信,还可与一个或者多个使得用户能与该电子设备200交互的设备通信,和/或与使得该电子设备200能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口292进行。并且,电子设备200还可以通过网络适配器293与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器293通过总线230与电子设备200的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理器220通过运行存储在存储器210中的程序,从而执行各种功能应用以及数据处理。
需要说明的是,本公开的实施例的电子设备的实施过程和技术原理参见前述对本公开实施例的多媒体资源切换方法的解释说明,此处不再赘述。
本公开实施例提供的电子设备,在用户界面中通过第一视图展示第一多媒体资源的过程中,在接收实施于用户界面的多媒体切换操作后,基于多媒体切换操作,确定待切换的第二多媒体资源,并根据多媒体切换操作的操作信息,分别控制第一视图移动离开用户界面以及用于展示第二多媒体资源的第二视图移动进入用户界面,直至第二视图完全占据用户界面,展示第二多媒体资源,并且,在第二视图在移动过程中,至少有部分时间遮盖第一多媒体资源的至少部分展示内容。由此,在多媒体资源切换的过程中,通过第二多媒体资源有部分时间遮盖第一多媒体资源的部分展示内容,可避免直接切换替换视图从而造成换割裂感情况的发生,实现了切换过程中动画层次丰富,提供多样化切换效果的同时,可实现流畅的切换效果。
为了实现上述实施例,本公开实施例还提出了一种存储介质。
其中,当存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如前的多媒体资源切换方法。
为了实现上述实施例,本公开还提供一种计算机程序产品,该计算机程序由电子设备的处理器执行时,使得电子设备能够执行如前的多媒体资源切换方法。
本公开所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (37)

  1. 一种多媒体资源切换方法,其中,所述方法包括:
    在用户界面中通过第一视图展示第一多媒体资源;
    接收实施于所述用户界面的多媒体切换操作,确定待切换的第二多媒体资源;
    其中,所述第二多媒体资源通过第二视图展示;
    根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,直至所述第二视图完全占据所述用户界面,展示所述第二多媒体资源;
    其中,所述第二视图在移动过程中,至少有部分时间遮盖所述第一多媒体资源的至少部分展示内容。
  2. 如权利要求1所述的方法,其中,所述根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,包括:
    根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面;
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面。
  3. 如权利要求2所述的方法,其中,所述第一视图的移动速度大于所述第二视图的移动速度。
  4. 如权利要求3所述的方法,其中,所述响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面,包括:
    根据所述预设位置,获取所述第二视图完全占据所述用户界面所需要的剩余移动位置;
    根据所述多媒体切换操作的操作信息,确定所述第一视图的移动方向;
    根据所述第一视图的移动方向,获取所述第一视图离开所述用户界面所需要的移动位置,其中,所述移动位置大于所述剩余移动位置;
    根据所述第二视图的移动速度、所述移动位置和所述剩余移动位置,确定所述第一视图的移动速度;
    控制所述第一视图在所述移动方向上以所述第一视图的移动速度移动离开所述用户界面。
  5. 如权利要求4所述的方法,其中,所述根据所述第二视图的移动速度、所述移动位 置和所述剩余移动位置,确定所述第一视图的移动速度,包括:
    根据所述第二视图的移动速度和所述剩余移动位置,确定所述第二视图的移动时间;
    根据所述移动位置和所述第二视图的移动时间,确定所述第一视图的移动速度。
  6. 如权利要求2所述的方法,其中,响应于所述多媒体切换操作为滑动操作,所述根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面,包括:
    根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向和滑动距离;
    根据所述滑动方向确定所述第二视图的移动方向,并根据所述滑动距离确定所述第二视图的移动距离;
    根据所述移动方向和所述移动距离,控制所述第二视图移动进入所述用户界面。
  7. 如权利要求2所述的方法,其中,响应于所述多媒体切换操作为滑动操作,所述响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面,包括:
    根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向;
    根据所述滑动方向确定所述第一视图的移动方向;以及
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述第一视图的移动方向,控制所述第一视图移动离开所述用户界面。
  8. 如权利要求1所述的方法,其中,所述根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,包括:
    根据所述多媒体切换操作的操作信息,确定所述第二视图的移动方向、所述第一视图的移动方向;
    根据所述第一视图的移动方向,确定所述第一多媒体资源的移动方向,其中,所述第二视图和所述第一视图的移动方向相对于所述用户界面相同,所述第一多媒体资源的移动方向相对于所述第一视图的移动方向相反,所述第一多媒体资源的移动速度和所述第一视图的移动速度相同;
    根据所述第二视图的移动方向控制所述第二视图移动进入所述用户界面;
    根据所述第一视图的移动方向控制所述第一视图移动离开所述用户界面的同时,根据所述第一多媒体资源的移动方向,控制所述第一多媒体资源相对于所述第一视图移动。
  9. 如权利要求8所述的方法,其中,所述方法还包括:
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,调整所述第一多媒体资源的移动方向,所述第一多媒体资源调整前的移动方向和调整后的移动方向相反;
    根据所述调整后的移动方向,控制所述第一多媒体资源移动离开所述用户界面。
  10. 如权利要求1所述的方法,其中,在控制所述第一视图移动离开所述用户界面的过程中,所述方法还包括:
    控制所述第一多媒体资源处于播放状态;
    或者,控制所述第一多媒体资源处于暂停状态。
  11. 如权利要求1所述的方法,其中,在控制所述第二视图移动进入所述用户界面的过程中,所述方法还包括:
    控制所述第二多媒体资源处于播放状态或者暂停状态。
  12. 如权利要求1所述的方法,其中,在控制所述第二视图移动进入所述用户界面的过程中,所述方法还包括:
    响应于检测到所述第二多媒体资源未加载完成,控制在所述第二视图上展示所述第二多媒体资源的预览多媒体资源;
    响应于检测到所述第二多媒体资源加载完成,控制所述第二多媒体资源处于播放状态。
  13. 一种多媒体资源切换装置,其中,所述装置包括:
    第一展示模块,被配置为在用户界面中通过第一视图展示第一多媒体资源;
    确定模块,被配置为接收实施于所述用户界面的多媒体切换操作,确定待切换的第二多媒体资源;
    其中,所述第二多媒体资源通过第二视图展示;
    第一控制模块,被配置为根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,直至所述第二视图完全占据所述用户界面,展示所述第二多媒体资源;
    其中,所述第二视图在移动过程中,至少有部分时间遮盖所述第一多媒体资源的至少部分展示内容。
  14. 如权利要求13所述的装置,其中,所述第一控制模块,包括:
    第一控制子模块,被配置为根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面;
    第二控制子模块,被配置为响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面。
  15. 如权利要求14所述的装置,其中,所述第一视图的移动速度大于所述第二视图的移动速度。
  16. 如权利要求15所述的装置,其中,所述第二控制子模块,包括:
    第一获取单元,被配置为根据所述预设位置,获取所述第二视图完全占据所述用户界面所需要的剩余移动位置;
    第一确定单元,被配置为根据所述多媒体切换操作的操作信息,确定所述第一视图的移动方向;
    第二获取单元,被配置为根据所述第一视图的移动方向,获取所述第一视图离开所述用户界面所需要的移动位置,其中,所述移动位置大于所述剩余移动位置;
    第二确定单元,被配置为根据所述第二视图的移动速度、所述移动位置和所述剩余移动位置,确定所述第一视图的移动速度;
    控制单元,被配置为控制所述第一视图在所述移动方向上以所述第一视图的移动速度移动离开所述用户界面。
  17. 如权利要求16所述的装置,其中,所述第二确定单元,具体被配置为:
    根据所述第二视图的移动速度和所述剩余移动位置,确定所述第二视图的移动时间;
    根据所述移动位置和所述第二视图的移动时间,确定所述第一视图的移动速度。
  18. 如权利要求16所述的装置,其中,响应于所述多媒体切换操作为滑动操作,所述第一控制子模块,具体被配置为:
    根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向和滑动距离;
    根据所述滑动方向确定所述第二视图的移动方向,并根据所述滑动距离确定所述第二视图的移动距离;
    根据所述移动方向和所述移动距离,控制所述第二视图移动进入所述用户界面。
  19. 如权利要求16所述的装置,其中,响应于所述多媒体切换操作为滑动操作,所述第二控制子模块,具体被配置为:
    根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向;
    根据所述滑动方向确定所述第一视图的移动方向;以及
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述第一视图的移动方向,控制所述第一视图移动离开所述用户界面。
  20. 如权利要求13所述的装置,其中,所述第一控制模块,包括:
    第一确定子模块,被配置为根据所述多媒体切换操作的操作信息,确定所述第二视图的移动方向、所述第一视图的移动方向;
    第二确定子模块,被配置为根据所述第一视图的移动方向,确定所述第一多媒体资源的移动方向,其中,所述第二视图和所述第一视图的移动方向相对于所述用户界面相同,所述第一多媒体资源的移动方向相对于所述第一视图的移动方向相反,所述第一多媒体资源的移动速度和所述第一视图的移动速度相同;
    第三控制子模块,被配置为根据所述第二视图的移动方向控制所述第二视图移动进入所述用户界面;
    第四控制子模块,被配置为根据所述第一视图的移动方向控制所述第一视图移动离开所述用户界面的同时,根据所述第一多媒体资源的移动方向,控制所述第一多媒体资源相对于所述第一视图移动。
  21. 如权利要求20所述的装置,其中,所述装置还包括:
    调整模块,用于响应于检测到所述第二视图被移动到所述用户界面的预设位置,调整所述第一多媒体资源的移动方向,所述第一多媒体资源调整前的移动方向和调整后的移动方向相反;
    第二控制模块,被配置为根据所述调整后的移动方向,控制所述第一多媒体资源移动离开所述用户界面。
  22. 如权利要求13所述的装置,其中,所述装置还包括:
    第三控制模块,被配置为在所述第一控制模块控制所述第一视图移动离开所述用户界面的过程中,控制所述第一多媒体资源处于播放状态;或者,控制所述第一多媒体资源处于暂停状态。
  23. 如权利要求13所述的装置,其中,所述装置还包括:
    第四控制模块,被配置为在所述第一控制模块控制所述第二视图移动进入所述用户界面的过程中,控制所述第二多媒体资源处于播放状态或者暂停状态。
  24. 如权利要求13所述的装置,其中,所述装置还包括:
    第五控制模块,被配置为在控制所述第二视图移动进入所述用户界面的过程中,响应于检测到所述第二多媒体资源未加载完成,控制在所述第二视图上展示所述第二多媒体资源的预览多媒体资源;
    响应于检测到所述第二多媒体资源加载完成,控制所述第二多媒体资源处于播放状态。
  25. 一种电子设备,其中,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,实现以下步骤:
    在用户界面中通过第一视图展示第一多媒体资源;
    接收实施于所述用户界面的多媒体切换操作,确定待切换的第二多媒体资源;
    其中,所述第二多媒体资源通过第二视图展示;
    根据所述多媒体切换操作的操作信息,分别控制所述第一视图移动离开所述用户界面以及第二视图移动进入所述用户界面,直至所述第二视图完全占据所述用户界面,展示所述第二多媒体资源;
    其中,所述第二视图在移动过程中,至少有部分时间遮盖所述第一多媒体资源的至少部分展示内容。
  26. 如权利要求25所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    根据所述多媒体切换操作的操作信息,控制所述第二视图移动进入所述用户界面;
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述多媒体切换操作的操作信息,控制所述第一视图移动离开所述用户界面。
  27. 如权利要求26所述的电子设备,其中,所述第一视图的移动速度大于所述第二视图的移动速度。
  28. 如权利要求27所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    所述响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述预设位置,获取所述第二视图完全占据所述用户界面所需要的剩余移动位置;
    根据所述多媒体切换操作的操作信息,确定所述第一视图的移动方向;
    根据所述第一视图的移动方向,获取所述第一视图离开所述用户界面所需要的移动位置,其中,所述移动位置大于所述剩余移动位置;
    根据所述第二视图的移动速度、所述移动位置和所述剩余移动位置,确定所述第一视图的移动速度;
    控制所述第一视图在所述移动方向上以所述第一视图的移动速度移动离开所述用户界面。
  29. 如权利要求28所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    根据所述第二视图的移动速度和所述剩余移动位置,确定所述第二视图的移动时间;
    根据所述移动位置和所述第二视图的移动时间,确定所述第一视图的移动速度。
  30. 如权利要求26所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    响应于所述多媒体切换操作为滑动操作,根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向和滑动距离;
    根据所述滑动方向确定所述第二视图的移动方向,并根据所述滑动距离确定所述第二视图的移动距离;
    根据所述移动方向和所述移动距离,控制所述第二视图移动进入所述用户界面。
  31. 如权利要求26所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    响应于所述多媒体切换操作为滑动操作,根据所述滑动操作的操作信息,确定所述滑动操作的滑动方向;
    根据所述滑动方向确定所述第一视图的移动方向;以及
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,根据所述第一视图的移动方向,控制所述第一视图移动离开所述用户界面。
  32. 如权利要求25所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    根据所述多媒体切换操作的操作信息,确定所述第二视图的移动方向、所述第一视图的移动方向;
    根据所述第一视图的移动方向,确定所述第一多媒体资源的移动方向,其中,所述第二视图和所述第一视图的移动方向相对于所述用户界面相同,所述第一多媒体资源的移动方向相对于所述第一视图的移动方向相反,所述第一多媒体资源的移动速度和所述第一视图的移动速度相同;
    根据所述第二视图的移动方向控制所述第二视图移动进入所述用户界面;
    根据所述第一视图的移动方向控制所述第一视图移动离开所述用户界面的同时,根据所述第一多媒体资源的移动方向,控制所述第一多媒体资源相对于所述第一视图移动。
  33. 如权利要求32所述的电子设备,其中,所述处理器被配置执行所述可执行指令, 实现以下步骤:
    响应于检测到所述第二视图被移动到所述用户界面的预设位置,调整所述第一多媒体资源的移动方向,所述第一多媒体资源调整前的移动方向和调整后的移动方向相反;
    根据所述调整后的移动方向,控制所述第一多媒体资源移动离开所述用户界面。
  34. 如权利要求25所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    在控制所述第一视图移动离开所述用户界面的过程中,控制所述第一多媒体资源处于播放状态;
    或者,控制所述第一多媒体资源处于暂停状态。
  35. 如权利要求25所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    在控制所述第二视图移动进入所述用户界面的过程中,控制所述第二多媒体资源处于播放状态或者暂停状态。
  36. 如权利要求25所述的电子设备,其中,所述处理器被配置执行所述可执行指令,实现以下步骤:
    在控制所述第二视图移动进入所述用户界面的过程中,响应于检测到所述第二多媒体资源未加载完成,控制在所述第二视图上展示所述第二多媒体资源的预览多媒体资源;
    响应于检测到所述第二多媒体资源加载完成,控制所述第二多媒体资源处于播放状态。
  37. 一种非易失性计算机可读存储介质,其中,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如权利要求1至12中任一项所述的多媒体资源切换方法。
PCT/CN2021/105539 2020-09-30 2021-07-09 多媒体资源切换方法及装置 WO2022068311A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011060017.8A CN112256167A (zh) 2020-09-30 2020-09-30 多媒体资源切换方法、装置、电子设备及存储介质
CN202011060017.8 2020-09-30

Publications (1)

Publication Number Publication Date
WO2022068311A1 true WO2022068311A1 (zh) 2022-04-07

Family

ID=74233555

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/105539 WO2022068311A1 (zh) 2020-09-30 2021-07-09 多媒体资源切换方法及装置

Country Status (2)

Country Link
CN (1) CN112256167A (zh)
WO (1) WO2022068311A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256167A (zh) * 2020-09-30 2021-01-22 北京达佳互联信息技术有限公司 多媒体资源切换方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024559A (zh) * 2012-11-09 2013-04-03 北京小米科技有限责任公司 一种切换视频的方法、装置和设备
CN104378685A (zh) * 2014-11-17 2015-02-25 天脉聚源(北京)传媒科技有限公司 一种视频切换的方法及装置
US20170168706A1 (en) * 2015-12-14 2017-06-15 Le Holdings (Beijing) Co., Ltd. Method and electronic device for switching videos
CN110856031A (zh) * 2019-11-18 2020-02-28 广州市百果园信息技术有限公司 一种媒体资源的展示系统、方法、设备和存储介质
CN111580718A (zh) * 2020-04-30 2020-08-25 北京字节跳动网络技术有限公司 应用程序的页面切换方法、装置、电子设备及存储介质
CN112256167A (zh) * 2020-09-30 2021-01-22 北京达佳互联信息技术有限公司 多媒体资源切换方法、装置、电子设备及存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102945116A (zh) * 2012-10-19 2013-02-27 广东欧珀移动通信有限公司 一种界面切换显示方法、装置及移动终端
CN103390053A (zh) * 2013-07-26 2013-11-13 贝壳网际(北京)安全技术有限公司 浏览器的页面切换控制方法、装置和客户端
US10966001B2 (en) * 2018-04-05 2021-03-30 Tvu Networks Corporation Remote cloud-based video production system in an environment where there is network delay

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024559A (zh) * 2012-11-09 2013-04-03 北京小米科技有限责任公司 一种切换视频的方法、装置和设备
CN104378685A (zh) * 2014-11-17 2015-02-25 天脉聚源(北京)传媒科技有限公司 一种视频切换的方法及装置
US20170168706A1 (en) * 2015-12-14 2017-06-15 Le Holdings (Beijing) Co., Ltd. Method and electronic device for switching videos
CN110856031A (zh) * 2019-11-18 2020-02-28 广州市百果园信息技术有限公司 一种媒体资源的展示系统、方法、设备和存储介质
CN111580718A (zh) * 2020-04-30 2020-08-25 北京字节跳动网络技术有限公司 应用程序的页面切换方法、装置、电子设备及存储介质
CN112256167A (zh) * 2020-09-30 2021-01-22 北京达佳互联信息技术有限公司 多媒体资源切换方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN112256167A (zh) 2021-01-22

Similar Documents

Publication Publication Date Title
CN113767618B (zh) 实时视频特效系统和方法
CN110908625B (zh) 多屏显示方法、装置、设备、系统、舱体及存储介质
CN110554818B (zh) 用于导航媒体内容的设备、方法和图形用户界面
US20130246948A1 (en) Control method and control device
US11825177B2 (en) Methods, systems, and media for presenting interactive elements within video content
WO2017101374A1 (zh) 一种视频切换的方法及系统
WO2023104102A1 (zh) 一种直播评论展示方法、装置、设备、程序产品及介质
WO2023024921A1 (zh) 视频交互方法、装置、设备及介质
JP6616313B2 (ja) 相互作用視聴覚映画を再生する装置、方法およびコンピュータプログラム
JP7495581B2 (ja) アプリケーションにおける注目イベントの表示方法及び電子機器
CN111813313A (zh) 多媒体资源切换方法、装置、终端设备和存储介质
US20160103574A1 (en) Selecting frame from video on user interface
CN112035195A (zh) 应用界面的展示方法、装置、电子设备及存储介质
WO2022068311A1 (zh) 多媒体资源切换方法及装置
CN108008894B (zh) 一种内容显示方法、装置和终端设备
WO2023232092A1 (zh) 页面展示方法、装置及电子设备
US11861157B2 (en) Methods, systems, and media for presenting offset content
CN113392260B (zh) 界面显示控制方法、装置、介质及电子设备
CN109688455B (zh) 视频播放方法、装置及设备
WO2018026152A1 (ko) 랜드스케이프 동영상 컨텐츠의 적응적 재생 시스템 및 재생방법
JP6916860B2 (ja) 動画を再生するためのプログラム、システム、及び方法
CN117033820A (zh) 内容展示方法、装置、电子设备及存储介质
JP2021149683A (ja) 動画を再生するためのプログラム、システム、及び方法
WO2024107674A1 (en) System and method for dynamic presentation of graphical and video content
JP2024513695A (ja) アプリケーションの注目イベント展示方法、装置、機器、媒体及び製品

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: 21873973

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21873973

Country of ref document: EP

Kind code of ref document: A1