Summary of the invention
Technical problem to be solved by this invention is to provide the synchronous method and system of playing of a kind of multiple terminals Flash, can realize in playing process synchronous in each terminal.
In order to address the above problem, the invention discloses a kind of synchronous method of playing of multiple terminals Flash, comprising:
The webserver is sent to each playback terminal by Flash file and file attribute information;
Each playback terminal is according to receiving Flash file and file attribute information rise time linked list, and described association in time, list records had the broadcast start time that Flash file is corresponding;
Each playback terminal loads corresponding Flash file according to list association in time and plays;
According to local current system time and described list association in time, carry out the synchronous location calibration of playing;
Described synchronous broadcasting location calibration comprises the calibration of file sequence number and the calibration of playing frame number;
Wherein, according to local current system time and described list association in time, carry out the synchronous location calibration of file sequence number, specifically comprise:
In playing process, every preset time interval, judge whether the file sequence number of the Flash file of current broadcasting meets sequence number calibration condition; When meeting sequence number calibration condition, search the file sequence number of the Flash file of actual play, unload the Flash file of current broadcasting, load Flash file corresponding to file sequence number finding, carry out Flash broadcasting; Wherein, described sequence number calibration condition is: the current system time is less than the broadcast start time of the Flash file of current broadcasting, or the current system time is more than or equal to the broadcast start time of next file of the Flash file of current broadcasting;
The synchronous location calibration of playing frame number according to local current system time and described list association in time, specifically comprises:
Every preset time interval, deducted to the broadcast start time of the Flash file of current broadcasting the current system time, the difference obtaining is multiplied by frame per second corresponding to described Flash file, calculates the actual play frame number of described Flash file; Whether the current broadcasting frame number that judges described Flash file meets frame number calibration condition; When meeting frame number calibration condition, the current broadcasting frame number of described Flash file is adjusted into described actual play frame number; Wherein, described frame number calibration condition is: current broadcasting frame number is less than the difference that actual play frame number deducts reference frame number, described reference frame number be described Flash file frame rate value 1/2nd.
Further, described file attribute information comprises: the end reproduction time of the broadcast start time of listed files, listed files, filename and corresponding frame per second and file duration thereof; Wherein, N the corresponding listed files of Flash file, N is more than or equal to 1.
Further, described each playback terminal, according to receiving Flash listed files and file attribute information rise time linked list, is specially:
For first Flash file, recording its file sequence number is 0, recording its broadcast start time is: the broadcast start time of described listed files, and it finishes reproduction time and is: the broadcast start time of described listed files adds the file duration of the above Flash file;
For n Flash file, recording its file sequence number is n-1, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file adds the file duration of n Flash file; N=2,3,4......N.
Further, described each playback terminal, according to receiving Flash listed files and file attribute information rise time linked list, also comprises:
When the end reproduction time of n Flash file is less than the end reproduction time of listed files, from first Flash file in turn, by the time, add up and expand the record of list association in time, be specially:
For first Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n Flash file, and it finishes reproduction time and is: the broadcast start time of first Flash file of new record adds the file duration of first Flash file;
For n Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file of new record adds the file duration of n Flash file; N=2,3,4......N;
Record successively and return circulation and carry out, until the end reproduction time of last Flash file is greater than the end reproduction time of described listed files in list association in time.
Further, described each playback terminal according to association in time information load corresponding Flash file and play, comprise: judge whether the sequence number sum in list association in time is more than or equal to preset threshold value, if not, according to the file sequence number of the Flash file of the ascending sequential search actual play of file sequence number; If so, adopt the file sequence number of the Flash file of binary search actual play; Flash file corresponding to file sequence number that loading finds, carries out Flash broadcasting.
Wherein, when the broadcast start time of searched Flash file is less than or equal to current system time and current system time while being less than the broadcast start time of next file of described Flash file, the file sequence number of the Flash file using the file sequence number of this Flash file as actual play.
The file sequence number of searching the Flash file of actual play further, is specially:
The current system time is while being greater than the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of current searched Flash file and current system time are less than the next file of current searched Flash file, the file sequence number of the Flash file using the file sequence number of current searched Flash file as actual play;
The current system time is while being less than or equal to the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of previous file of current searched Flash file and current system time are less than current searched Flash file, the file sequence number of the Flash file using the file sequence number of the previous file of current searched Flash file as actual play.
In addition, the invention also discloses the synchronous system of playing of a kind of multiple terminals Flash, comprise the webserver and a plurality of playback terminal;
The described webserver comprises:
The first communication module, for being sent to each playback terminal by Flash file and file attribute information;
Described playback terminal comprises:
The second communication module, the Flash file and the file attribute information that for receiving the webserver, send;
Association in time module, for according to receiving Flash file and file attribute information rise time linked list, described association in time, list records had the broadcast start time that Flash file is corresponding;
Flash playing module, plays for load corresponding Flash file according to list association in time;
Location calibration module, for carrying out the synchronous location calibration of playing according to local current system time and described list association in time;
Described location calibration module specifically comprises:
Sequence number condition judgment submodule: at playing process, every preset time interval, judge whether the file sequence number of the Flash file of current broadcasting meets sequence number calibration condition, and trigger the second sequence number and search submodule when meeting;
The second sequence number is searched submodule, for when meeting sequence number calibration condition, searches the file sequence number of the Flash file of actual play;
Described file is play the Flash file that submodule unloads current broadcasting, loads Flash file corresponding to file sequence number finding, and carries out Flash broadcasting;
Wherein, described sequence number calibration condition is: the current system time is less than the broadcast start time of the Flash file of current broadcasting, or the current system time is more than or equal to the broadcast start time of next file of the Flash file of current broadcasting;
Described location calibration module also comprises:
Frame number calculating sub module, be used for every preset time interval, deducted to the broadcast start time of the Flash file of current broadcasting the current system time, the difference obtaining is multiplied by frame per second corresponding to described Flash file, calculates the actual play frame number of described Flash file;
Frame number condition judgment submodule, for judging whether the current broadcasting frame number of described Flash file meets frame number calibration condition;
Frame number is adjusted submodule, for when meeting frame number calibration condition, the current broadcasting frame number of described Flash file is adjusted into described actual play frame number;
Wherein, described frame number calibration condition is: current broadcasting frame number is less than the difference that actual play frame number deducts reference frame number, described reference frame number be described Flash file frame rate value 1/2nd.
Further, described file attribute information comprises: the end reproduction time of the broadcast start time of listed files, listed files, filename and corresponding frame per second and file duration thereof; Wherein, N the corresponding listed files of Flash file, N is more than or equal to 1.
Further, described association in time, module was for first Flash file, recording its file sequence number is 0, recording its broadcast start time is: the broadcast start time of described listed files, and it finishes reproduction time and is: the broadcast start time of described listed files adds the file duration of the above Flash file;
For n Flash file, recording its file sequence number is n-1, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file adds the file duration of n Flash file; N=2,3,4......N.
Wherein, when the end reproduction time of n Flash file is less than the end reproduction time of listed files, described association in time module from first Flash file in turn, by the time, add up and expand the record of list association in time, be specially:
For first Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n Flash file, and it finishes reproduction time and is: the broadcast start time of first Flash file of new record adds the file duration of first Flash file;
For n Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file of new record adds the file duration of n Flash file; N=2,3,4......N;
Record successively and return circulation and carry out, until the end reproduction time of last Flash file is greater than the end reproduction time of described listed files in list association in time.
Further, described Flash playing module comprises:
The first sequence number is searched submodule, for judging whether the sequence number sum of list association in time is more than or equal to preset threshold value, if not, according to the file sequence number of the Flash file of the ascending sequential search actual play of file sequence number; If so, adopt the file sequence number of the Flash file of binary search actual play; File is play submodule, for loading Flash file corresponding to file sequence number finding, carries out Flash broadcasting.
Wherein, when the broadcast start time of searched Flash file is less than or equal to current system time and current system time while being less than the broadcast start time of next file of described Flash file, the file sequence number of the Flash file using the file sequence number of this Flash file as actual play.
Further, described the second sequence number is searched submodule and is searched the file sequence number of the Flash file of actual play and be specially:
The current system time is while being greater than the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of current searched Flash file and current system time are less than the next file of current searched Flash file, the file sequence number of the Flash file using the file sequence number of current searched Flash file as actual play;
The current system time is while being less than or equal to the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of previous file of current searched Flash file and current system time are less than current searched Flash file, the file sequence number of the Flash file using the file sequence number of the previous file of current searched Flash file as actual play.
Compared with prior art, the present invention has the following advantages:
Flash file and the file attribute information of each playback terminal of the present invention all derive from same service end, therefore the content due to list association in time generating is consistent, further, according to local current system time and institute's rise time linked list, carry out the synchronous location calibration of playing.Therefore each playback terminal difference when difference appears in operation, under identical reproduction time, is identical according to the actual play frame number that association in time, list calculated, and has guaranteed that the playing progress rate between each playback terminal is synchronous.
Further, the present invention judges every preset time interval whether described Flash file meets calibration condition, in current broadcasting frame number and actual play frame number difference, hour does not adjust, and has guaranteed the fluency of broadcasting pictures in synchronous broadcasting.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
With reference to Fig. 1, show the flow chart of the synchronous embodiment of the method one of playing of a kind of multiple terminals Flash of the present invention, comprising:
Step 101, the webserver is sent to each playback terminal by Flash file and file attribute information;
First, network server end is sent to each playback terminal by the synchronous Flash file of playing of needs, and to guarantee that a plurality of playback terminals can show the Flash picture of identical content, described Flash file can be a plurality of.
Described file attribute information comprises: the broadcasting end time of the play start time of listed files, listed files, filename and corresponding frame per second and file duration thereof; Wherein, n the corresponding listed files of Flash file, n is more than or equal to 1.Described frame per second is the number of the frame of broadcasting per second, and described file duration is that this Flash file is play the time span of a time.It should be noted that, described filename, frame per second and file duration and each Flash file have relation one to one, general, long list in the time of can be with filename list, frame per second list and file, i.e. the form recording-related information of list.Described listed files is aimed at a play area on terminal screen, and each play area has listed files separately, and the Flash file in same play area is all played in order.The broadcasting end time of the play start time of listed files, listed files is for the total broadcasting of n Flash file.
The end reproduction time of listed files deducts the broadcast start time of listed files, is the playing duration time of n Flash file.The file duration summation of each Flash file can equal playing duration time, and n corresponding Flash document order play one time; The file duration summation of each Flash file can be less than playing duration time, and n corresponding Flash document order play after one time, starts anew to be cycled to repeat and plays until arrive the end reproduction time of listed files; In addition, the file duration summation of each Flash file also can be greater than playing duration time.The end reproduction time of the broadcast start time of described listed files and listed files arranges in network server end according to user's demand.
Step 102, each playback terminal is according to receiving Flash file and file attribute information rise time linked list, and described association in time, list records had the broadcast start time that Flash file is corresponding;
Described step 102 is specially:
For first Flash file, recording its file sequence number is 0, recording its broadcast start time is: the broadcast start time of described listed files, and it finishes reproduction time and is: the broadcast start time of described listed files adds the file duration of the above Flash file;
For n Flash file, recording its file sequence number is n-1, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file adds the file duration of n Flash file; N=2,3,4......N.It should be noted that, the end reproduction time of current Flash file is the broadcast start time of next Flash file.Be specifically described for example below, for example, playback terminal receives three Flash files, and corresponding file attribute information is as follows:
Filename frame per second file duration
Flash A 12fps 3’’;
Flash B 12fps 8’’;
Flash C 24fps 4’’。
The broadcast start time of the listed files in described file attribute information is 8:00:00.In list association in time, record following information:
File sequence number filename broadcast start time
0 Flash A 8:00:00;
1 Flash B 8:00:03;
2 Flash C 8:00:11。
The end reproduction time of Flash A is 8:00:03, and the end reproduction time of Flash B is 8:00:11, and the end reproduction time of Flash C is 8:00:15.
Further, described each playback terminal is according to receiving Flash listed files and file attribute information rise time linked list, also comprise: when the end reproduction time of n Flash file is less than the end reproduction time of listed files, from first Flash file in turn, by the time, add up and expand the record of list association in time;
Concrete, for first Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n Flash file, records it and finishes reproduction time and be: the broadcast start time of first Flash file of new record adds the file duration of first Flash file;
For n Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file of new record adds the file duration of n Flash file; N=2,3,4......N;
Record successively and return circulation and carry out, until the end reproduction time of last Flash file is greater than the end reproduction time of described listed files in list association in time.
For example, the end reproduction time of the listed files in described file attribute information is 8:00:32.
Add a record, for first Flash file, record its broadcast start time and be: the end reproduction time 8:00:15 of Flash C, it finishes reproduction time and is: the broadcast start time 8:00:15 of new record adds 3 seconds, for 8:00:18, its file sequence number becomes 3 from 0 cumulative 3.For Flash B, record its broadcast start time and be: 8:00:18, it finishes reproduction time and is: 8:00:18 adds 8 seconds, is 8:00:26, and its file sequence number becomes 4 from 1 cumulative 3; Record successively.To the last the end reproduction time of a Flash file is greater than the end reproduction time 8:00:32 of described listed files.
File sequence number filename broadcast start time
By above-mentioned record, can be found out, three Flash file circulations are added in list association in time in turn, the end reproduction time of the Flash A of file sequence number 6 correspondences is that 8:00:30 adds the end reproduction time 8:00:32 that is greater than listed files for 3 seconds, therefore, stops expanding list association in time.
It should be noted that, list association in time is expanded while adding, and corresponding filename, frame per second, file duration repeat to deposit in too in corresponding list, to guarantee the consistency of sequence number and file attribute.Its effect embodying is exactly again from first, to start to broadcast after 3 files all finish, until reach the time that finishes broadcasting.
Step 103, each playback terminal loads corresponding Flash file according to list association in time and plays;
Each playback terminal according to generate association in time information scheduling content, at the corresponding Flash file of corresponding selection of time, load broadcasting.Concrete, described step 103 comprises:
Sub-step 1031, judges whether the sequence number sum in list association in time surpasses preset threshold value, if not, and according to the file sequence number of the Flash file of the ascending sequential search actual play of file sequence number; If so, adopt the file sequence number of the Flash file of binary search actual play;
Sub-step 1032, loads Flash file corresponding to file sequence number finding, and carries out Flash broadcasting.
After the related information of deadline, just start to search the current actual file sequence number that will play.For example, described preset threshold value is 100, and whether the total number of file sequence number after first judgement expansion surpasses 100, is less than 100 and just sequentially since No. 0, searches in turn from small to large; If the total number of file sequence number is more than or equal to 100, just adopt binary chop express delivery to search.Below the mode of searching of dichotomy is specifically described: suppose that file sequence number adds up to 120, the broadcast start time of the 60th Flash file and current system time are compared, if be greater than the current system time, at the first half of the 60th Flash file, search; Otherwise the latter half of the 60th Flash file is searched.By dichotomy, search, after each computing, the object content of searching reduces half, the operating rate having improved.
Further, when the broadcast start time of searched Flash file is less than or equal to current system time and current system time while being less than the broadcast start time of next file of described Flash file, the file sequence number of the Flash file using the file sequence number of this Flash file as actual play.That is to say, when the broadcast start time of searched Flash file equals current system during the time, described Flash file just will start to play, as played file; When the broadcast start time of searched Flash file is less than the current system time, and the current system time is while being less than the broadcast start time of next file of described Flash file, described Flash file, in playing process, continues to play as the Flash file of current broadcasting.
Step 104, carries out the synchronous location calibration of playing according to local current system time and described list association in time.
Described synchronous broadcasting location calibration comprises the calibration of file sequence number and the calibration of playing frame number.
Wherein, according to local current system time and described list association in time, carry out the synchronous location calibration of file sequence number, comprise following sub-step:
Sub-step 1041, in playing process, every preset time interval, judges whether the file sequence number of the Flash file of current broadcasting meets sequence number calibration condition;
Sub-step 1042, when meeting sequence number calibration condition, searches the file sequence number of the Flash file of actual play;
Wherein, described sequence number calibration condition is: the current system time is less than the broadcast start time of the Flash file of current broadcasting, or the current system time is more than or equal to the broadcast start time of next file of the Flash file of current broadcasting.
Described file sequence number of searching the Flash file of actual play is specially:
The current system time is while being greater than the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of current searched Flash file and current system time are less than the next file of current searched Flash file, the file sequence number of the Flash file using the file sequence number of current searched Flash file as actual play;
The current system time is while being less than or equal to the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of previous file of current searched Flash file and current system time are less than current searched Flash file, the file sequence number of the Flash file using the file sequence number of the previous file of current searched Flash file as actual play.
Sub-step 1043, unloads the Flash file of current broadcasting, loads Flash file corresponding to file sequence number finding, and carries out Flash broadcasting.
Wherein, the synchronous location calibration of frame number is play in the current system time that described foundation is local and described list association in time, comprises following sub-step:
Sub-step 1044, every preset time interval, deducts the current system time broadcast start time of the Flash file of current broadcasting, and the difference obtaining is multiplied by frame per second corresponding to described Flash file, calculates the actual play frame number of described Flash file;
In the playing process of Flash file, at interval of certain preset time, just described Flash file is carried out the location calibration of a subsynchronous broadcasting.Different settings can be carried out according to user's requirement in described preset time interval, common, and described preset time is spaced apart several seconds.When preset time interval is longer, need to wait for that the long period is carried out a subsynchronous positioning school accurate for each playback terminal, saved the delivery flow rate of Internet resources; When synchronization of time intenals more in short-term, it is accurate that each playback terminal can carry out a subsynchronous positioning school soon, Flash picture synchronously comparatively accurate.
Concrete, first calculate actual play frame number.For example, the current system time is 8:00:20, the Flash B that is 4 for sequence number, its broadcast start time is 8:00:18, and its frame per second is 12fps, during 8:00:20, m-broadcast start time=2 second during current system, the actual frame number that should play of the Flash B that sequence number is 4 is 2 * 12=24 frame.
Sub-step 1045, judges whether the current broadcasting frame number of described Flash file meets frame number calibration condition;
Wherein, described frame number calibration condition is: current broadcasting frame number is less than the difference that actual play frame number deducts reference frame number, described reference frame number be described Flash file frame rate value 1/2nd.
For example, for above-mentioned Flash B, its frame per second is 12fps, and reference frame number is 12/2=6 frame.By step 1041 actual play frame number, be the 24th frame, 24-6=18, if current broadcasting frame number is more than or equal at 18 o'clock, illustrates that the difference of current broadcasting frame number and actual play frame number is less, does not meet calibration condition, needn't do calibration adjustment; If current broadcasting frame number is less than at 18 o'clock, illustrate that the difference of itself and actual play frame number is larger, meet calibration condition, need to play the calibration adjustment of frame number, so that the picture of each playback terminal keeps synchronous.In embodiments of the present invention, every preset time interval, judge whether described Flash file meets calibration condition, in current broadcasting frame number and actual play frame number difference, hour do not adjust, guaranteed the fluency of broadcasting pictures.
Sub-step 1046, when meeting frame number calibration condition, is adjusted into described actual play frame number by the current broadcasting frame number of described Flash file;
Under the current broadcasting frame number and the inconsistent situation of actual play frame number of described Flash file, calibrate adjustment.For example, the current broadcasting frame number of Flash B is the 15th frame, explanation, and the broadcasting in this terminal has delay, accordingly current broadcasting frame number is adjusted into actual play frame number 24 frames that step 1044 calculates, makes the play content in this terminal consistent with other playback terminals.
It should be noted that, the embodiment of the present invention is only specifically described for the synchronous broadcasting location of a playback terminal, and the synchronous playing adjusting method on each playback terminal is identical.Pass through the embodiment of the present invention, because Flash file and the file attribute information of each playback terminal all derives from same service end, therefore, difference when difference appears in operation, under identical reproduction time, the actual play frame number calculating is identical, has guaranteed that the playing progress rate between each playback terminal is synchronous.
With reference to Fig. 2, show the structure chart of the synchronous system embodiment of playing of a kind of multiple terminals Flash of the present invention, comprise the webserver 21 and a plurality of playback terminal 22; As shown in Figure 4, comprise playback terminal 22A, playback terminal 22B, playback terminal 22C...... wherein,
The described webserver 21 comprises:
The first communication module 211, for being sent to each playback terminal by Flash file and file attribute information;
Described playback terminal 22 comprises:
The second communication module 221, the Flash file and the file attribute information that for receiving the webserver, send;
Association in time, module 222, and for according to receiving Flash file and file attribute information rise time linked list, described association in time, list records had the broadcast start time that Flash file is corresponding;
Flash playing module 223, plays for load corresponding Flash file according to list association in time;
Location calibration module 324, for carrying out the synchronous location calibration of playing according to local current system time and described list association in time.
Further, described file attribute information comprises: the end reproduction time of the broadcast start time of listed files, listed files, filename and corresponding frame per second and file duration thereof; Wherein, N the corresponding listed files of Flash file, N is more than or equal to 1.
Further, described association in time, module was for first Flash file, recording its file sequence number is 0, recording its broadcast start time is: the broadcast start time of described listed files, and it finishes reproduction time and is: the broadcast start time of described listed files adds the file duration of the above Flash file;
For n Flash file, recording its file sequence number is n-1, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file adds the file duration of n Flash file; N=2,3,4......N.
Further, when the end reproduction time of n Flash file is less than the end reproduction time of listed files, described association in time module from first Flash file in turn, by the time, add up and expand the record of list association in time, be specially:
For first Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n Flash file, and it finishes reproduction time and is: the broadcast start time of first Flash file of new record adds the file duration of first Flash file;
For n Flash file, record the cumulative N of its file sequence number, recording its broadcast start time is: the end reproduction time of n-1 Flash file, and it finishes reproduction time and is: the broadcast start time of n Flash file of new record adds the file duration of n Flash file; N=2,3,4......N;
Record successively and return circulation and carry out, until the end reproduction time of last Flash file is greater than the end reproduction time of described listed files in list association in time.
In a preferred embodiment of the invention, described Flash playing module comprises:
The first sequence number is searched submodule, for judging whether the sequence number sum of list association in time is more than or equal to preset threshold value, if not, according to the file sequence number of the Flash file of the ascending sequential search actual play of file sequence number; If so, adopt the file sequence number of the Flash file of binary search actual play;
File loads submodule, for loading Flash file corresponding to file sequence number finding, carries out Flash broadcasting.
When the broadcast start time of searched Flash file is less than or equal to current system time and current system time while being less than the broadcast start time of next file of described Flash file, the file sequence number of the Flash file using the file sequence number of this Flash file as actual play.Especially, when the file of current broadcasting is in listed files the 1st or last 1,, without carrying out again above-mentioned judgement, directly carry out record.
In another preferred embodiment of the present invention, described location calibration module comprises:
Sequence number condition judgment submodule: at playing process, every preset time interval, judge whether the file sequence number of the Flash file of current broadcasting meets sequence number calibration condition, and trigger the second sequence number and search submodule when meeting;
The second sequence number is searched submodule, for when meeting sequence number calibration condition, searches the file sequence number of the Flash file of actual play;
Described file is play the Flash file that submodule unloads current broadcasting, loads Flash file corresponding to file sequence number finding, and carries out Flash broadcasting;
Wherein, described sequence number calibration condition is: the current system time is less than the broadcast start time of the Flash file of current broadcasting, or the current system time is more than or equal to the broadcast start time of next file of the Flash file of current broadcasting.
Described the second sequence number is searched submodule and is searched the file sequence number of the Flash file of actual play and be specially: the current system time is while being greater than the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of current searched Flash file and current system time are less than the next file of current searched Flash file, the file sequence number of the Flash file using the file sequence number of current searched Flash file as actual play;
The current system time is while being less than or equal to the broadcast start time of Flash file of current broadcasting, if the current system time is more than or equal to the broadcast start time that the broadcast start time of previous file of current searched Flash file and current system time are less than current searched Flash file, the file sequence number of the Flash file using the file sequence number of the previous file of current searched Flash file as actual play.
In another preferred embodiment of the present invention, described location calibration module also comprises:
Frame number calculating sub module, be used for every preset time interval, deducted to the broadcast start time of the Flash file of current broadcasting the current system time, the difference obtaining is multiplied by frame per second corresponding to described Flash file, calculates the actual play frame number of described Flash file;
Frame number condition judgment submodule, for judging whether the current broadcasting frame number of described Flash file meets frame number calibration condition;
Frame number is adjusted submodule, for when meeting frame number calibration condition, the current broadcasting frame number of described Flash file is adjusted into described actual play frame number;
Wherein, described frame number calibration condition is: current broadcasting frame number is less than the difference that actual play frame number deducts reference frame number, described reference frame number be described Flash file frame rate value 1/2nd.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Above to the synchronous method and system of playing of a kind of multiple terminals Flash provided by the present invention, be described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.