The content of the invention
In order to solve the problems, such as that the display of recording time point is inaccurate in correlation technique, an embodiment of the present invention provides a kind of straightBroadcast the method for recording, device and computer-readable storage medium of video.The technical solution is as follows:
First aspect according to embodiments of the present invention, there is provided a kind of method for recording of live video, applied to first terminal,The described method includes:
The live video played in the live page shown by server to the first terminal is recorded, andThe first limitation duration, described first a length of maximum that can be recorded to live video when limiting are obtained from the serverDuration;
According to the described first limitation duration, the recording time point of the live video is shown;
When detecting the refreshing instruction of the live page, refresh the live page, and after Flushing success, from instituteState the recording duration that the live video is obtained in server;
According to the described first limitation duration and the recording duration of the live video, continue the recording to the live videoTime point is shown.
Alternatively, it is described according to the described first limitation duration, the recording time point of the live video is shown, is wrappedInclude:
Described first limitation duration is shown with order timing mode or inverted order timing mode, it is described live to showThe recording time point of video;
Correspondingly, it is described according to the described first limitation duration and the recording duration of the live video, continue to described straightThe recording time point for broadcasting video shown, including:
When the described first limitation duration is shown with order timing mode, since the recording duration of the live videoThe first limitation duration is shown to order timing mode, to continue to show the recording time point of the live video;
When the described first limitation duration is shown with inverted order timing mode, the described first limitation duration is subtracted described straightThe recording duration of video is broadcast, obtains the second limitation duration, the described second limitation duration is shown with inverted order timing mode, withContinue to show the recording time point of the live video.
Alternatively, the method further includes:
The recording duration of the live video is obtained from the server every the first preset duration;
According to the described first limitation duration and the recording duration of the live video, again to the recording of the live videoTime point is shown.
Alternatively, the live video played in the live page shown by server to the first terminalRecorded, and the first limitation duration is obtained from the server, including:
When the record command of the live video played in the live page for detecting display, by the second preset durationShown with order timing mode or inverted order timing mode;
When being not detected by recording cancellation instruction during showing second preset duration, by server to instituteState the live video played in live page to be recorded, and the first limitation duration is obtained from the server.
Alternatively, the live video played in the live page shown by server to the first terminalRecorded, and the first limitation duration is obtained from the server, including:
When the record command of the live video played in the live page for detecting display, sent to second terminalInquiry message is recorded, inquires that message returns to acceptance message according to described record by the second terminal, the second terminal is made a livingThe terminal of the live video played into the live page;
When receiving the acceptance message that the second terminal is sent, by server to being broadcast in the live pageThe live video put is recorded, and the first limitation duration is obtained from the server.
Second aspect according to embodiments of the present invention, there is provided a kind of record device of live video, applied to first terminal,Described device includes:
First acquisition module is straight for being played in the live page that is shown by server to the first terminalVideo is broadcast to be recorded, and from the server obtain first limitation duration, it is described first limitation when it is a length of can be to describedThe maximum duration that live video is recorded;
First display module, for according to the described first limitation duration, being carried out to the recording time point of the live videoDisplay;
Second acquisition module, for when detecting the refreshing instruction of the live page, refreshing the live page, andAfter Flushing success, the recording duration of the live video is obtained from the server;
Second display module, for the recording duration according to the described first limitation duration and the live video, continues pairThe recording time point of the live video is shown.
Alternatively, first display module includes:
First display sub-module, for the described first limitation duration to be carried out with order timing mode or inverted order timing modeIt has been shown that, to show the recording time of live video point;
Correspondingly, second display module includes:
Second display sub-module, for when described first limitation duration be show with order timing mode when, from it is described directlyThe recording duration for broadcasting video starts to be shown to the first limitation duration with order timing mode, to continue to show described live regardThe recording time point of frequency;
3rd display sub-module, for when the described first limitation duration is shown with inverted order timing mode, by described theOne limitation duration subtracts the recording duration of the live video, obtains the second limitation duration, by the described second limitation duration withSequence timing mode is shown, to continue to show the recording time point of the live video.
Alternatively, described device further includes:
3rd acquisition module, for obtaining the recording of the live video from the server every the first preset durationDuration;
3rd display module, it is again right for the recording duration according to the described first limitation duration and the live videoThe recording time point of the live video is shown.
Alternatively, first acquisition module includes:
4th display sub-module, for referring to when the recording of the live video played in the live page for detecting displayWhen making, the second preset duration is shown with order timing mode or inverted order timing mode;
First acquisition submodule, refers to for that ought be not detected by recording cancellation during second preset duration is shownWhen making, the live video played in the live page is recorded by server, and is obtained from the serverTake the first limitation duration.
Alternatively, first acquisition module includes:
Sending submodule, for when the record command of the live video played in the live page for detecting displayWhen, sent to second terminal and record inquiry message, inquire that message returns to acceptance message according to described record by the second terminal,The second terminal is the terminal of the live video played in the generation live page;
Second acquisition submodule, for when receiving the acceptance message that the second terminal is sent, passing through server pairThe live video played in the live page is recorded, and the first limitation duration is obtained from the server.
The third aspect according to embodiments of the present invention, there is provided a kind of device, described device include processor, memory andThe program code that can be run on the memory and on the processor is stored in, the processor performs said program codeMethod described in the above-mentioned first aspects of Shi Shixian.
Fourth aspect according to embodiments of the present invention, there is provided a kind of computer-readable recording medium, the storage mediumOn the step of being stored with instruction, the method described in above-mentioned first aspect is realized when described instruction is executed by processor.
The beneficial effect that technical solution provided in an embodiment of the present invention is brought is:
In embodiments of the present invention, played in the live page that can be shown by server to first terminal straightBroadcast video to be recorded, and the first limitation duration is obtained from the server, according to the first limitation duration, to the live videoRecording time point is shown.Afterwards, when first terminal detects the refreshing instruction of the live page, it is live that this can be refreshedThe page, and after Flushing success, the recording duration of the live video is obtained from server, then according to the first limitation duration andThe recording duration of the live video, continues to show the recording time point of the live video.Due to the live video be byWhat server was recorded, therefore the recording time length ratio of the live video that first terminal is got from server is more accurate,Thus first terminal is according to the first limitation duration and the recording duration of the live video, the recording time of the live video of displayThe accuracy of point is higher.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present inventionFormula is described in further detail.
Before detailed explanation is carried out to the embodiment of the present invention, first to the present embodiments relate to application scenariosIt is introduced.
With the development of electronic technology, viewing live video is increasingly becoming the activity enjoyed a lot in people's daily entertainment.User often records live video during live video is watched, to continue to see after liveSee recorded video.In correlation technique, terminal can be recorded live video by server, and terminal can basisThe recording limitation duration obtained from server shows the recording time point of the live video.And in the process, such asFruit terminal-pair live page is refreshed, then after Flushing success, terminal will not show the recording time point of the live video again,Or continue to show the recording time point that can show before refreshing of terminal, due to carrying out refreshing needs to live pageCertain time, and live video plays in real time, therefore the recording time point of the live video shown before refreshing is with refreshingAfter the completion of live video reality recording time point and differ, so as to cause the recording time point that terminal is shown at this time to be not allowedReally.For this reason, the present invention provides a kind of method for recording of live video, accurately to show the recording time of live video point.
Next will describe in detail with reference to attached drawing to the method for recording of live video provided in an embodiment of the present invention.
Fig. 1 is a kind of flow chart of the method for recording of live video provided in an embodiment of the present invention.As shown in Figure 1, usingIn first terminal, this method comprises the following steps:
Step 101:The live video played in the live page shown by server to first terminal is recordedSystem, and from the server obtain first limitation duration, first limitation when it is a length of can to the live video record maximum whenIt is long.
Step 102:According to the first limitation duration, the recording time point of live video is shown.
Step 103:When detecting the refreshing instruction of the live page, refresh the live page, and after Flushing success,The recording duration of the live video is obtained from the server.
Step 104:According to the first limitation duration and the recording duration of the live video, continue the recording to the live videoTime point is shown.
In embodiments of the present invention, played in the live page that can be shown by server to first terminal straightBroadcast video to be recorded, and the first limitation duration is obtained from the server, according to the first limitation duration, to the live videoRecording time point is shown.Afterwards, when first terminal detects the refreshing instruction of the live page, it is live that this can be refreshedThe page, and after Flushing success, the recording duration of the live video is obtained from server, then according to the first limitation duration andThe recording duration of the live video, continues to show the recording time point of the live video.Due to the live video be byWhat server was recorded, therefore the recording time length ratio of the live video that first terminal is got from server is more accurate,Thus first terminal is according to the first limitation duration and the recording duration of the live video, the recording time of the live video of displayThe accuracy of point is higher.
Alternatively, according to the first limitation duration, the recording time point of the live video is shown, including:
First limitation duration is shown with order timing mode or inverted order timing mode, to show the live videoRecording time point;
Correspondingly, according to the first limitation duration and the recording duration of the live video, the recording to the live video is continuedTime point shown, including:
When the first limitation duration is shown with order timing mode, with order since the recording duration of the live videoTiming mode is shown to the first limitation duration, to continue to show the recording time point of the live video;
When the first limitation duration is shown with inverted order timing mode, the first limitation duration is subtracted to the record of the live videoDuration processed, obtains the second limitation duration, the second limitation duration is shown with inverted order timing mode, to continue to show that this is liveThe recording time point of video.
Alternatively, this method further includes:
The recording duration of the live video is obtained from the server every the first preset duration;
According to the first limitation duration and the recording duration of the live video, the recording time of the live video is clicked through againRow display.
Alternatively, the live video played in the live page shown by server to first terminal is recordedSystem, and the first limitation duration is obtained from server, including:
When the record command of the live video played in the live page for detecting display, by the second preset durationShown with order timing mode or inverted order timing mode;
It is live to this by server when being not detected by recording cancellation instruction during showing the second preset durationThe live video played in the page is recorded, and the first limitation duration is obtained from the server.
Alternatively, the live video played in the live page shown by server to first terminal is recordedSystem, and the first limitation duration is obtained from server, including:
When the record command of the live video played in the live page for detecting display, sent to second terminalInquiry message is recorded, inquires that message returns to acceptance message according to the recording by second terminal, second terminal is to generate the live pageThe terminal of the live video played in face;
It is live to what is played in live page by server when receiving the acceptance message of second terminal transmissionVideo is recorded, and the first limitation duration is obtained from server.
Above-mentioned all optional technical solutions, can form the alternative embodiment of the present invention according to any combination, and the present invention is realExample is applied no longer to repeat this one by one.
Fig. 2A is a kind of flow chart of the method for recording of live video provided in an embodiment of the present invention.The embodiment of the present invention willExpansion discussion is carried out to the embodiment that Fig. 1 is provided with reference to Fig. 2A.As shown in Figure 2 A, this method comprises the following steps:
Step 201:What is played in the live page that first terminal shows first terminal by server live regardsFrequency is recorded, and the first limitation duration is obtained from the server.
It should be noted that a length of maximum duration that the live video can be recorded during the first limitation, i.e., by thisThe duration for the video that the recording of live video obtains is up to the first limitation duration, such as first limitation duration can be 5 minutes, 8Minute, 10 minutes etc..
Specifically, when the record command of the live video played in the live page that first terminal detects displayWhen, directly the live video played in the live page can be recorded by server, and is obtained from serverTake the first limitation duration.
It should be noted that record command is the finger of the live video for indicating playing in the recording live pageOrder.The record command can be triggered by the user of first terminal, and the user of first terminal can specify behaviour by firstTriggered, the first specified operation can be clicking operation, slide, voice operating etc..Alternatively, the record command also may be usedTo be triggered automatically by first terminal, as first terminal can be of the invention in specific time automatic trigger record commandEmbodiment is not construed as limiting this.
Certainly, in practical application, step 201 can also be realized otherwise, for example, step 201 realizes processIt can also include following three kinds of implementations:
The first implementation:When the record of the live video played in the live page that first terminal detects displayDuring system instruction, the second preset duration is shown with order timing mode or inverted order timing mode, when default in display secondWhen recording is not detected by during duration cancelling instruction, by server to the live video that is being played in the live pageRecorded, and the first limitation duration is obtained from server.
Further, when first terminal is detecting that recording cancellation instructs during showing the second preset duration, neglectThe slightly record command, i.e., do not record the live video played in the live page.
It should be noted that the second preset duration can be configured in advance according to different demands, when being preset such as secondLength can be 5 seconds, 10 seconds, 15 seconds etc..
Cancel instruction in addition, recording as indicating to cancel the finger for recording the live video played in the live pageOrder, which, which cancels instruction, to be triggered by the user of first terminal, and the user of first terminal can refer to by secondFixed operation is triggered, and the second specified operation can be clicking operation, slide, voice operating etc..
Furthermore order timing mode is from zero timing to the second preset duration, for example, the second preset duration is 10 seconds, is incited somebody to actionSecond preset duration is shown as being shown to since 0 second 10 seconds with order timing mode, i.e., show successively 0 second, 1 second, 2Second ... 8 seconds, 9 seconds, 10 seconds.Inverted order timing mode is from the second preset duration timing to zero, for example, the second preset duration is 10Second, the second preset duration is shown as being shown to since 10 seconds 0 second with inverted order timing mode, i.e., show successively 10 seconds, 9Second, 2 seconds, 1 second, 0 second 8 seconds ....
For example, the second preset duration is 10 seconds, and the second preset duration is shown with inverted order timing mode, it is assumed that useThe recording button in live page is clicked on to trigger record command in family, when detecting the record command in the live page,The countdown of 10 seconds can be shown in the live page, it is assumed that the cancellation during user does not click on the live page in this 10 secondsRecord button and cancel instruction to trigger to record, then first terminal can be by server to being played in the live page at this timeLive video recorded, and from server obtain first limitation duration.
It should be noted that in embodiments of the present invention, broadcast when in the live page that first terminal detects displayDuring the record command for the live video put, the second preset duration can be shown with order timing mode or inverted order timing modeShowing, the user of first terminal can be known according to the second preset duration of display starts the time for recording the live video, and thenRecording preparation can be carried out before starting to record the live video, can be brought to the user of first terminal and preferably use bodyTest.And, can be to straight if being not detected by recording cancels instruction during first terminal shows the second preset durationBroadcast video to be normally carried out recording, if detecting that instruction is cancelled in recording, the record command can be ignored, i.e., this live is not regardedFrequency is recorded.In this way, can be after the record command of the live video be triggered, it is also possible that user is in the second preset durationInternal trigger, which is recorded, cancels instruction, to cancel the recording to the live video, improves the flexibility of recording live video and accurateProperty.
Second of implementation:When the record of the live video played in the live page that first terminal detects displayDuring system instruction, sent to second terminal and record inquiry message, when receiving the acceptance message of second terminal transmission, pass through serviceDevice records the live video played in the live page, and the first limitation duration is obtained from server.
Further, when first terminal, which receives second terminal, sends refuse information, ignore the record command, i.e., it is not rightThe live video played in the live page is recorded.
It should be noted that second terminal is to generate the terminal of the live video played in the live page, for example,When the live page is direct broadcasting room, second terminal can be the terminal that the main broadcaster of the direct broadcasting room uses.
In addition, recording inquiry message, for first terminal, asked whether to second terminal can be to broadcasting in the live pageThe message that the live video put is recorded, as recording inquiry message can as shown in Figure 2 B, including " user XX is wanted to youLive video recorded, if agree to", agree to button and refusal button.Acceptance message is straight to this to agree to first terminalThe message that the live video played in the page is recorded is broadcast, if the acceptance message can be that user clicks on as shown in Figure 2 BRecording inquiry message in agreement button after the message that triggers.Refuse information for refusal first terminal in the live page justCan be that the recording that user clicks on as shown in Figure 2 B is inquired in the message that the live video of broadcasting is recorded, such as refuse informationThe message triggered after refusal button in message.
Further, after first terminal is sent to second terminal records inquiry message, second terminal can receive the recordSystem inquiry message, afterwards, second terminal can show that message is inquired in the recording, and same when being detected in recording inquiry messageDuring message of anticipating, the acceptance message is sent to first terminal, when detecting refuse information in inquiring message in the recording, to firstTerminal sends the refuse information.
What deserves to be explained is since the live video played in the live page is by the live of second terminal generationVideo, therefore second terminal possesses the recording authority of the live video, that is to say, if the user of first terminal want it is straight to thisBroadcast video to be recorded, then need to be recorded after obtaining user's agreement of second terminal.Thus when first terminal detectsDuring the record command of the live video played into the live page of display, recording inquiry can be sent to second terminal and is disappearedBreath, when receiving the acceptance message of second terminal transmission, that is, illustrates that the user of second terminal agrees to that first terminal is live to thisVideo is recorded, so first terminal can record the live video at this time, when receiving second terminal transmissionDuring refuse information, that is, illustrate that the user of second terminal refuses first terminal and the live video is recorded, so at this time firstTerminal can ignore the record command, that is to say, which not recorded.So, it is ensured that outside second terminalOther-end before the live video of second terminal generation is recorded, be both needed to user by second terminal and agree to, improveThe recording security of live video.
It is worth noting that, if first terminal is exactly second terminal, i.e., first terminal is exactly to generate in the live pageThe terminal of the live video played, then when first terminal is detecting the record command of the live video, it is not necessary toSecond terminal, which is sent, records inquiry message, but can directly live be regarded to what is played in the live page by serverFrequency is recorded, and the first limitation duration is obtained from server.For example, main broadcaster needs to record its live video, whenWhen main broadcaster clicks on the recording button in the live page to trigger record command, first terminal can be directly by server to thisThe live video played in live page is recorded, and the first limitation duration is obtained from server.
The third implementation:When the record of the live video played in the live page that first terminal detects displayDuring system instruction, the second preset duration is shown with order timing mode or inverted order timing mode, when default in display secondWhen recording cancellation instruction is not detected by during duration, is sent to second terminal and record inquiry message, it is whole when receiving secondWhen holding the acceptance message sent, the live video played in the live page is recorded by server, and from clothesIt is engaged in obtaining the first limitation duration in device.
Further, when detecting that recording cancellation instructs during showing the second preset duration, the recording is ignoredInstruction, i.e., not to second terminal send record inquiry message, into without the live video to being played in the live page intoRow is recorded.
Further, when receiving the refuse information of second terminal transmission, the record command can also be ignored, i.e., not to thisThe live video played in live page is recorded.
It should be noted that in embodiments of the present invention, when the user of first terminal can preset according to the second of displayLength, which is known, starts the time for recording the live video, and then can carry out recording preparation, energy before starting to record the live videoEnough users to first terminal bring more preferable usage experience.And during first terminal shows the second preset duration,If first terminal detects that instruction is cancelled in recording, it will not be sent to second terminal and record inquiry message, into without rightThe live video played in the live page is recorded., can also be to the if being not detected by recording cancels instructionTwo terminals, which are sent, records inquiry message, when receiving the acceptance message of second terminal transmission, that is, illustrates the user of second terminalAgree to that first terminal records the live video, so first terminal can record the live video at this time, whenReceive second terminal transmission refuse information when, that is, illustrate second terminal user refuse first terminal to the live video intoRow is recorded, so first terminal can ignore the record command at this time, i.e., the live video is not recorded.In this way, work as userWhen cancellation instruction is not recorded in triggering in the second preset duration, first terminal just can record inquiry to second terminal transmission and disappearBreath, only can just record the live video after first terminal receives the acceptance message of second terminal transmission afterwardsSystem, so as to not only improve the flexibility for recording live video and accuracy, but also improves the recording security of live video.
Wherein, in above-mentioned realization, first terminal by server to the live video that is being played in the live page intoRow is recorded, and the process of realizing of the limitation of acquisition first duration can be from server:First terminal generation video record request,Video record request is sent to server;When server receives the video record request of first terminal transmission, to theThe live video played in the live page that one terminal is shown is recorded, and obtains the first limitation duration, by the first limitDuration processed is sent to first terminal.
It should be noted that video record request is used in the live page that request server shows first terminal justRecorded in the live video of broadcasting.
Wherein, when server obtains the first limitation duration, preset limit duration can be obtained, preset limit duration is determinedFor the first limitation duration;Alternatively, can be according to the mark of the live video, between live video identifies and record limitation durationCorrespondence in, obtain it is corresponding record limitation duration, by the recording got limitation duration be determined as the first limitation duration.
It should be noted that preset limit duration can be configured in advance according to different demands, during such as preset limitLength can be 5 minutes, 8 minutes, 10 minutes etc..
For example, the live video played in the live page that first terminal is shown is identified as live video mark 1,Then 1 can be identified according to live video, from live video mark as shown in table 1 below with recording the corresponding pass limited between durationIn system, a length of 10 minutes when obtaining corresponding recording limitation, this is then determined as the first limitation duration for 10 minutes.
Table 1
| Live video identifies | Record limitation duration |
| Live video mark 1 | 10 minutes |
| Live video mark 2 | 8 minutes |
| Live video mark 3 | 5 minutes |
It should be noted that the embodiment of the present invention only limits duration with the live video mark shown in above-mentioned table 1 with recordingBetween correspondence exemplified by illustrate, above-mentioned table 1 not to the embodiment of the present invention form limit.
Step 202:First terminal shows the recording time point of the live video according to the first limitation duration.
It should be noted that the recording time point of the live video refers to the time point that the live video is currently recorded to,It that is to say, the recording time point of the live video represents the recording progress of the live video, the recording time point of the live videoIt can be the recording duration of the live video, or can be the residual time length that can continue to record the live video, such as shouldThe recording time point of live video can be 50 seconds 1 minute, 2 minutes and 10 seconds, 15 seconds etc. 4 minutes.
Specifically, the first limitation duration can be shown with order timing mode or inverted order timing mode, with displayThe recording time point of the live video.
It should be noted that order timing mode is from zero timing to the first limitation duration, for example, a length of during the first limitation5 minutes, the first limitation duration is shown as with order timing mode to be shown to 5 points 0 second 0 second since 0 point, i.e., is shown successivelyShow 0 point 0 second, 0 point 1 second, 0 point 2 seconds ... 4 points 58 seconds, 4 points 59 seconds, 5 points 0 second.Inverted order timing mode is from the first limitation durationTiming, for example, a length of 5 minutes during the first limitation, the first limitation duration is shown as from 5 points with inverted order timing mode to zeroStart within 0 second to be shown to 0 point 0 second, i.e., successively show 5 points 0 second, 4 points 59 seconds, 4 points 58 seconds ... 0 point 2 seconds, 0 point 1 second, 0 point 0 second.
In addition, it is above-mentioned timing display is carried out to the first limitation duration when, those numerals shown successively are that this is liveThe recording time point of video.For example, 0 point 0 second, 0 point 1 second, 4 points 59 seconds, 4 points 58 seconds etc., when being the recording of the live videoBetween point.And when the first limitation duration is shown with order timing mode, the recording time point of the live video of displayFor the recording duration of the live video, when the first limitation duration is shown with inverted order timing mode, this of display is liveThe recording time point of video is the residual time length that can continue to record the live video.
What deserves to be explained is in embodiments of the present invention, can be by the first limitation duration with order timing mode or inverted orderTiming mode is shown, to show the recording time of live video point, since the recording time point of the live video can be withThe recording progress of the live video is represented, therefore when the user of first terminal sees the recording time point of the live video of displayWhen, it is possible to accurately know the recording progress of the live video.
Step 203:When first terminal detects the refreshing instruction of the live page, refresh the live page, and brushingAfter new success, the recording duration of the live video is obtained from the server.
It should be noted that refreshing instruction is the instruction for indicating to refresh the live page, which can be byThe user of first terminal is triggered, and the user of first terminal can specify operation to be triggered by the 3rd, and the 3rd specifiesOperation can be clicking operation, slide, voice operating etc..Alternatively, the refreshing instruction can also by first terminal automatically intoRow triggering, as first terminal can be not construed as limiting this in specific time automatic trigger refreshing instruction, the embodiment of the present invention.
Further, since the user of first terminal when watching the live video is possible to that the live page can be refreshed, and it is rightThe live page, which carries out refreshing, needs certain time, and the live video plays in real time, therefore when the live page refreshesAfter success, the recording time of live video reality after the completion of refreshing the recording time point of the live video of preceding display and refreshingPut and differ, so as to cause first terminal in correlation technique can not continue accurately to show the recording time point of the live video.And in the embodiment of the present invention, first terminal can obtain the live video after the live page Flushing success from serverRecording duration, since the live video is recorded by server, this got from server live regardsThe recording time length ratio of frequency is more accurate, consequently facilitating recording duration of the follow-up first terminal according to the live video, continues accurate aobviousShow the recording time point of the live video.
Wherein, when first terminal obtains the recording duration of the live video from server, when can be sent to serverIt is long to obtain request;When server, which receives the duration, obtains request, the recording duration of the live video can be obtained, and shouldThe recording duration of live video is sent to first terminal.
Asked it should be noted that duration obtains in the live page for being shown to server acquisition request first terminalThe recording duration of the live video played.
Further, after the live page Flushing success, it is live that first terminal can not only obtain this from serverThe recording duration of video, can also obtain the recording state of the live video from server.
It should be noted that first terminal can obtain recording state and the recording of the live video from server at the same timeDuration, can also first obtain the recording state of the live video, when the recording state of the live video is is recording, then obtainThe recording duration of the live video is taken, when the recording state of the live video is not to record, it is live that this can not be obtainedThe recording duration of video.
In addition, when first terminal obtains the recording state of the live video from server and records duration at the same time, such asThe fruit live video is not to record, then server will be unable to get the recording duration of the live video, would not be to yetFirst terminal returns to the recording duration of the live video.In this way, live regarded when first terminal can not get this from serverDuring the recording duration of frequency, reason will can be known from accessed recording state in time.
And first terminal first obtains the recording state of the live video from server, then according to the recording state, thenWhen the recording duration of the live video is optionally obtained from server, first terminal is being recorded in the live video at this timeWhen, then the recording duration of the live video is obtained from server, and when the live video is not to record, as this is liveVideo has recorded completion, or when not recorded, the recording duration of the live video is not obtained from server, so as toUnnecessary operation is reduced, saves the resource of first terminal.
Step 204:First terminal continues live to regard this according to the first limitation duration and the recording duration of the live videoThe recording time point of frequency is shown.
Specifically, when be in step 202 by first limitation duration shown with order timing mode or inverted order timing modeShow, during showing the recording time of live video point, the process of realizing of step 204 can be:When first limitation duration be withWhen order timing mode is shown, when being shown to the first limitation since the recording duration of the live video with order timing modeIt is long, to continue to show the recording time point of the live video;When the first limitation duration is shown with inverted order timing mode, by theOne limitation duration subtracts the recording duration of the live video, obtains the second limitation duration, by the second limitation duration with inverted order timingMode is shown, to continue to show the recording time point of the live video.
It should be noted that when the first limitation duration is shown with order timing mode, the live video of displayRecording time point be the live video recording duration, thus at this time can since the recording duration of the live video timing toFirst limitation duration, the numeral shown during from the recording duration timing to the first limitation duration is the live videoRecording time point.
For example, the first limitation duration is shown with order timing mode, it is assumed that a length of 5 minutes during the first limitation, and fromA length of 2 minutes during the recording of the live video got in server, then shown at this time since 2 minutes with order timing modeShow it is a length of during the first limitation be shown to 5 points 0 second 0 second since 2 points, i.e., show successively 2 points 0 second, 2 points 1 second, 2 points 2 seconds ...4 points 58 seconds, 4 points 59 seconds, 5 points 0 second.
In addition, when the first limitation duration is shown with inverted order timing mode, the recording time of the live video of displayPoint is needed the first limitation duration subtracting this and live regarded at this time to can continue to the residual time length recorded to the live videoThe recording duration of frequency, obtains the second limitation duration, and the second limitation duration is represented and remaining in the first limitation duration can recordedDuration, the second limitation duration is shown with inverted order timing mode afterwards, i.e., since the second limitation duration timing to 0,It is the recording time point of the live video in the numeral shown during timing second limits duration to 0.
For example, the first limitation duration is shown with inverted order timing mode, it is assumed that a length of 5 minutes during the first limitation, and fromA length of 3 minutes during the recording of the live video got in server, then a length of 2 minutes during the second limitation, at this time by secondLimitation duration is shown as being shown to 0 point 0 second 0 second since 2 points with inverted order timing mode, i.e., shows 2 points successively 0 second, 1 point59 seconds, 1 point 58 seconds ... 0 point 2 seconds, 0 point 1 second, 0 point 0 second.
It should be noted that in embodiments of the present invention, the live video is recorded by server, thusThe recording time length ratio for the live video that first terminal is got from server is more accurate, thereby may be ensured that first terminal rootDuration and the recording duration of the live video are limited according to first, when continuing to show the recording time point of the live video,The recording time point accuracy of the shown live video is higher, so that the user of first terminal can accurately know current be somebody's turn to doThe recording progress of live video.
Further, in the embodiment of the present invention, in order to more accurately show the recording time point of the live video, theOne terminal can also obtain the recording duration of the live video every the first preset duration from server, and according to the first limitationThe recording duration of duration and the live video, again shows the recording time point of the live video.
It should be noted that the first preset duration can be configured in advance according to different demands, when being preset such as firstLength can be 3 minutes, 5 minutes, 7 minutes etc..
The explanation of value, in the embodiment of the present invention, can obtain from server every the first preset duration and once shouldThe recording duration of live video, and according to the first limitation duration and the recording duration of the live video, again to the live videoRecording time point shown, that is to say, at regular intervals will be right during being recorded to the live videoThe recording time point of the live video re-starts display, to ensure accurately to show the recording time point of the live video.
Wherein, first terminal obtains the operation of the recording duration of the live video every the first preset duration from serverIt can be realized by the timer in the live page, specifically, first terminal passes through the timer in the live pageTiming is carried out, when timing is to the first preset duration, the recording duration of the live video is obtained from server, and it is fixed by thisWhen device restart next round timing.
Further, first terminal every the first preset duration obtained from server the live video recording duration itBefore, it can also determine the recording state of the live video, when the recording state of the definite live video is is recording, performThe operation of the recording duration of the live video is obtained from server every the first preset duration, is determining the record of the live videoState processed is not when recording, not perform the recording duration for obtaining the live video from server every the first preset durationOperation.
Wherein, can be every the 3rd preset duration from server when first terminal determines the recording state of the live videoIt is middle obtain the live video recording state, alternatively, first terminal to the live page refresh complete after, from serverGet the recording state of the live video.
It should be noted that first terminal when the live video recording state for recording when, just can be every firstPreset duration obtains the recording duration of the live video from server, and then accordingly again to the recording time of the live videoPoint is shown, ensures the accuracy of the recording time point of the live video of display, and when the recording state of the live videoThe recording duration of the live video is not obtained from server every the first preset duration for that when recording, can not performOperation, so as to avoid unnecessary operation, saves the resource of first terminal.
In embodiments of the present invention, played in the live page that can be shown by server to first terminal straightBroadcast video to be recorded, and the first limitation duration is obtained from the server, according to the first limitation duration, to the live videoRecording time point is shown.Afterwards, when first terminal detects the refreshing instruction of the live page, it is live that this can be refreshedThe page, and after Flushing success, the recording duration of the live video is obtained from server, then according to the first limitation duration andThe recording duration of the live video, continues to show the recording time point of the live video.Due to the live video be byWhat server was recorded, therefore the recording time length ratio of the live video that first terminal is got from server is more accurate,Thus first terminal is according to the first limitation duration and the recording duration of the live video, the recording time of the live video of displayThe accuracy of point is higher.
Next the record device of live video provided in an embodiment of the present invention is introduced.
Fig. 3 A are a kind of structure diagrams of the record device of live video provided in an embodiment of the present invention.Referring to Fig. 3 A,The device includes the first acquisition module 301, the first display module 302, the second acquisition module 303 and the second display module 304.
First acquisition module 301 is straight for being played in the live page that is shown by server to first terminalVideo is broadcast to be recorded, and from the server obtain first limitation duration, first limitation when it is a length of can be to the live videoThe maximum duration of recording.
First display module 302, for according to the first limitation duration, being shown to the recording time point of the live videoShow.
Second acquisition module 303, for when detecting the refreshing instruction of the live page, refreshing the live page, andAfter Flushing success, the recording duration of the live video is obtained from the server.
Second display module 304, for the recording duration according to the first limitation duration and the live video, continues straight to thisThe recording time point for broadcasting video is shown.
Alternatively, include referring to Fig. 3 B, the first display module 302:
First display sub-module 3021, for the first limitation duration to be carried out with order timing mode or inverted order timing modeIt has been shown that, to show the recording time of live video point.
Correspondingly, include referring to Fig. 3 C, the second display module 304:
Second display sub-module 3041, for when first limitation duration be to be shown with order timing mode when, it is live from thisThe recording duration of video starts to be shown to the first limitation duration with order timing mode, to continue to show the recording of the live videoTime point.
3rd display sub-module 3042, for when the first limitation duration is shown with inverted order timing mode, first to be limitedDuration processed subtracts the recording duration of the live video, obtains the second limitation duration, by the second limitation duration with inverted order timing modeIt has been shown that, to continue to show the recording time point of the live video.
Alternatively, further included referring to Fig. 3 D, the device:
3rd acquisition module 305, for obtaining the recording of the live video from the server every the first preset durationDuration.
3rd display module 306 is again straight to this for the recording duration according to the first limitation duration and the live videoThe recording time point for broadcasting video is shown.
Alternatively, include referring to Fig. 3 E, the first acquisition module 301:
4th display sub-module 3011, for when the record of the live video played in the live page for detecting displayDuring system instruction, the second preset duration is shown with order timing mode or inverted order timing mode.
First acquisition submodule 3012, refers to for that ought be not detected by recording cancellation during the second preset duration is shownWhen making, the live video played in the live page is recorded by server, and is obtained from the serverFirst limitation duration.
Alternatively, include referring to Fig. 3 F, the first acquisition module 301:
Sending submodule 3013, for referring to when the recording of the live video played in the live page for detecting displayWhen making, to second terminal send record inquiry message, by second terminal according to the recording inquire message return acceptance message, secondTerminal is to generate the terminal of the live video played in the live page.
Second acquisition submodule 3014, for when receiving the acceptance message of second terminal transmission, passing through server pairThe live video played in the live page is recorded, and the first limitation duration is obtained from the server.
In embodiments of the present invention, played in the live page that can be shown by server to first terminal straightBroadcast video to be recorded, and the first limitation duration is obtained from the server, according to the first limitation duration, to the live videoRecording time point is shown.Afterwards, when first terminal detects the refreshing instruction of the live page, it is live that this can be refreshedThe page, and after Flushing success, the recording duration of the live video is obtained from server, then according to the first limitation duration andThe recording duration of the live video, continues to show the recording time point of the live video.Due to the live video be byWhat server was recorded, therefore the recording time length ratio of the live video that first terminal is got from server is more accurate,Thus first terminal is according to the first limitation duration and the recording duration of the live video, the recording time of the live video of displayThe accuracy of point is higher.
It should be noted that:Above-described embodiment provide live video record device when recording live video, only withThe division progress of above-mentioned each function module, can be as needed and by above-mentioned function distribution by not for example, in practical applicationSame function module is completed, i.e., the internal structure of device is divided into different function modules, to complete whole described aboveOr partial function.In addition, the record device for the live video that above-described embodiment provides and the method for recording of live video are implementedExample belongs to same design, its specific implementation process refers to embodiment of the method, and which is not described herein again.
Fig. 4 is a kind of structure diagram of the record device 400 of live screen provided in an embodiment of the present invention.For example, dressIt can be mobile phone to put 400, computer, digital broadcast terminal, messaging devices, game console, tablet device, medical treatmentEquipment, body-building equipment, personal digital assistant etc..
With reference to Fig. 4, device 400 can include following one or more assemblies:Processing component 402, memory 404, power supplyComponent 406, multimedia component 408, audio component 410, the interface 412 of input/output (I/O), sensor component 414, andCommunication component 416.
The integrated operation of the usual control device 400 of processing component 402, such as with display, call, data communication, phaseThe operation that machine operates and record operation is associated.Processing component 402 can refer to including one or more processors 420 to performOrder, to complete all or part of step of above-mentioned method.In addition, processing component 402 can include one or more modules, justInteraction between processing component 402 and other assemblies.For example, processing component 402 can include multi-media module, it is more to facilitateInteraction between media component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in device 400.These data are shownExample includes the instruction of any application program or method for being operated on device 400, and contact data, telephone book data, disappearsBreath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their groupClose and realize, as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) are erasable to compileJourney read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flashDevice, disk or CD.
Power supply module 406 provides power supply for the various assemblies of device 400.Power supply module 406 can include power management systemSystem, one or more power supplys, and other components associated with generating, managing and distributing power supply for device 400.
Multimedia component 408 is included in the screen of one output interface of offer between described device 400 and user.OneIn a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screenCurtain may be implemented as touch-screen, to receive input signal from the user.Touch panel includes one or more touch sensingsDevice is to sense the gesture on touch, slip and touch panel.The touch sensor can not only sense touch or sliding actionBorder, but also detect and the duration and pressure associated with the touch or slide operation.In certain embodiments, more matchmakersBody component 408 includes a front camera and/or rear camera.When device 400 is in operator scheme, such as screening-mode orDuring video mode, front camera and/or rear camera can receive exterior multi-medium data.Each front camera andRear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a MikeWind (MIC), when device 400 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone by withIt is set to reception external audio signal.The received audio signal can be further stored in memory 404 or via communication setPart 416 is sent.In certain embodiments, audio component 410 further includes a loudspeaker, for exports audio signal.
I/O interfaces 412 provide interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module canTo be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lockDetermine button.
Sensor component 414 includes one or more sensors, and the state for providing various aspects for device 400 is commentedEstimate.For example, sensor component 414 can detect opening/closed mode of device 400, and the relative positioning of component, for example, it is describedComponent is the display and keypad of device 400, and sensor component 414 can be with 400 1 components of detection device 400 or devicePosition change, the existence or non-existence that user contacts with device 400,400 orientation of device or acceleration/deceleration and device 400Temperature change.Sensor component 414 can include proximity sensor, be configured to detect without any physical contactPresence of nearby objects.Sensor component 414 can also include optical sensor, such as CMOS or ccd image sensor, for intoAs being used in application.In certain embodiments, which can also include acceleration transducer, gyro sensorsDevice, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementationIn example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.In one exemplary embodiment, the communication component 416 further includes near-field communication (NFC) module, to promote junction service.ExampleSuch as, in NFC module radio frequency identification (RFID) technology can be based on, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 400 can be believed by one or more application application-specific integrated circuit (ASIC), numeralNumber processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, real shown in above-mentioned Fig. 1 and Fig. 2A for performingThe method for recording of the live screen of example offer is provided.
Fig. 5 is a kind of structure diagram of the record device 500 of live screen provided in an embodiment of the present invention.For example, dressPut 500 and may be provided as a server.With reference to Fig. 5, device 500 includes processor 522, it further comprises one or moreProcessor, and as the memory resource representated by memory 532, can be by the instruction of the execution of processor 522, example for storingSuch as application program.The application program stored in memory 532 can include it is one or more each correspond to one groupThe module of instruction.In addition, processor 522 is configured as execute instruction, to perform above-mentioned Fig. 1 and Fig. 2A illustrated embodiments offerThe method for recording of live screen.
Device 500 can also include the power management that a power supply module 526 is configured as executive device 500, and one hasLine or radio network interface 550 are configured as device 500 being connected to network, and input and output (I/O) interface 558.DressPutting 500 can operate based on the operating system for being stored in memory 532, such as Windows ServerTM, Mac OS XTM,UnixTM, LinuxTM, FreeBSDTM or similar.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally providedSuch as include the memory of instruction, above-metioned instruction can be performed by the processor of device to complete the above method.It is for example, described non-provisionalProperty computer-readable recording medium can be that ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light data are depositedStore up equipment etc..
It that is to say, when the instruction in the computer-readable recording medium is performed by the processor of device, it is possible to achieve above-mentionedThe method for recording for the live video that Fig. 1 or Fig. 2A embodiments provide.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit andWithin principle, any modification, equivalent replacement, improvement and so on, should all be included in the protection scope of the present invention.