CN111083275B - Multimedia file playing method, terminal and computer storage medium - Google Patents

Multimedia file playing method, terminal and computer storage medium Download PDF

Info

Publication number
CN111083275B
CN111083275B CN201811222656.2A CN201811222656A CN111083275B CN 111083275 B CN111083275 B CN 111083275B CN 201811222656 A CN201811222656 A CN 201811222656A CN 111083275 B CN111083275 B CN 111083275B
Authority
CN
China
Prior art keywords
separation
multimedia file
parameter
component
change interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811222656.2A
Other languages
Chinese (zh)
Other versions
CN111083275A (en
Inventor
姜伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201811222656.2A priority Critical patent/CN111083275B/en
Publication of CN111083275A publication Critical patent/CN111083275A/en
Application granted granted Critical
Publication of CN111083275B publication Critical patent/CN111083275B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Environmental & Geological Engineering (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a multimedia file playing method, which is applied to a terminal with a first component and a second component which can be relatively separated, and comprises the following steps: after the first component is monitored to be in a preset separation state relative to the second component, detecting the change of a parameter to be detected, which represents the real-time separation state of the first component relative to the second component; when the current parameter to be tested meets the set pre-separation range, playing a multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected. The embodiment of the invention also discloses a terminal and a computer storage medium.

Description

Multimedia file playing method, terminal and computer storage medium
Technical Field
The present invention relates to the field of terminals, and in particular, to a multimedia file playing method, a terminal, and a computer storage medium.
Background
Current double screen terminal is provided with spacing buckle for example double screen cell-phone to ensure that two screens are in the coplanar when the work of amalgamating, and above-mentioned mechanical money buckle structure has guaranteed in the twinkling of an eye of amalgamation, produces the successful amalgamation audio of similar "papa". Returning to the user perspective, successful splicing can enable the user to feel excitement of order establishment, and the user can feel pleasure of order destruction at the moment of order breaking. For the pleasant mining of order disruption, the related art does not produce an effect sound like "papa" at the moment of order disruption, usually until the mobile phone is completely folded to reach another order point. However, the above operation method cannot provide a good use experience for the user.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a multimedia file playing method, a terminal, and a computer storage medium capable of improving user experience.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a multimedia file playing method, which is applied to a terminal having a first component and a second component that can be relatively separated, where the method includes:
after the first component is monitored to be in a preset separation state relative to the second component, detecting the change of a parameter to be detected, which represents the real-time separation state of the first component relative to the second component;
when the current parameter to be tested meets the set pre-separation range, playing a multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
In a second aspect, an embodiment of the present invention provides a terminal, where the terminal has a first component and a second component that are separable from each other, and the terminal includes:
the detection module is used for detecting the change of a parameter to be detected representing the real-time separation state of the first component relative to the second component after monitoring that the first component is in a preset separation state relative to the second component;
the processing module is used for playing the multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section when the current parameter to be tested meets the set pre-separation range; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
In a third aspect, an embodiment of the present invention provides a terminal, where the terminal includes a processor and a memory for storing a computer program capable of running on the processor; wherein,
the processor is configured to execute the multimedia file playing method in the first aspect when the computer program is executed.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for playing a multimedia file in the first aspect is implemented.
In the multimedia file playing method, the terminal, and the computer storage medium provided in the above embodiments, after monitoring that the first component of the terminal is in the preset separation state with respect to the second component of the terminal, the change of the parameter to be detected, which characterizes the real-time separation state of the first component with respect to the second component, is detected in real time, and when it is determined that the current parameter to be detected is within the preset pre-separation range, the multimedia file progress segment corresponding to the parameter change interval to be detected corresponding to the current parameter to be detected is played. Therefore, by setting a plurality of parameter change intervals to be detected and the multimedia file progress sections corresponding to the parameter change intervals to be detected respectively, different dynamic playing effects corresponding to different change rates of the current parameter to be detected can be formed, the playing of the multimedia file can correspondingly show the real-time separation process of the first component relative to the second component, and the user experience is improved.
Drawings
FIG. 1 is a flowchart illustrating a multimedia file playing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for playing a multimedia file according to an alternative embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method for playing a multimedia file according to another alternative embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for playing a multimedia file according to another alternative embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for playing a multimedia file according to yet another alternative embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal according to an alternative embodiment of the present invention;
FIG. 9 is a diagram illustrating a relationship between angles and animations according to an embodiment of the present invention;
FIG. 10 is a schematic view of an animation setup interface according to an embodiment of the invention;
FIG. 11 is a diagram illustrating an audio setting interface according to an embodiment of the invention.
Detailed Description
The technical scheme of the invention is further elaborated by combining the drawings and the specific embodiments in the specification. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a multimedia file playing method provided for an embodiment of the present invention is applied to a terminal having a first component and a second component that can be relatively separated, and includes the following steps:
step S101: after the first component is monitored to be in a preset separation state relative to the second component, detecting the change of a parameter to be detected, which represents the real-time separation state of the first component relative to the second component;
here, the state corresponding to the separation process of the first component with respect to the second component may be divided in advance into a preset separation state and a separation state in sequence, the preset separation state refers to the state in which the first component is in an expected state to be separated from the second component, the separation state refers to the state in which the first component is in an expected state in which the first component is being separated from the second component, and the state of the first component with respect to the second component may be changed from the preset separation state to the separation state or from the separation state to the preset separation state. The preset separation state and the change of the separation state can be represented by the change condition of the parameter to be measured of the first component relative to the second component, so that the change ranges of the parameters to be measured can be sequentially determined according to the change condition of the parameter to be measured of the first component relative to the second component in the separation process of the first component relative to the second component, and the corresponding state of the separation process can be determined according to the change ranges of the parameters to be measured. In this embodiment, the variation range of the parameter to be measured sequentially includes the set separation tolerance range, the pre-separation range, and the separation range. When the parameter to be measured is within the separation tolerance range, the first component is in a preset separation state relative to the second component; when the parameter to be measured is in the pre-separation range, the first component is in a state of changing from a preset separation state to a separation state or changing from the separation state to the preset separation state relative to the second component; and when the parameter to be measured is in the separation range, the first component is in a separation state relative to the second component.
It is understood that the terminal having the first component and the second component that can be separated relatively may be a smart phone, a computer, a tablet computer, and the like, and the terminal is not particularly limited in this embodiment. According to different application scenes, the first component, the second component and the parameter to be measured can be changed correspondingly. For example, in an application scene, the first component is a first screen, the second component is a second screen, and the parameter to be measured is an angle; in another application scenario, the first component is an earphone, the second component is an earphone hole, and the parameter to be measured is an insertion length of the earphone relative to the earphone hole; in another application scenario, the first component is a data line, the second component is a data line hole, and the parameter to be measured is an insertion length of the data line relative to the data line hole; in yet another application scenario, the first component is a Subscriber Identity Module (SIM), the second component is a SIM card hole, and the parameter to be measured is an insertion length of the SIM card relative to the SIM card hole.
In an optional embodiment, before the monitoring that the first component is in the preset separation state relative to the second component, the method further includes:
detecting whether the current parameter to be detected meets a set separation tolerance range;
and if the current parameter to be measured meets the separation tolerance range, determining that the first component is in a preset separation state relative to the second component.
Specifically, the terminal detects whether a current parameter to be measured of the first component relative to the second component is within a set separation tolerance range, and if the current parameter to be measured is within the separation tolerance range, it is determined that the first component is in a preset separation state relative to the second component.
Here, the separation tolerance range is used to characterize whether the first component is in the preset separation state with respect to the second component. The separation tolerance range may be determined according to a variation range of the parameter to be measured corresponding to the first component with respect to the second component when the first component is in the preset separation state with respect to the second component.
Therefore, whether the current parameter to be measured of the first component relative to the second component meets the set separation tolerance range or not is detected in real time, so that whether the first component is in the preset separation state or not is determined, and the change of the parameter to be measured of the first component relative to the second component is detected only when the first component is determined to be in the preset separation state relative to the second component, so that the operation is simple, and the resource overhead is saved.
Step S102: when the current parameter to be tested meets the set pre-separation range, playing a multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
Specifically, after detecting that the current parameter to be measured of the first component relative to the second component is within the set pre-separation range, the terminal determines a parameter change interval to be measured corresponding to the current parameter to be measured, namely the target parameter change interval to be measured, and plays the multimedia file progress segment corresponding to the target parameter change interval to be measured according to the corresponding relationship between the set parameter change interval to be measured and the multimedia file progress segment.
Here, the pre-separation range is used to represent a corresponding variation range of the parameter to be measured after the first component is separated from the preset separation state with respect to the second component to before the first component enters the separation state, and when the current parameter to be measured of the first component with respect to the second component is within the pre-separation range, it is determined that the first component is not in the preset separation state with respect to the second component and is in a process of transitioning to the separation state. According to the actual requirement, the pre-separation range may be divided into a plurality of parameter change intervals to be measured, which may be equal to or unequal to each other, for example, the pre-separation range may be divided into two parameter change intervals to be measured, which may be equal to each other, or six parameter change intervals to be measured, which may be equal to each other. The multimedia file can be continuous animation with a set number of frames or continuous audio with a set duration, and the multimedia file can be divided into a corresponding number of multimedia file progress sections according to the number of the parameter change sections to be detected, so that the corresponding relation between the parameter change sections to be detected and the multimedia file progress sections is obtained. For example, assuming that the multimedia file is a continuous 90-frame animation, and the pre-separation range includes 9 parameter change intervals to be measured, the continuous 90-frame animation may be equally divided into 9 multimedia file progress segments, each multimedia file progress segment includes 10 continuous animation frames, and each parameter change interval to be measured corresponds to one multimedia file progress segment, for example, a multimedia file progress segment formed from the frame 1 animation to the frame 10 animation corresponds to the parameter change interval to be measured 1, a multimedia file progress segment formed from the frame 11 animation to the frame 20 animation corresponds to the parameter change interval to be measured 2, and so on, a multimedia file progress segment formed from the frame 81 animation to the frame 90 animation corresponds to the parameter change interval to be measured 9. For the animation, the theme of the animation may be set according to actual needs, for example, the theme may be set as glass breaking, bamboo chopstick breaking, chocolate breaking, card breaking, or the like, and may also be set as glass combination, card combination, or the like.
In summary, in the multimedia file playing method provided in the above embodiment, after the first component is monitored to be in the preset separation state relative to the second component, the change of the parameter to be detected representing the real-time separation state of the first component relative to the second component is detected in real time, and when it is determined that the current parameter to be detected is within the set pre-separation range, the multimedia file progress segment corresponding to the parameter change interval to be detected corresponding to the current parameter to be detected is played. Therefore, by setting a plurality of parameter change intervals to be detected and the multimedia file progress sections corresponding to the parameter change intervals to be detected respectively, different dynamic playing effects corresponding to different change rates of the current parameter to be detected can be formed, the playing of the multimedia file can correspondingly show the real-time separation process of the first component relative to the second component, and the user experience is improved.
In an optional embodiment, after the playing the multimedia file progress segment corresponding to the target parameter change interval to be measured, the method further includes:
and when the current parameter to be tested is determined to be changed from the pre-separation range to the separation tolerance range and the current parameter to be tested meets the separation tolerance range, stopping playing the currently played multimedia file progress segment.
Here, when the current parameter to be measured changes from the pre-separation range to the separation tolerance range and the current parameter to be measured meets the separation tolerance range, it indicates that the first component is in the preset separation state again with respect to the second component, and at this time, the multimedia file does not need to be played, so that the playing of the currently played multimedia file progress segment is stopped. The currently played multimedia file progress segment may be a multimedia file progress segment corresponding to a previous target parameter change interval to be measured, and the previous target parameter change interval to be measured may belong to the pre-separation range.
Therefore, when the multimedia file does not need to be played, the playing of the currently played multimedia file progress segment is stopped, so that the condition that the parameter change to be detected of the first component relative to the second component is consistent with the playing state of the multimedia file is ensured, and the use experience of a user is further improved.
In an optional embodiment, when it is determined that the current parameter to be measured satisfies the set pre-separation range, playing the multimedia file progress segment corresponding to the target parameter change interval to be measured according to the corresponding relationship between the set parameter change interval to be measured and the multimedia file progress segment, includes:
when the current parameter to be tested meets the set pre-separation range, determining a corresponding current target parameter change interval to be tested according to the current parameter to be tested, and playing a multimedia file progress section corresponding to the target parameter change interval to be tested according to the corresponding relation between the set parameter change interval to be tested and the multimedia file progress section;
obtaining an updated current parameter to be tested, determining a corresponding current target parameter change interval to be tested according to the updated current parameter to be tested when the updated current parameter to be tested meets the pre-separation range, and if the current target parameter change interval to be tested is the same as the previous target parameter change interval to be tested, continuously playing a multimedia file progress section which corresponds to the previous target parameter change interval and is not played; and if the current target parameter change interval to be detected is different from the previous target parameter change interval to be detected, playing the multimedia file progress section corresponding to the current target parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
It can be understood that, because of the influence of external factors such as the operating speed of the user, the first component may change in real time relative to the parameter to be measured of the second component, and therefore the parameter to be measured of the first component relative to the second component acquired at each time may be different, and correspondingly, the currently acquired parameter to be measured and the last acquired parameter to be measured may be located in different parameter change intervals to be measured, and may also be located in the same parameter change interval to be measured. If the current target parameter change interval to be measured is the same as the previous target parameter change interval to be measured, namely the currently acquired parameter to be measured and the last acquired parameter to be measured are in the same parameter change interval to be measured, continuing to play the multimedia file progress section which corresponds to the previous target parameter change interval to be measured and is not played completely; if the current target parameter change interval to be measured is different from the previous target parameter change interval to be measured, namely the currently acquired parameter to be measured and the last acquired parameter to be measured are in different parameter change intervals to be measured, the playing of the multimedia file progress section corresponding to the previous target parameter change interval to be measured is stopped, and the multimedia file progress section corresponding to the current target parameter change interval to be measured is played.
Here, when each multimedia file progress segment contains a plurality of continuous animation frames, the playing is generally started from the first animation frame of the multimedia file progress segment. For example, if a multimedia file progress segment includes 10 continuous animations, when the multimedia file progress segment needs to be played, the 1 st animation, the 2 nd animation, the 3 rd animation of the multimedia file progress segment are played in sequence, and so on.
Therefore, according to the relation between the target parameter change interval to be measured corresponding to the current parameter to be measured of the first component relative to the second component and the last target parameter change interval to be measured, the progress section of the played multimedia file is determined, the playing continuity of the multimedia file is guaranteed, and the user experience is improved.
In an optional embodiment, after the playing the multimedia file progress segment corresponding to the target parameter change interval to be tested according to the corresponding relationship between the set parameter change interval to be tested and the multimedia file progress segment when it is determined that the current parameter to be tested satisfies the set pre-separation range, the method further includes:
and when the current parameter to be detected is determined to be changed from the pre-separation range to the set separation range and the current parameter to be detected meets the separation range, if the last target parameter change interval to be detected is not the last parameter change interval to be detected in the pre-separation range, playing a multimedia file progress section corresponding to the last parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
When the current parameter to be measured changes from the pre-separation range to the set separation range and meets the separation range, the first component is described to enter a separation state relative to the second component, and if the last target parameter change interval to be measured is the last parameter change interval to be measured in the pre-separation range, the playing of the multimedia file progress section corresponding to the last parameter change interval to be measured is stopped; and if the last target parameter change interval to be measured is not the last parameter change interval to be measured in the range before separation, playing the multimedia file progress section corresponding to the last parameter change interval to be measured.
It can be understood that, due to the influence of external factors such as the operation speed of the user, the change of the parameter to be measured of the first component relative to the second component may be fast, so that the last target parameter change interval to be measured is not the last parameter change interval to be measured in the range before separation, and the process from the preset separation state to the separation state of the first component relative to the second component is completely embodied by playing the multimedia file progress segment corresponding to the last parameter change interval to be measured in the range before separation.
Therefore, when the current parameter to be measured meets the set separation range and the current parameter to be measured is determined to be from the pre-separation range to the separation range, and the last target parameter change interval to be measured is not the last parameter change interval to be measured in the pre-separation range, the multimedia file progress section corresponding to the last parameter change interval to be measured is played, so that the process from the first component to the second component to the preset separation state to the separation state is completely embodied, and the user experience is further improved.
In an optional embodiment, when it is determined that the current parameter to be measured satisfies the set pre-separation range, before playing the multimedia file progress segment corresponding to the target parameter change interval to be measured according to the corresponding relationship between the set parameter change interval to be measured and the multimedia file progress segment, the method further includes:
receiving a setting operation instruction carrying a parameter separation tolerance value to be detected and a parameter separation value to be detected;
and determining the separation tolerance range, the pre-separation range and the separation range according to the parameter separation tolerance value to be detected and the parameter separation value to be detected in the setting operation instruction.
Here, the separation tolerance range, the pre-separation range, and the separation range are also different according to the difference in the preset separation state. The separation tolerance range may be greater than the separation tolerance value of the parameter to be measured, the pre-separation range may be a range from the separation value of the parameter to be measured to the separation tolerance value of the parameter to be measured, and the separation range may be smaller than the separation value of the parameter to be measured. It can be understood that the setting operation instruction may also carry a set multimedia file, and the pre-separation range is divided according to the number of default parameter change intervals to be measured to obtain a plurality of parameter change intervals to be measured, the multimedia file is divided according to the number of default parameter change intervals to be measured to obtain a plurality of multimedia file progress segments, and then a corresponding relationship between the parameter change intervals to be measured and the multimedia file progress segments is established. It should be noted that the setting operation instruction may also carry the number of the parameter change intervals to be measured.
Therefore, the separation tolerance range, the pre-separation range, the separation range and the like can be configured according to actual needs, the mode is flexible, and the use experience of a user is further improved.
The following describes a specific implementation flow of the multimedia file playing method provided by the embodiment of the present invention in detail based on four different application scenarios with reference to the accompanying drawings and specific embodiments.
Application scenario one
Referring to fig. 2, a multimedia file playing method provided in an optional specific embodiment of the present invention is based on application scenarios as follows: the first component is a first screen, the second component is a second screen, and the parameter to be measured is an angle. Referring to fig. 2, the multimedia file playing method provided in this embodiment includes the following steps:
step S201: after monitoring that a first screen is in a preset separation state relative to a second screen, detecting angle change representing the real-time separation state of the first screen relative to the second screen;
here, the preset separation state may be set according to actual needs, and in this embodiment, taking the preset separation state as an extended state or a folded state as an example, correspondingly, the monitoring that the first screen is in the preset separation state relative to the second screen may be monitoring that the first screen is in the extended state or the folded state corresponding to the second screen within the set angle range. The unfolding state may refer to that an angle of the first screen with respect to the second screen is greater than a set first angle threshold, and the first angle threshold may be set according to actual needs, for example, the first angle threshold may be set to 175 degrees or 179 degrees, and the like. The folded state may refer to that an angle of the first screen with respect to the second screen is smaller than a set second angle threshold, and the second angle threshold may be set according to actual needs, for example, the second angle threshold may be set to 1 degree or 5 degrees, and the like. Since the change in the angle of the first screen relative to the second screen can be used to characterize whether the first screen and the second screen are gradually approaching or departing from each other, the angle of the first screen relative to the second screen can characterize the real-time separation status of the first screen relative to the second screen. It is to be understood that, when the preset separation state is an unfolded state, the real-time separation state of the first screen with respect to the second screen refers to a state of transition from the unfolded state to a folded state; when the preset separation state is a folded state, the real-time separation state of the first screen relative to the second screen is a state of being converted from the folded state to an unfolded state.
It should be noted that, monitoring whether the first screen is in the preset separation state with respect to the second screen may be implemented by monitoring an angle of the first screen with respect to the second screen, monitoring a distance of the first screen with respect to the second screen, or implemented by other manners. The angle change of the first screen relative to the second screen can be obtained by an angle sensor or other devices, and the distance of the first screen relative to the second screen can be obtained by a distance sensor or other devices.
In an optional embodiment, before the monitoring that the first screen is in the preset separation state relative to the second screen, the method further includes:
detecting whether the current angle meets a set separation tolerance range;
and if the current angle meets the separation tolerance range, determining that the first screen is in a preset separation state relative to the second screen.
Specifically, the terminal detects whether a current angle of the first screen relative to the second screen is within a set separation tolerance range, and if the current angle is within the separation tolerance range, it is determined that the first screen is in a preset separation state relative to the second screen.
Here, the separation tolerance range is used to characterize whether the first screen is in the preset separation state relative to the second screen, and if the current angle of the first screen relative to the second screen is within the separation tolerance range, it is determined that the first screen is in the preset separation state relative to the second screen; and if the current angle of the first screen relative to the second screen is not within the separation tolerance range, determining that the first screen is not in the preset separation state relative to the second screen. The separation tolerance range may be determined according to an angle range corresponding to the first screen with respect to the second screen when the first screen is in a corresponding preset separation state with respect to the second screen. For example, assuming that the maximum angle of the first screen with respect to the second screen is 180 degrees, and the preset separation state is an unfolded state, the separation tolerance range may be set to 178 to 180 degrees, 175 to 180 degrees, or the like. Assuming that the minimum angle of the first screen with respect to the second screen is 0 degree, and the preset separation state is a folded state, the separation tolerance range may be set to 0 to 2 degrees, 0 to 5 degrees, or the like.
Therefore, whether the current angle of the first screen relative to the second screen meets the set separation tolerance range or not is detected in real time, so that whether the first screen is in the preset separation state or not is determined, and the angle change of the first screen relative to the second screen is detected only when the first screen is determined to be in the preset separation state relative to the second screen, so that the operation is simple, and the resource overhead is saved.
Step S202: when the current angle meets the set pre-separation range, playing a multimedia file progress section corresponding to the target angle change section according to the corresponding relation between the set angle change section and the multimedia file progress section; the pre-separation range comprises a plurality of set angle change intervals, and the target angle change interval is an angle change interval corresponding to the current angle.
Specifically, after detecting that the current angle of the first screen relative to the second screen is within the set pre-separation range, the terminal determines an angle change interval corresponding to the current angle, namely the target angle change interval, and plays the multimedia file progress segment corresponding to the target angle change interval according to the corresponding relationship between the set angle change interval and the multimedia file progress segment.
Here, the pre-separation range is used to represent a corresponding angle range from after separation of the first screen from the preset separation state to before entering the separation state with respect to the second screen, and when the current angle of the first screen with respect to the second screen is within the pre-separation range, it is determined that the first screen is not in the preset separation state with respect to the second screen and is in a process of transitioning to the separation state. For example, assuming that the preset separation state is an unfolded state, if the current angle of the first screen relative to the second screen is within the range before separation, the first screen is transformed from the unfolded state to a folded state relative to the second screen. According to the actual requirement, the pre-separation range may be divided into a plurality of angle change intervals, for example, the plurality of angle change intervals may be divided into two angle change intervals or six angle change intervals. For example, assuming that the pre-separation range is 170 degrees to 179 degrees, the pre-separation range may be divided into 3 angle change sections, 9 angle change sections, and the like on average. The multimedia file can be continuous animation with a set number of frames or continuous audio with a set duration, and the multimedia file can be divided into a corresponding number of multimedia file progress sections according to the number of the angle change sections, so that the corresponding relation between the angle change sections and the multimedia file progress sections is obtained. For example, assuming that the multimedia file is a continuous 90-frame animation, and the separation front range includes 9 angle change intervals, the continuous 90-frame animation may be equally divided into 9 multimedia file progress segments, each multimedia file progress segment includes 10 continuous animation, and each angle change interval corresponds to one multimedia file progress segment, for example, a multimedia file progress segment formed from the 1 st frame animation to the 10 th frame animation corresponds to the 1 st angle change interval, a multimedia file progress segment formed from the 11 th frame animation to the 20 th frame animation corresponds to the 2 nd angle change interval, and so on, a multimedia file progress segment formed from the 81 st frame animation to the 90 th frame animation corresponds to the 9 th angle change interval. For the animation, the theme of the animation may be set according to actual needs, for example, the theme may be set as glass breaking, bamboo chopstick breaking, chocolate breaking, card breaking, or the like, and may also be set as glass combination, card combination, or the like.
In summary, in the multimedia file playing method provided in the above embodiment, after the first screen is monitored to be in the preset separation state relative to the second screen, the angle change representing the real-time separation state of the first screen relative to the second screen is detected in real time, and when it is determined that the current angle is within the preset pre-separation range, the multimedia file progress segment corresponding to the angle change interval corresponding to the current angle is played. Therefore, by setting a plurality of angle change intervals and the multimedia file progress sections corresponding to the angle change intervals respectively, different dynamic playing effects corresponding to different change rates of the current angle can be formed, the playing of the multimedia file can correspondingly show the real-time separation process of the first screen relative to the second screen, and the user experience is improved.
In an optional embodiment, when it is determined that the current angle satisfies the set pre-separation range, playing the multimedia file progress segment corresponding to the target angle change interval according to the corresponding relationship between the set angle change interval and the multimedia file progress segment, includes:
when the current angle meets the set pre-separation range, determining a corresponding current target angle change interval according to the current angle, and playing a multimedia file progress segment corresponding to the target angle change interval according to the corresponding relation between the set angle change interval and the multimedia file progress segment;
acquiring an updated current angle, determining a corresponding current target angle change interval according to the updated current angle when the updated current angle meets the pre-separation range, and if the current target angle change interval is the same as the previous target angle change interval, continuously playing a multimedia file progress section which corresponds to the previous target angle change interval and is not completely played; and if the current target angle change interval is different from the last target angle change interval, playing the multimedia file progress segment corresponding to the current target angle change interval according to the corresponding relation between the set angle change interval and the multimedia file progress segment.
It can be understood that, due to the influence of external factors such as the operation speed of the user, the angle of the first screen relative to the second screen may change in real time, so that the angle of the first screen relative to the second screen acquired each time may be different, and correspondingly, the currently acquired angle and the angle acquired last time may be in different angle change intervals, or may be in the same angle change interval. If the current target angle change interval is the same as the last target angle change interval, namely the currently acquired angle is in the same angle change interval as the last acquired angle, continuing to play the multimedia file progress segment which corresponds to the last target angle change interval and is not played; if the current target angle change interval is different from the last target angle change interval, namely the currently acquired angle is in a different angle change interval from the last acquired angle, the playing of the multimedia file progress segment corresponding to the last target angle change interval is stopped, and the multimedia file progress segment corresponding to the current target angle change interval is played.
Here, when each multimedia file progress segment correspondingly includes a plurality of continuous animation frames, the playing is generally started from the first animation frame of the multimedia file progress segment. For example, if a multimedia file progress segment includes 10 continuous animations, when the multimedia file progress segment needs to be played, the 1 st animation, the 2 nd animation, the 3 rd animation of the multimedia file progress segment are played in sequence, and so on.
Therefore, the progress section of the played multimedia file is determined according to the relation between the target angle change interval corresponding to the current angle of the first screen relative to the second screen and the previous target angle change interval, the playing continuity of the multimedia file is guaranteed, and the user experience is improved.
In an optional embodiment, after the determining that the current angle satisfies the set pre-separation range and playing the multimedia file progress segment corresponding to the target angle change interval according to the corresponding relationship between the set angle change interval and the multimedia file progress segment, the method further includes:
and when the current angle is determined to meet the set separation range and the current angle is changed from the pre-separation range to the separation range, if the last target angle change interval is not the last angle change interval in the pre-separation range, playing the multimedia file progress section corresponding to the last angle change interval according to the corresponding relation between the set angle change interval and the multimedia file progress section.
Here, when the current angle satisfies a set separation range and the current angle changes from the pre-separation range to the separation range, it indicates that the first screen has entered a separation state with respect to the second screen, and if a last target angle change interval is a last angle change interval in the pre-separation range, the playing of a multimedia file progress segment corresponding to the last angle change interval is stopped; and if the last target angle change interval is not the last angle change interval in the range before separation, playing the multimedia file progress section corresponding to the last angle change interval. It should be noted that, when the preset separation state is the expansion state, the angle corresponding to the pre-separation range is greater than the angle corresponding to the separation range. For example, it is assumed that the pre-separation range is 170 degrees to 179 degrees, and the separation range is less than 170 degrees. When the preset separation state is a folding state, the angle corresponding to the separation range is smaller than the angle corresponding to the separation range. For example, it is assumed that the pre-separation range is 170 degrees to 179 degrees, and the separation range is more than 179 degrees.
It can be understood that, due to the influence of external factors such as the operation speed of the user, the angle change of the first screen relative to the second screen may be fast, so that the previous target angle change interval is not the last angle change interval in the pre-separation range, and the process from the preset separation state to the separation state of the first screen relative to the second screen is completely embodied by playing the multimedia file progress segment corresponding to the last angle change interval in the pre-separation range.
Therefore, when the current angle is determined to meet the set separation range and the current angle changes from the pre-separation range to the separation range and the last target angle change interval is not the last angle change interval in the pre-separation range, the multimedia file progress segment corresponding to the last angle change interval is played, so that the process that the first screen is in the separation state from the preset separation state to the separation state relative to the second screen is completely embodied, and the user experience is further improved.
In an optional embodiment, further comprising:
and when the current angle is determined to meet the separation tolerance range and the current angle is determined to be changed from the pre-separation range to the separation tolerance range, stopping playing the currently played multimedia file progress segment.
Here, when the current angle satisfies the separation tolerance range and the current angle changes from the pre-separation range to the separation tolerance range, it indicates that the first screen is again in the preset separation state with respect to the second screen, and at this time, the multimedia file does not need to be played, so that the currently played multimedia file progress segment is stopped being played. The currently played multimedia file progress segment may be a multimedia file progress segment corresponding to a previous target angle change interval, and the previous target angle change interval may belong to the pre-separation range.
Therefore, when the multimedia file does not need to be played, the playing of the currently played multimedia file progress segment is stopped, so that the playing state of the multimedia file can be ensured to be consistent with the change of the parameter to be measured of the first component relative to the second component, and the use experience of a user is further improved.
In an optional embodiment, before the determining that the current angle satisfies the set pre-separation range and playing the multimedia file progress segment corresponding to the target angle change interval according to the corresponding relationship between the set angle change interval and the multimedia file progress segment, the method further includes:
receiving a setting operation instruction carrying an angle separation tolerance value and an angle separation value;
determining the separation tolerance range, the pre-separation range and the separation range according to the angle separation tolerance value and the angle separation value in the setting operation instruction.
Here, the separation tolerance range, the pre-separation range, and the separation range are also different according to the difference in the preset separation state. Assuming that the preset separation state is an unfolded state and the maximum angle of the first screen with respect to the second screen is 180 degrees, the separation tolerance range may be from the angle separation tolerance value to 180 degrees, the pre-separation range may be from the angle separation value to the angle separation tolerance value, and the separation range may be smaller than the angle separation value. Assuming that the preset separation state is a folded state and the maximum angle of the first screen with respect to the second screen is 180 degrees, the separation tolerance range may be less than the angular separation tolerance value, the pre-separation range may be from the angular separation tolerance value to the angular separation value, and the separation range may be from the angular separation value to 180 degrees.
It can be understood that the setting operation instruction may also carry a set multimedia file, and the pre-separation range is divided according to the number of the default angle change intervals to obtain a plurality of angle change intervals, the multimedia file is divided according to the number of the default angle change intervals to obtain a plurality of multimedia file progress segments, and then a corresponding relationship between the angle change intervals and the multimedia file progress segments is established. It should be noted that the setting operation command may also carry the number of the angle change intervals.
Therefore, the separation tolerance range, the pre-separation range, the separation range and the like can be configured according to actual needs, the mode is flexible, and the use experience of a user is further improved.
Application scenario two
Referring to fig. 3, a multimedia file playing method provided in an optional specific embodiment of the present invention is based on application scenarios as follows: the first component is an earphone, the second component is an earphone hole, and the parameter to be measured is the insertion length of the earphone relative to the earphone hole. Referring to fig. 3, the multimedia file playing method provided in this embodiment includes the following steps:
step S301: detecting the insertion length change of the earphone relative to the earphone hole, which represents the real-time separation state of the earphone relative to the earphone hole, after monitoring that the earphone is in a preset separation state relative to the earphone hole;
here, the preset separation state may be set according to actual requirements, and in this embodiment, taking the preset separation state as an insertion state or an extraction state as an example, correspondingly, the monitoring that the earphone is in the preset separation state relative to the earphone hole may be monitoring that the earphone is correspondingly in the insertion state or the extraction state relative to the earphone hole. The inserting state refers to that the earphone is completely inserted into the earphone hole, and the pulling state refers to that the earphone is completely pulled out of the earphone hole. Since the change in the insertion length of the earphone relative to the earphone hole can be used to characterize the approaching or separating of the earphone from the earphone hole, the insertion length of the earphone relative to the earphone hole can be used to characterize the real-time separation of the earphone from the earphone hole. It is to be understood that, when the preset separation state is an insertion state, the real-time separation state of the earphone with respect to the earphone hole refers to a state of transition from the insertion state to a pull-out state; when the preset separation state is an extraction state, the real-time separation state of the earphone relative to the earphone hole is a state of converting from the extraction state to an insertion state.
It will be appreciated that when the earphone is in the inserted state with respect to the earphone hole, the earphone is fully inserted into the earphone hole, and the length of the earphone inserted into the earphone hole is the length of the earphone plug. When the earphone is in the pull-out state relative to the earphone hole, the earphone is completely pulled out of the earphone hole, and the length of the earphone inserted into the earphone hole is zero.
In an optional embodiment, before the monitoring that the earphone is in the preset separation state relative to the earphone hole, the method further includes:
detecting whether the current insertion length meets a set separation tolerance range;
and if the current insertion length meets the separation tolerance range, determining that the earphone is in a preset separation state relative to an earphone hole.
Specifically, the terminal detects whether the current insertion length of the earphone relative to the earphone hole is within a set separation tolerance range, and if the current insertion length is within the separation tolerance range, it is determined that the earphone is in a preset separation state relative to the earphone hole.
Here, the separation tolerance range is used to represent whether the earphone is in the preset separation state relative to the earphone hole, and if the current insertion length of the earphone relative to the earphone hole is within the separation tolerance range, it is determined that the earphone is in the preset separation state relative to the earphone hole; and if the current insertion length of the earphone relative to the earphone hole is not within the separation tolerance range, determining that the earphone is not in the preset separation state relative to the earphone hole. The separation tolerance range may be determined according to a current insertion length range of the earphone relative to the earphone hole when the earphone is in a corresponding preset separation state relative to the earphone hole. For example, assuming that the longest insertion length of the earphone with respect to the earphone hole is 10mm, and the preset separation state is an insertion state, the separation tolerance range may be set to 9mm to 10mm, or the like. Assuming that the shortest insertion length of the earphone with respect to the earphone hole is 0mm, and the preset separation state is a pulled-out state, the separation tolerance range may be set to 0mm to 1mm, or the like.
Therefore, whether the current insertion length of the earphone relative to the earphone hole meets the set separation tolerance range or not is detected in real time, whether the earphone is in the preset separation state relative to the earphone hole or not is determined, and when the earphone is determined to be in the preset separation state relative to the earphone hole, the insertion length change of the earphone relative to the earphone hole is detected, so that the operation is simple, and the resource expense is saved.
Step S302: when the current insertion length meets the set pre-separation range, playing a multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relation between the set insertion length change interval and the multimedia file progress segment; the pre-separation range comprises a plurality of insertion length change intervals, and the target insertion length change interval is an insertion length change interval corresponding to the current insertion length.
Specifically, after detecting that the current insertion length of the earphone relative to the earphone hole is within the set pre-separation range, the terminal determines an insertion length change interval corresponding to the current insertion length, namely the target insertion length change interval, and plays the multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relationship between the set insertion length change interval and the multimedia file progress segment.
Here, the pre-separation range is used to represent a corresponding length variation range after the earphone is separated from the preset separation state to before entering the separation state with respect to the earphone hole, and when the current insertion length of the earphone with respect to the earphone hole is within the pre-separation range, it is determined that the earphone is not in the preset separation state with respect to the earphone hole and is in a process of transitioning to the separation state. For example, assuming that the preset separation state is an insertion state, if the current insertion length of the earphone with respect to the earphone hole is within a pre-separation range, the earphone is changed from the insertion state to a pull-out state with respect to the earphone hole. According to actual needs, the pre-separation range may be divided into a plurality of insertion length variation intervals, for example, the plurality of insertion length variation intervals may be divided into two insertion length variation intervals or four insertion length variation intervals. For example, assuming that the range before separation is 1mm to 9mm, the range before separation may be divided into 3 insertion length variation sections or 9 insertion length variation sections on average, or the like. The multimedia file can be continuous animation with a set number of frames or continuous audio with a set duration, and the multimedia file can be divided into a corresponding number of multimedia file progress sections according to the number of the insertion length change sections, so that the corresponding relation between the insertion length change sections and the multimedia file progress sections is obtained. For example, assuming that the multimedia file is a continuous 90-frame animation, and the pre-separation range includes 9 insertion length change intervals with the same length, the continuous 90-frame animation may be equally divided into 9 multimedia file progress segments, each multimedia file progress segment includes continuous 10-frame animation, and each insertion length change interval corresponds to one multimedia file progress segment, for example, a multimedia file progress segment formed from the 1 st frame animation to the 10 th frame animation corresponds to the 1 st insertion length change interval, a multimedia file progress segment formed from the 11 th frame animation to the 20 th frame animation corresponds to the 2 nd insertion length change interval, and so on, a multimedia file progress segment formed from the 81 th frame animation to the 90 th frame animation corresponds to the 9 th insertion length change interval. For the animation, the theme of the animation may be set according to actual needs, for example, the theme may be set as glass breaking, bamboo chopstick breaking, chocolate breaking, card breaking, or the like, and may also be set as glass combination, card combination, or the like.
In summary, in the multimedia file playing method provided in the above embodiment, after monitoring that an earphone is in a preset separation state with respect to an earphone hole, an insertion length change of the earphone, which represents the real-time separation state of the earphone with respect to the earphone hole, with respect to the earphone hole is detected in real time, and when it is determined that a current insertion length is within a preset pre-separation range, a multimedia file progress segment corresponding to an insertion length change interval corresponding to the current insertion length is played. Therefore, a plurality of insertion length change intervals and multimedia file progress sections corresponding to the insertion length change intervals respectively are arranged, different dynamic playing effects corresponding to different change rates of the current insertion length can be formed, the playing of the multimedia files can correspondingly show the real-time separation process of the earphone relative to the earphone hole, and the user experience is improved.
In an optional embodiment, when it is determined that the current insertion length satisfies the set pre-separation range, playing the multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relationship between the set insertion length change interval and the multimedia file progress segment, includes:
when the current insertion length meets the set pre-separation range, determining a corresponding current target insertion length change interval according to the current insertion length, and playing a multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relation between the set insertion length change interval and the multimedia file progress segment;
obtaining an updated current insertion length, determining a corresponding current target insertion length change interval according to the updated current insertion length when the updated current insertion length meets the pre-separation range, and if the current target insertion length change interval is the same as a previous target insertion length change interval, continuing to play a multimedia file progress segment which corresponds to the previous target insertion length change interval and is not played; and if the current target insertion length change interval is different from the previous target insertion length change interval, playing the multimedia file progress segment corresponding to the current target insertion length change interval according to the corresponding relation between the set insertion length change interval and the multimedia file progress segment.
It can be understood that, due to the influence of external factors such as the operating speed of the user, the insertion length of the earphone relative to the earphone hole may change in real time, so the insertion length of the earphone relative to the earphone hole acquired each time may not be the same, and accordingly, the currently acquired insertion length and the last acquired insertion length may be in different insertion length change intervals or may be in the same insertion length change interval. If the current target insertion length change interval is the same as the last target insertion length change interval, namely the currently acquired insertion length is in the same insertion length change interval as the last acquired insertion length, continuing to play the multimedia file progress segment which corresponds to the last target insertion length change interval and is not played; if the current target insertion length change interval is different from the last target insertion length change interval, namely the currently acquired insertion length is in a different insertion length change interval from the last acquired insertion length, stopping playing the multimedia file progress segment corresponding to the last target insertion length change interval, and playing the multimedia file progress segment corresponding to the current target insertion length change interval.
Here, when each multimedia file progress segment contains a plurality of continuous animation frames, the playing is generally started from the first animation frame of the multimedia file progress segment. For example, if a multimedia file progress segment includes 10 continuous animations, when the multimedia file progress segment needs to be played, the 1 st animation, the 2 nd animation, the 3 rd animation of the multimedia file progress segment are played in sequence, and so on.
Therefore, according to the relation between the target insertion length change interval corresponding to the current insertion length of the earphone relative to the earphone hole and the previous target insertion length change interval, the progress section of the played multimedia file is determined, the playing continuity of the multimedia file is guaranteed, and the user experience is improved.
In an optional embodiment, after the determining that the current insertion length satisfies the set pre-separation range and playing the multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relationship between the set insertion length change interval and the multimedia file progress segment, the method further includes:
and when the current insertion length is determined to meet the set separation range and the current insertion length is changed from the pre-separation range to the separation range, if the last target insertion length change interval is not the last insertion length change interval in the pre-separation range, playing the multimedia file progress segment corresponding to the last insertion length change interval according to the corresponding relation between the set insertion length change interval and the multimedia file progress segment.
Here, when the current insertion length satisfies a set separation range and the current insertion length changes from the pre-separation range to the separation range, it indicates that the earphone has entered a separation state with respect to the earphone hole, and if the last target insertion length change interval is the last insertion length change interval in the pre-separation range, the playing of the multimedia file progress segment corresponding to the last insertion length change interval is stopped; and if the last target insertion length change interval is not the last insertion length change interval in the range before separation, playing the multimedia file progress segment corresponding to the last insertion length change interval. It should be noted that, when the preset separation state is an insertion state, the insertion length corresponding to the pre-separation range is greater than the insertion length corresponding to the separation range. For example, it is assumed that the pre-separation range is 1mm to 9mm, and the separation range is less than 1 mm. And when the preset separation state is a pull-out state, the insertion length corresponding to the separation range is smaller than the insertion length corresponding to the separation range. For example, it is assumed that the pre-separation range is 1mm to 9mm, and the separation range is more than 9 mm.
It can be understood that, due to the influence of external factors such as the operation speed of the user, the insertion length of the earphone relative to the earphone hole may change faster, so that the last target insertion length change interval is not the last insertion length change interval in the pre-separation range, and the process from the preset separation state to the separation state of the first screen relative to the second screen is completely embodied by playing the multimedia file progress segment corresponding to the last insertion length change interval in the pre-separation range.
Therefore, when the current insertion length is determined to meet the set separation range and the current insertion length is determined to be changed from the range before separation to the separation range, and the last target insertion length change interval is not the last insertion length change interval in the range before separation, the multimedia file progress section corresponding to the last insertion length change interval is played, so that the process that the earphone is in the separation state from the preset separation state relative to the earphone hole is completely embodied, and the use experience of a user is further improved.
In an optional embodiment, the method further comprises:
and when the current insertion length is determined to meet the separation tolerance range and the current insertion length is determined to be changed from the pre-separation range to the separation tolerance range, stopping playing the currently played multimedia file progress segment.
Here, when the current insertion length satisfies the separation tolerance range and the current insertion length changes from the pre-separation range to the separation tolerance range, it indicates that the earphone is in a preset separation state again with respect to the earphone hole, and at this time, the multimedia file does not need to be played, so that the currently played multimedia file progress segment is stopped playing. The currently played multimedia file progress segment may be a multimedia file progress segment corresponding to a previous target insertion length change interval, where the previous target insertion length change interval may belong to the pre-separation range or the separation range.
Therefore, when the multimedia file does not need to be played, the playing of the currently played multimedia file progress segment is stopped, so that the condition that the parameter change to be detected of the first component relative to the second component is consistent with the playing state of the multimedia file is ensured, and the use experience of a user is further improved.
In an optional embodiment, when it is determined that the current insertion length satisfies the set pre-separation range, before playing the multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relationship between the set insertion length change interval and the multimedia file progress segment, the method further includes:
receiving a setting operation instruction carrying an insertion length separation tolerance value and an insertion length separation value;
determining the separation tolerance range, the pre-separation range and the separation range according to the insertion length separation tolerance value and the insertion length separation value in the setting operation instruction.
Here, the separation tolerance range, the pre-separation range, and the separation range are also different according to the difference in the preset separation state. Assuming that the preset separation state is an insertion state and the longest insertion length of the earphone with respect to the earphone hole is 10mm, the separation tolerance range may be from the insertion length separation tolerance value to 10mm, the pre-separation range may be from the insertion length separation value to the insertion length separation tolerance value, and the separation range may be less than the insertion length separation value. Assuming that the preset separation state is a pulled-out state and the longest insertion length of the earphone with respect to the earphone hole is 10mm, the separation tolerance range may be smaller than the insertion length separation tolerance value, the pre-separation range may be from the insertion length separation tolerance value to the insertion length separation value, and the separation range may be from the insertion length separation value to 10 mm.
It can be understood that the setting operation instruction may also carry a set multimedia file, and the pre-separation range is divided according to the number of default insertion length change intervals to obtain a plurality of insertion length change intervals, the multimedia file is divided according to the number of default insertion length change intervals to obtain a plurality of multimedia file progress segments, and then a corresponding relationship between the insertion length change intervals and the multimedia file progress segments is established. It should be noted that the setting operation instruction may also carry the number of the insertion length change intervals.
Therefore, the separation tolerance range, the pre-separation range, the separation range and the like can be configured according to actual needs, the mode is flexible, and the use experience of a user is further improved.
Application scenarios three
Referring to fig. 4, a multimedia file playing method provided in an optional specific embodiment of the present invention is based on application scenarios as follows: the first component is a data line, the second component is a data line hole, and the parameter to be measured is the insertion length of the data line relative to the data line hole. Referring to fig. 4, the multimedia file playing method provided in this embodiment includes the following steps:
step S401: after monitoring that a data line is in a preset separation state relative to a data line hole, detecting the insertion length change of the data line relative to the data line hole, wherein the insertion length change represents the real-time separation state of the data line relative to the data line hole;
step S402: when the current insertion length meets the set pre-separation range, playing a multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relation between the set insertion length change interval and the multimedia file progress segment; the pre-separation range includes a plurality of insertion length change sections, and the target insertion length change section is an insertion length change section corresponding to the current insertion length.
In summary, in the multimedia file playing method provided in the above embodiment, after the data line is monitored to be in the preset separation state relative to the data line hole, the insertion length change representing the real-time separation state of the data line relative to the data line hole is detected in real time, and when it is determined that the current insertion length is within the preset pre-separation range, the multimedia file progress segment corresponding to the insertion length change interval corresponding to the current insertion length is played. Therefore, the plurality of insertion length change intervals and the multimedia file progress sections corresponding to the insertion length change intervals respectively are arranged, so that different dynamic playing effects corresponding to different change rates of the current insertion length can be formed, the playing of the multimedia file can correspondingly show the real-time separation process of the data line relative to the data line hole, and the user experience is improved.
Those skilled in the art can understand that, compared with the above embodiments, the multimedia file playing method provided in the embodiments of the present invention is different only in application scenarios, and the method implementation process is the same, so that detailed description is not given to this embodiment, and the specific implementation process of this embodiment may refer to the above embodiments.
Application scenario four
Referring to fig. 5, a multimedia file playing method provided in an alternative specific embodiment of the present invention is based on the following scenarios: the first component is an SIM card, the second component is an SIM card hole, and the parameter to be measured is the insertion length of the user identification card relative to the user identification card hole. Referring to fig. 5, the multimedia file playing method provided in this embodiment includes the following steps:
step S501: after monitoring that an SIM card is in a preset separation state relative to an SIM card hole, detecting the insertion length change of the user identification card representing the real-time separation state of the SIM card relative to the SIM card hole relative to the user identification card hole;
step S502: when the current insertion length meets the set pre-separation range, playing a multimedia file progress segment corresponding to the target insertion length change interval according to the corresponding relation between the set insertion length change interval and the multimedia file progress segment; the pre-separation range comprises a plurality of insertion length change intervals, and the target insertion length change interval is an insertion length change interval corresponding to the current insertion length.
In summary, in the multimedia file playing method provided in the above embodiment, after the SIM card is monitored to be in the preset separation state with respect to the SIM card hole, the insertion length change representing the real-time separation state of the SIM card with respect to the SIM card hole is detected in real time, and when it is determined that the current insertion length is within the set pre-separation range, the multimedia file progress segment corresponding to the insertion length change interval corresponding to the current insertion length is played. Therefore, by setting a plurality of insertion length change intervals and multimedia file progress sections corresponding to the insertion length change intervals respectively, different dynamic playing effects corresponding to different change rates of the current insertion length can be formed, the playing of the multimedia files can correspondingly show the real-time separation process of the SIM card relative to the SIM card hole, and the user experience is improved.
Those skilled in the art can understand that, compared with the above embodiments, the multimedia file playing method provided in the embodiments of the present invention is different only in application scenarios, and the method implementation process is the same, so that detailed description is not given to this embodiment, and the specific implementation process of this embodiment may refer to the above embodiments.
In order to implement the foregoing method, a terminal is further provided according to an embodiment of the present invention, where the terminal has a first component and a second component that can be separated from each other, as shown in fig. 6, and the terminal includes:
the detection module 10 is configured to detect a change in a parameter to be detected, which represents a real-time separation state of the first component relative to the second component, after monitoring that the first component is in a preset separation state relative to the second component;
the processing module 11 is configured to play the multimedia file progress segment corresponding to the target parameter change interval to be tested according to the corresponding relationship between the set parameter change interval to be tested and the multimedia file progress segment when the current parameter to be tested meets the set pre-separation range; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
In summary, in the terminal provided in the above embodiment, after the first component is monitored to be in the preset separation state relative to the second component, the change of the parameter to be detected, which represents the real-time separation state of the first component relative to the second component, is detected in real time, and when it is determined that the current parameter to be detected is within the set pre-separation range, the multimedia file progress segment corresponding to the parameter change interval to be detected corresponding to the current parameter to be detected is played. Therefore, by setting a plurality of parameter change intervals to be detected and the multimedia file progress sections corresponding to the parameter change intervals to be detected respectively, different dynamic playing effects corresponding to different change rates of the current parameter to be detected can be formed, the playing of the multimedia file can correspondingly show the real-time separation process of the first component relative to the second component, and the user experience is improved.
In an optional embodiment, the detection module 10 is further configured to:
detecting whether the current parameter to be detected meets a set separation tolerance range;
and if the current parameter to be measured meets the separation tolerance range, determining that the first component is in a preset separation state relative to the second component.
Therefore, whether the current parameter to be measured of the first component relative to the second component meets the set separation tolerance range or not is detected in real time, so that whether the first component is in the preset separation state or not is determined, and the change of the parameter to be measured of the first component relative to the second component is detected only when the first component is determined to be in the preset separation state relative to the second component, so that the operation is simple, and the resource overhead is saved.
In an optional embodiment, the processing module 11 is further configured to:
and when the current parameter to be tested is determined to be changed from the pre-separation range to the separation tolerance range and the current parameter to be tested meets the separation tolerance range, stopping playing the currently played multimedia file progress segment.
Therefore, when the multimedia file does not need to be played, the playing of the currently played multimedia file progress segment is stopped, so that the condition that the parameter change to be detected of the first component relative to the second component is consistent with the playing state of the multimedia file is ensured, and the use experience of a user is further improved.
In an optional embodiment, the processing module 11 is specifically configured to:
when the current parameter to be tested meets the set pre-separation range, determining a corresponding current target parameter change interval to be tested according to the current parameter to be tested, and playing a multimedia file progress section corresponding to the target parameter change interval to be tested according to the corresponding relation between the set parameter change interval to be tested and the multimedia file progress section;
obtaining an updated current parameter to be tested, determining a corresponding current target parameter change interval to be tested according to the updated current parameter to be tested when the updated current parameter to be tested meets the pre-separation range, and if the current target parameter change interval to be tested is the same as the previous target parameter change interval to be tested, continuously playing a multimedia file progress section which corresponds to the previous target parameter change interval and is not played; and if the current target parameter change interval to be detected is different from the previous target parameter change interval to be detected, playing the multimedia file progress section corresponding to the current target parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
Therefore, according to the relation between the target parameter change interval to be measured corresponding to the current parameter to be measured of the first component relative to the second component and the last target parameter change interval to be measured, the progress section of the played multimedia file is determined, the playing continuity of the multimedia file is guaranteed, and the user experience is improved.
In an optional embodiment, the processing module 11 is further configured to:
and when the current parameter to be detected is determined to be changed from the pre-separation range to the set separation range and the current parameter to be detected meets the separation range, if the last target parameter change interval to be detected is not the last parameter change interval to be detected in the pre-separation range, playing a multimedia file progress section corresponding to the last parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
Therefore, when the current parameter to be measured meets the set separation range and the current parameter to be measured is determined to be from the pre-separation range to the separation range, and the last target parameter change interval to be measured is not the last parameter change interval to be measured in the pre-separation range, the multimedia file progress section corresponding to the last parameter change interval to be measured is played, so that the process from the first component to the second component to the preset separation state to the separation state is completely embodied, and the user experience is further improved.
It should be noted that: in the terminal provided in the foregoing embodiment, when the method for playing a multimedia file is implemented, the division of each program module is only used for illustration, and in practical applications, the processing allocation may be completed by different program modules according to needs, that is, the internal structure of the terminal is divided into different program modules, so as to complete all or part of the above-described processing. In addition, the terminal provided by the above embodiment and the corresponding multimedia file playing method embodiment belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and will not be described herein again.
In another embodiment, an embodiment of the present invention further provides a terminal having a first part and a second part which are relatively separable, as shown in fig. 7, the terminal including: a processor 310 and a memory 311 for storing computer programs capable of running on the processor 310; the processor 310 illustrated in fig. 7 is not used to refer to the number of the processors 310 as one, but is used only to refer to the position relationship of the processor 310 relative to other devices, and in practical applications, the number of the processors 310 may be one or more; similarly, the memory 311 shown in fig. 7 has the same meaning, i.e. it is only used to refer to the position relationship of the memory 311 with respect to other devices, and in practical applications, the number of the memory 311 may be one or more.
The processor 310 is configured to execute the following steps when executing the computer program:
after the first component is monitored to be in a preset separation state relative to the second component, detecting the change of a parameter to be detected, which represents the real-time separation state of the first component relative to the second component;
when the current parameter to be tested meets the set pre-separation range, playing a multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
detecting whether the current parameter to be detected meets a set separation tolerance range;
and if the current parameter to be measured meets the separation tolerance range, determining that the first component is in a preset separation state relative to the second component.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
and when the current parameter to be tested is determined to be changed from the pre-separation range to the separation tolerance range and the current parameter to be tested meets the separation tolerance range, stopping playing the currently played multimedia file progress segment.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
when the current parameter to be tested meets the set pre-separation range, determining a corresponding current target parameter change interval to be tested according to the current parameter to be tested, and playing a multimedia file progress section corresponding to the target parameter change interval to be tested according to the corresponding relation between the set parameter change interval to be tested and the multimedia file progress section;
obtaining an updated current parameter to be tested, determining a corresponding current target parameter change interval to be tested according to the updated current parameter to be tested when the updated current parameter to be tested meets the pre-separation range, and if the current target parameter change interval to be tested is the same as the previous target parameter change interval to be tested, continuously playing a multimedia file progress section which corresponds to the previous target parameter change interval and is not played; and if the current target parameter change interval to be detected is different from the previous target parameter change interval to be detected, playing the multimedia file progress section corresponding to the current target parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
In an alternative embodiment, the processor 310 is further configured to, when running the computer program, perform the following steps:
and when the current parameter to be detected is determined to be changed from the pre-separation range to the set separation range and the current parameter to be detected meets the separation range, if the last target parameter change interval to be detected is not the last parameter change interval to be detected in the pre-separation range, playing a multimedia file progress section corresponding to the last parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
In an optional embodiment, the first component is a first screen, the second component is a second screen, and the parameter to be measured is an angle.
In an alternative embodiment of the present invention,
the first component is an earphone, the second component is an earphone hole, and the parameter to be measured is the insertion length of the earphone relative to the earphone hole; or,
the first component is a data line, the second component is a data line hole, and the parameter to be measured is the insertion length of the data line relative to the data line hole; or,
the first part is a user identification card, the second part is a user identification card hole, and the parameter to be detected is the insertion length of the user identification card relative to the user identification card hole.
The terminal further includes: at least one network interface 312. The various components in the terminal are coupled together by a bus system 313. It will be appreciated that the bus system 313 is used to enable communications among the components connected. The bus system 313 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 313 in FIG. 7.
The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 311 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the terminal. Examples of such data include: any computer program for operation on the terminal, such as operating systems and application programs; contact data; telephone book data; a message; a picture; video, etc. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services. Here, the program that implements the method of the embodiment of the present invention may be included in an application program.
The present embodiment also provides a computer storage medium, in which a computer program is stored, where the computer storage medium may be a Memory such as a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); or may be a variety of devices including one or any combination of the above memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.
A computer storage medium having a computer program stored therein, the computer program, when executed by a processor, performing the steps of:
after the first component is monitored to be in a preset separation state relative to the second component, detecting the change of a parameter to be detected, which represents the real-time separation state of the first component relative to the second component;
when the current parameter to be tested meets the set pre-separation range, playing a multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
detecting whether the current parameter to be detected meets a set separation tolerance range;
and if the current parameter to be measured meets the separation tolerance range, determining that the first component is in a preset separation state relative to the second component.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
and when the current parameter to be tested is determined to be changed from the pre-separation range to the separation tolerance range and the current parameter to be tested meets the separation tolerance range, stopping playing the currently played multimedia file progress segment.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
when determining that the current parameter to be measured meets the set pre-separation range, determining a corresponding current target parameter change interval to be measured according to the current parameter to be measured, and playing a multimedia file progress section corresponding to the target parameter change interval to be measured according to the corresponding relation between the set parameter change interval to be measured and the multimedia file progress section;
obtaining an updated current parameter to be tested, determining a corresponding current target parameter change interval to be tested according to the updated current parameter to be tested when the updated current parameter to be tested meets the pre-separation range, and if the current target parameter change interval to be tested is the same as the previous target parameter change interval to be tested, continuously playing a multimedia file progress section which corresponds to the previous target parameter change interval and is not played; and if the current target parameter change interval to be detected is different from the previous target parameter change interval to be detected, playing the multimedia file progress section corresponding to the current target parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
and when the current parameter to be detected is determined to be changed from the pre-separation range to the set separation range and the current parameter to be detected meets the separation range, if the last target parameter change interval to be detected is not the last parameter change interval to be detected in the pre-separation range, playing a multimedia file progress section corresponding to the last parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
In an optional embodiment, the first component is a first screen, the second component is a second screen, and the parameter to be measured is an angle.
In an alternative embodiment of the present invention,
the first component is an earphone, the second component is an earphone hole, and the parameter to be measured is the insertion length of the earphone relative to the earphone hole; or,
the first component is a data line, the second component is a data line hole, and the parameter to be measured is the insertion length of the data line relative to the data line hole; or,
the first part is a user identification card, the second part is a user identification card hole, and the parameter to be detected is the insertion length of the user identification card relative to the user identification card hole.
The embodiment of the present invention is further described in detail by using a specific example, in this example, the terminal is a mobile phone, the first component is a first screen, the second component is a second screen, and the parameter to be measured is an angle. As shown in fig. 8, the terminal according to the embodiment of the present invention includes a central processing unit 20, a first screen 21, a second screen 22, an angle sensor 23, and a sound generating device 24; the angle sensor 23 is configured to detect an angle between the first screen 21 and the second screen 22 in real time, and report angle information to the central processing unit 20 in real time; the central processor 20 is configured to, when it is determined that a disintegration experience needs to be constructed according to the angle information, read a set animation resource and/or audio resource, display the animation resource through the first screen 21 or the second screen 22, and play the audio resource through the sound generating device 24.
The process of the terminal for playing the multimedia file comprises the following steps: when a scene displayed in a combined manner is established by the first screen 21 and the second screen 22, recording the angle information between the corresponding screens; when the angle changes, tracking and recording the change of the angle between the screens in real time; when the angle change reaches a threshold value, namely the combined display scene is in face of being disassembled, the disassembly experience is started to be constructed, wherein the disassembly experience comprises animations displayed on a screen and audio transmitted by audio equipment. For animation effect and audio effect, dynamic adjustment can be performed according to the speed and the size of angle change, so that the experience of a user on a scene is richer.
Here, it is first necessary to construct a simple mobile phone display system, where the first screen 21 and the second screen 22 rotate along the rotation axis, when the mobile phone is on the same horizontal plane, the mobile phone will establish a combined display, and the corresponding angle when the mobile phone is on the same horizontal plane is defined as 180 degrees, and when the first screen 21 and the second screen 22 rotate to a position where the difference between the angle and the 180 degrees is 30 degrees, that is, 150 degrees, it is defined that the combined display requirement is not met, and the mobile phone is changed into a single-screen display, and the other screen is switched to a black screen. When the mobile phone system is started, the current state of the mobile phone is judged for the first time. And if the current mobile phone is in the condition that the screen splicing combined display is established, starting to track the angle change in real time. And if the current mobile phone is not in the condition of screen splicing combined display establishment, starting to track angle change after the combined display is established.
The technology based on the Android mobile phone supporting the suspension layer window is widely used in the field of assisting the user in operation by similar systems. Firstly, a 100-frame fracture animation is prepared, the fracture animation starts to be transparent in most of contents, cracks in the middle part begin to appear and gradually deepen, fragments rapidly splash in the final stage, and the fracture animation is finished. Here, the animation playing speed is dynamically linked with the angle change, and it can be set that 100 frames of animation are completed between 179 degrees and 170 degrees of the mobile phone, as shown in fig. 9, each degree corresponds to 10 frames of animation, and 10 frames of animation are played once each degree is changed. However, since the operation speed of the user may be very fast, the change of the mobile phone from 180 degrees to 170 degrees is completed in only 0.1 second, which has the effect that the animation of 100 frames cannot be completely played. If the breaking animation is too delayed from the user operation, the user experience is greatly degraded. In order to solve the problem, the playing of animation frames is divided into intervals according to angles, each angle interval corresponds to 10 animation frames, the 10 animation frames in the corresponding angle interval are played after the angle change is identified, when the next angle value is reported, if the previous 10 animation frames are not played, the animation frames which are not played are automatically discarded, and the first frame of the 10 animation frames corresponding to the new angle is directly played. In addition, if the first reporting angle is 179 degrees, the animation of frame 1 starts to be played, and if the second reporting angle has arrived and the obtained angle is 140 degrees, which is much smaller than 170 degrees, the animation of the last 10 frames corresponding to 170 degrees, namely the animation of frames 91-100, is directly played, namely the final effect of fracture.
It should be noted that the final 10 frames of the fracturing animation are normally to be played completely to show the post-fracturing effect. However, it is also possible that the playing of the final 10-frame fracturing animation is interrupted. For example, the user repeatedly operates the mobile phone to be flat and very fast, which exceeds the speed of completely playing 10 frames of animation. If the last 10 complete animation frames are continuously played, the animation of the mobile phone is disconnected from the actual angle state of the mobile phone screen. In order to solve the problem, when the animation of the last 10 frames is played, if the reporting of the angle value between 171 degrees and 180 degrees is received, the playing of the animation of the last 10 frames is interrupted, and the animation corresponding to the current angle value is selected to be played.
Here, the above explains the playing of the breaking process of the breaking animation, and in the actual operation process, the breaking animation can also be used reversely, for example, broken fragments fly back to be spliced into a complete screen, so as to form the effect of establishing order. The breaking animation occurs when the relative position of the screen is adjusted, the content displayed in the full screen is switched to be displayed in the half screen at the time, and the time for switching the breaking animation and the screen mode is basically overlapped, so that the viewing of the screen content by a user is not actually influenced by the breaking animation. Further, the influence of the false triggering of the breaking animation is considered, because sometimes a slight shake of the screen may bring about a change in the angle. To solve this problem, the trigger angle of the fracturing animation may be changed from 179 degrees to 175 degrees, or other angles, so as to leave a margin for false triggering.
Meanwhile, the occurrence of breakage can be reflected by adopting sound effect. The sound effect can be embodied independently of the animation, for example, when the screen is black, the mobile phone system can only play the sound effect and not play the animation in a broken scene. In addition, sound effects may also be embodied in combination with animation. The break sound effect can be played when the last 10 frames of animations start to be displayed, if the report of the angle value between 171 and 180 degrees is received during the playing of the last 10 frames of animations, the sound effect playing is directly stopped, and the sound effect is played from the head synchronously until the next playing of the last 10 frames of animations, so that the synchronization of the sound effect and the animations is ensured.
Here, the break sound effect can be divided into a pre-break tone and a break tone, and referring to fig. 9 again, 170 degrees is defined as a break angle, 171 degrees to 179 degrees are defined as a pre-break angle, tone X is a pre-break tone, and tone Y is a break tone. And continuously playing the audio Y when the angle is within the range of 171-179 degrees, and playing the audio X when the angle is less than 170 degrees. The continuous playing audio Y can be the audio Y which is played circularly all the time when the angle is always 171-179 degrees in the continuous time period; playing the audio X once the angle below 170 degrees appears; and if the angle is 180 degrees, stopping playing the audio.
It should be noted that the sound effect and the animation itself can be combined or dispersed. Various fracture themes can be customized, such as glass breakage, breaking off of bamboo chopsticks, breaking off of rubber bands, breaking off of chocolate, breaking of cards, treading on of cat tails, and the like. Different breaking angles and breaking sound effects can be used for different breaking themes. As shown in fig. 10 and 11, the user may also be provided with an animation and audio setting interface to set a desired fracture angle, pre-fracture animation and/or audio, and fracture animation and/or audio, etc.
In order to better explain the relationship between the angle information and the animation, the following description is given by a micro-deformation tolerance range, a micro-deformation tolerance upper limit, a pre-fracture range, a fracture angle, and an angle for forcibly stopping animation playing. Assume that the micro-deformation tolerance range is 179-178 degrees, the upper limit of the micro-deformation tolerance is 178 degrees, the pre-fracture range is 177-171 degrees, the fracture angle is 170 degrees, and the angle for forcibly stopping the animation playback is 150 degrees. When the angle is within the micro-deformation tolerance range, order establishment animation and order establishment audio can be played; when the angle is within the range before fracture, playing corresponding animation before fracture and audio before fracture; and when the angle is between the fracture angle and the playing stopping angle, playing the corresponding fracture animation and the fracture audio. If the user bends the mobile phone slowly, the first reported angle is 179 degrees, and at this time, the deformation of the mobile phone is judged to be slight deformation, and the bending special effect does not need to be played. And then reporting that the angle is 175 degrees, judging that the mobile phone is likely to enter the bending process, and displaying an animation effect corresponding to 175 degrees. If the user continues to bend, the animation resources of the corresponding angle are displayed at the corresponding angle. When the angle reaches or is lower than 170 degrees, the animation corresponding to 170 degrees is played. When the angle is smaller than 150 degrees, the bending special effects exceed the playing time, and all the bending special effects are stopped.
The multimedia file playing method can also be applied to scenes such as earphone extraction, data line extraction, SIM card extraction and the like. Besides audio and animation, elements such as smell and light can also be used as prompt objects to show the angle change process, for example, the angle change process can be realized through the display color and the flashing frequency of an LED lamp.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. The scope of the invention is to be determined by the scope of the appended claims.

Claims (10)

1. A multimedia file playing method applied to a terminal having a first component and a second component which can be relatively separated, the method comprising:
after the first component is monitored to be in a preset separation state relative to the second component, detecting the change of a parameter to be detected, which represents the real-time separation state of the first component relative to the second component;
when the current parameter to be tested meets the set pre-separation range, playing a multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section; the different parameter change intervals to be tested correspond to different multimedia file progress sections, and the change of the multimedia file progress sections shows the real-time separation process of the first component relative to the second component; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
2. The method of claim 1, wherein prior to said monitoring that said first component is in a predetermined separated state relative to said second component, further comprising:
detecting whether the current parameter to be detected meets a set separation tolerance range;
and if the current parameter to be measured meets the separation tolerance range, determining that the first component is in a preset separation state relative to the second component.
3. The method according to claim 2, wherein after playing the multimedia file progress segment corresponding to the target parameter change interval to be measured, the method further comprises:
and when the current parameter to be tested is determined to be changed from the pre-separation range to the separation tolerance range and the current parameter to be tested meets the separation tolerance range, stopping playing the currently played multimedia file progress segment.
4. The method according to claim 1, wherein when it is determined that the current parameter to be measured satisfies the set pre-separation range, playing the multimedia file progress segment corresponding to the target parameter change interval to be measured according to the corresponding relationship between the set parameter change interval to be measured and the multimedia file progress segment, comprises:
when the current parameter to be tested meets the set pre-separation range, determining a corresponding current target parameter change interval to be tested according to the current parameter to be tested, and playing a multimedia file progress section corresponding to the target parameter change interval to be tested according to the corresponding relation between the set parameter change interval to be tested and the multimedia file progress section;
obtaining an updated current parameter to be tested, determining a corresponding current target parameter change interval to be tested according to the updated current parameter to be tested when the updated current parameter to be tested meets the pre-separation range, and if the current target parameter change interval to be tested is the same as the previous target parameter change interval to be tested, continuously playing a multimedia file progress section which corresponds to the previous target parameter change interval and is not played; and if the current target parameter change interval to be detected is different from the previous target parameter change interval to be detected, playing the multimedia file progress section corresponding to the current target parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
5. The method according to claim 1, wherein after the step of playing the multimedia file progress segment corresponding to the target parameter change interval to be tested according to the corresponding relationship between the set parameter change interval to be tested and the multimedia file progress segment when determining that the current parameter to be tested satisfies the set pre-separation range, the method further comprises:
and when the current parameter to be detected is determined to be changed from the pre-separation range to the set separation range and the current parameter to be detected meets the separation range, if the last target parameter change interval to be detected is not the last parameter change interval to be detected in the pre-separation range, playing a multimedia file progress section corresponding to the last parameter change interval to be detected according to the corresponding relation between the set parameter change interval to be detected and the multimedia file progress section.
6. The method of any one of claims 1 to 5, wherein the first component is a first screen, the second component is a second screen, and the parameter to be measured is an angle.
7. The method according to any one of claims 1 to 5,
the first component is an earphone, the second component is an earphone hole, and the parameter to be measured is the insertion length of the earphone relative to the earphone hole; or,
the first component is a data wire, the second component is a data wire hole, and the parameter to be measured is the insertion length of the data wire relative to the data wire hole; or,
the first part is a user identification card, the second part is a user identification card hole, and the parameter to be detected is the insertion length of the user identification card relative to the user identification card hole.
8. A terminal having first and second relatively separable parts, comprising:
the detection module is used for detecting the change of a parameter to be detected representing the real-time separation state of the first component relative to the second component after monitoring that the first component is in a preset separation state relative to the second component;
the processing module is used for playing the multimedia file progress section corresponding to the target parameter change section to be tested according to the corresponding relation between the set parameter change section to be tested and the multimedia file progress section when the current parameter to be tested meets the set pre-separation range; the different parameter change intervals to be tested correspond to different multimedia file progress sections, and the change of the multimedia file progress sections shows the real-time separation process of the first component relative to the second component; the pre-separation range comprises a plurality of set parameter change intervals to be detected, and the target parameter change interval to be detected is a parameter change interval to be detected corresponding to the current parameter to be detected.
9. A terminal, characterized in that the terminal comprises a processor and a memory for storing a computer program capable of running on the processor; wherein,
the processor is configured to execute the multimedia file playing method according to any one of claims 1 to 7 when the computer program is executed.
10. A computer storage medium, in which a computer program is stored, and which, when executed by a processor, implements the multimedia file playing method according to any one of claims 1 to 7.
CN201811222656.2A 2018-10-19 2018-10-19 Multimedia file playing method, terminal and computer storage medium Active CN111083275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811222656.2A CN111083275B (en) 2018-10-19 2018-10-19 Multimedia file playing method, terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811222656.2A CN111083275B (en) 2018-10-19 2018-10-19 Multimedia file playing method, terminal and computer storage medium

Publications (2)

Publication Number Publication Date
CN111083275A CN111083275A (en) 2020-04-28
CN111083275B true CN111083275B (en) 2022-05-13

Family

ID=70309290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811222656.2A Active CN111083275B (en) 2018-10-19 2018-10-19 Multimedia file playing method, terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN111083275B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0635408A (en) * 1992-07-21 1994-02-10 Sony Corp Fixing circuit for horizontal screen position
CN101788850A (en) * 2009-01-09 2010-07-28 三星电子株式会社 Mobile terminal having foldable display and operation method for the same
CN102819379A (en) * 2011-06-10 2012-12-12 深圳市快播科技有限公司 Playing method for multi-media information and multi-media player
CN105096977A (en) * 2015-08-24 2015-11-25 来安县新元机电设备设计有限公司 Control method for multimedia playing and mobile terminal
CN106502641A (en) * 2016-09-18 2017-03-15 北京小鸟看看科技有限公司 The display packing of the start-up picture of VR equipment and wear-type 3D display
CN107831993A (en) * 2017-10-24 2018-03-23 广东欧珀移动通信有限公司 Control method for playing back, device, terminal and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9916069B2 (en) * 2014-09-04 2018-03-13 Microsoft Technology Licensing, Llc User interface with dynamic transition times

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0635408A (en) * 1992-07-21 1994-02-10 Sony Corp Fixing circuit for horizontal screen position
CN101788850A (en) * 2009-01-09 2010-07-28 三星电子株式会社 Mobile terminal having foldable display and operation method for the same
CN102819379A (en) * 2011-06-10 2012-12-12 深圳市快播科技有限公司 Playing method for multi-media information and multi-media player
CN105096977A (en) * 2015-08-24 2015-11-25 来安县新元机电设备设计有限公司 Control method for multimedia playing and mobile terminal
CN106502641A (en) * 2016-09-18 2017-03-15 北京小鸟看看科技有限公司 The display packing of the start-up picture of VR equipment and wear-type 3D display
CN107831993A (en) * 2017-10-24 2018-03-23 广东欧珀移动通信有限公司 Control method for playing back, device, terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN111083275A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN110062284B (en) Video playing method and device and electronic equipment
CN108776565B (en) Animation display method and device, electronic equipment and storage medium
CN108230428B (en) E-book rendering method, electronic equipment and storage medium based on augmented reality
US10560752B2 (en) Apparatus and associated methods
CN114157893B (en) Method and device for synchronously playing videos among multiple devices
CN108877848B (en) Method and device for responding to user operation in virtual three-dimensional room speaking mode
WO2016202177A1 (en) Caller and callee information exchange method and apparatus
CN107484018B (en) A kind of video interception method, mobile terminal
CN111179923B (en) Audio playing method based on wearable device and wearable device
CN106980482B (en) Information display method and first electronic equipment
US20170169857A1 (en) Method and Electronic Device for Video Play
US20240013466A1 (en) Method and device for controlling boot display, and non-volatile computer-readable storage medium
US9325776B2 (en) Mixed media communication
CN109788212A (en) A kind of processing method of segmenting video, device, terminal and storage medium
JP2018517195A (en) Multimedia information processing method, apparatus and system, and computer storage medium
CN109144642B (en) Display control method, display control device, electronic equipment and storage medium
WO2021052130A1 (en) Video processing method, apparatus and device, and computer-readable storage medium
CN109831688A (en) A kind of video suspension playback method and device based on iOS system
CN113763919B (en) Video display method, device, computer equipment and storage medium
CN111083275B (en) Multimedia file playing method, terminal and computer storage medium
CN114296669A (en) Display device
EP3633587B1 (en) An apparatus and associated methods for presentation of comments
WO2018112720A1 (en) Method and apparatus for adjusting playback interface
CN107347149A (en) A kind of suspension display method, virtual reality device and storage medium
CN116527980A (en) Animation playing method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant