@@ -22,7 +22,7 @@ export class fcpxmlBuilder extends baseXMLBUilder {
2222 }
2323 public projectBuildContext ( name : string , duration : number , l : ( ) => void ) : fcpxmlBuilder {
2424 this . putTag ( "project" , { name, uid : "" } , ( ) => {
25- this . putTag ( "sequence" , { duration : this . putSeconds ( duration ) } , ( ) => {
25+ this . putTag ( "sequence" , { duration : this . putSeconds ( duration ) , format : this . getLastFormat ( ) } , ( ) => {
2626 this . putTag ( "spine" , { } , ( ) => {
2727 l ( ) ;
2828 } ) ;
@@ -34,14 +34,15 @@ export class fcpxmlBuilder extends baseXMLBUilder {
3434 public putAsset ( name : string , duration : number ) : fcpxmlBuilder {
3535 this . putTag ( "asset" , {
3636 name,
37- src : name ,
38- format : this . IDs . format [ this . IDs . format . length - 1 ] . toString ( ) ,
37+ format : this . getLastFormat ( ) ,
3938 id : this . genID ( "asset" ) ,
4039 duration : this . putSeconds ( duration ) ,
4140 start : this . putSeconds ( 0 ) ,
4241 hasAudio : this . putBool ( this . conf . hasAudio ) ,
4342 hasVideo : this . putBool ( this . conf . hasVideo ) ,
44- } ) ;
43+ } , ( ) => this . putTag ( "media-rep" , {
44+ src : name ,
45+ } ) ) ;
4546 return this ;
4647 }
4748
@@ -65,9 +66,10 @@ export class fcpxmlBuilder extends baseXMLBUilder {
6566 this . IDs [ type ] . push ( id ) ;
6667 return id ;
6768 }
69+ private getLastFormat ( ) : string { return this . IDs . format [ this . IDs . format . length - 1 ] . toString ( ) ; }
6870
6971 private readonly conf = {
70- "version" : "1.9 " ,
72+ "version" : "1.10 " ,
7173 "hasAudio" : true ,
7274 "hasVideo" : true
7375 } as const ;
0 commit comments