Electronic device comprising flexible display and storing video for variable screen sizes
An electronic device is provided. The electronic device includes a memory, a display having a flexible structure, at least one sensor configured to detect a change in screen size of the display, and at least one processor connected to the memory, the display, and the at least one sensor, wherein the memory is configured to store instructions that, when executed, cause the at least one processor to record a video of a screen of the display, based on a reference screen size equal to or greater than an actual screen size, and store a video in which a dummy area corresponding to a difference between the actual screen size and the reference screen size is cropped from the recorded video.
1 . An electronic device comprising:
a housing including a first housing part and a second housing part configured to movably engage with the first housing part between a retracted position and an extended position;
a flexible display coupled to the first housing part and the second housing part such that a size of an area of the flexible display that is visible from a front side of the housing changes as the housing is moved between the retracted position and the extended position;
at least one sensor;
at least one processor; and
memory storing instructions that, when executed by the at least one processor, cause the electronic device to:
record a video for screens displayed on the area of the flexible display, based on a maximum size of the area,
detect, through the at least one sensor, the size of the area during recording of the video,
after recording of the video is completed, identify whether the size of the area has been changed from a first size to a second size less than or equal to the maximum size during recording of the video,
if the size of the area has been changed from the first size to the second size, store a first video from the recorded video based on the maximum size of the area, and
if the size of the area has not been changed, store a second video from the recorded video based on the first size of the area.
2 . The electronic device of claim 1 , wherein the second video is a video in which a dummy area corresponding to a difference between the size of the area and the maximum size of the area is cropped from the recorded video.
3 . The electronic device of claim 2 , wherein the instructions further cause the electronic device to:
identify the dummy area in the recorded video, based on the difference between the size of the area and the maximum size of the area;
crop the dummy area from the recorded video; and
store the second video in which the dummy area is cropped from the recorded video.
4 . The electronic device of claim 2 , wherein the instructions further cause the electronic device to:
in case that a partial recording area is configured on the area of the flexible display, store a video in which an area other than the partial recording area is additionally cropped from the recorded video.
5 . The electronic device of claim 1 , wherein the instructions further cause the electronic device to:
change a screen ratio in response to a change in sizes of the area of the flexible display,
record the video for the screens displayed on the area of the flexible display based on the maximum size and a first screen ratio,
store the first video based on the maximum size of the area and the first screen ratio, and
store the second video based on the size of the area and a second screen ratio.
6 . The electronic device of claim 1 , wherein the instructions further cause the electronic device to:
in case that the electronic device is in a low power state, display a notification window indicating that a reduction or an expansion of the area is not possible.
7 . The electronic device of claim 1 , wherein the instructions further cause the electronic device to:
in case that the electronic device is in a low power state, perform recording based on the size of the area without changing the size of the area.
8 . An electronic device comprising:
a housing including a first housing part and a second housing part configured to movably engage with the first housing part between a retracted position and an extended position;
a flexible display coupled to the first housing part and the second housing part such that a size of an area of the flexible display that is visible from a front side of the housing changes as the housing is moved between the retracted position and the extended position;
at least one sensor;
at least one processor; and
memory storing instructions that, when executed by the at least one processor, cause the electronic device to:
receive a request to reproduce a video in which screens, displayed on the area of the flexible display, are recorded,
identify whether a size of the area has been changed from a first size to a second size less than or equal to a maximum size during recording of the video based on frames in the video,
if the size of the area has been changed from the first size to the second size during recording of the video, reproduce the video, based on the maximum size of the area to display the reproduced video on the flexible display, and
if the size of the area is not changed during recording of the video, reproduce the video based on the first size of the area to display the reproduced video on the flexible display.
9 . The electronic device of claim 8 , wherein, in case that sizes of the frames in the video have been fixed, the instructions further cause the electronic device to:
identify that a size of the video is identical to the fixed sizes, and
display the video based on a comparison between the maximum size of the area and the size of the video.
10 . The electronic device of claim 8 , wherein the instructions further cause the electronic device to:
detect a change in the size of the area through the at least one sensor while the reproduction is performed; and
reproduce and display the video, based on the changed size of the area and a size of the video.
11 . The electronic device of claim 8 , wherein, in case that sizes of the frames in the video have been changed, the instructions further cause the electronic device to:
identify that a size of the video is identical to maximum size among sizes of the frames in the video, and
display the video based on a comparison between the maximum size of the area and the size of the video.
12 . The electronic device of claim 8 , wherein, in case that sizes of the frames in the video have been changed, the instructions further cause the electronic device to:
change the size of the area of the flexible display to correspond to a change in sizes of frames in the video, and
display the video through the resized area of the flexible display.
13 . The electronic device of claim 8 , wherein the instructions further cause the electronic device to:
in case that the electronic device is in a low power state, display a notification window indicating that a reduction or an expansion of the area is not possible.
14 . The electronic device of claim 8 , wherein the instructions further cause the electronic device to:
in case that the electronic device is in a low power state, perform recording based on the size of the area without changing the size of the area.
15 . The electronic device of claim 8 , wherein the instructions further cause the electronic device to:
display frames of the video on the flexible display while changing a screen size of the flexible display to a first size, a second size, and then a third size to correspond to a screen size change history of the area during the recording.