File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed
Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ function App() {
273273 : ( await fetch ( './video/bunny_0.mp4' ) ) . body ! ;
274274 const clip = new MP4Clip ( stream ) ;
275275 const spr = new VisibleSprite ( clip ) ;
276+ // spr.rect.fixedAspectRatio = true;
276277 await avCvs ?. addSprite ( spr ) ;
277278 addSprite2Track ( '1-video' , spr , '视频' ) ;
278279 } }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ interface MP4DecoderConf {
2525 audio : AudioDecoderConfig | null ;
2626}
2727
28- interface MP4ClipOpts {
28+ export interface IMP4ClipOpts {
2929 audio ?: boolean | { volume : number } ;
3030 /**
3131 * 不安全,随时可能废弃
@@ -120,11 +120,11 @@ export class MP4Clip implements IClip {
120120 audio : null ,
121121 } ;
122122
123- #opts: MP4ClipOpts = { audio : true } ;
123+ #opts: IMP4ClipOpts = { audio : true } ;
124124
125125 constructor (
126126 source : OPFSToolFile | ReadableStream < Uint8Array > | MPClipCloneArgs ,
127- opts : MP4ClipOpts = { } ,
127+ opts : IMP4ClipOpts = { } ,
128128 ) {
129129 if (
130130 ! ( source instanceof ReadableStream ) &&
@@ -518,7 +518,7 @@ function genDecoder(
518518 } ;
519519}
520520
521- async function mp4FileToSamples ( otFile : OPFSToolFile , opts : MP4ClipOpts = { } ) {
521+ async function mp4FileToSamples ( otFile : OPFSToolFile , opts : IMP4ClipOpts = { } ) {
522522 let mp4Info : MP4Info | null = null ;
523523 const decoderConf : MP4DecoderConf = { video : null , audio : null } ;
524524 let videoSamples : ExtMP4Sample [ ] = [ ] ;
Original file line number Diff line number Diff line change 1+ export { createChromakey } from './chromakey' ;
12export { renderTxt2ImgBitmap } from './dom-utils' ;
23export { fastConcatMP4 , fixFMP4Duration , mixinMP4AndAudio } from './mp4-utils' ;
3- export { createChromakey } from './chromakey' ;
44
55export {
6- MP4Clip ,
7- ImgClip ,
86 AudioClip ,
9- MediaStreamClip ,
107 EmbedSubtitlesClip ,
8+ ImgClip ,
9+ MP4Clip ,
10+ MediaStreamClip ,
1111} from './clips' ;
12- export type { IClip } from './clips' ;
13- export { OffscreenSprite } from './sprite/offscreen-sprite' ;
14- export { VisibleSprite } from './sprite/visible-sprite' ;
15- export { Rect } from './sprite/rect' ;
12+ export type { IClip , IMP4ClipOpts } from './clips' ;
1613export { Combinator } from './combinator' ;
1714export type { ICombinatorOpts } from './combinator' ;
15+ export { OffscreenSprite } from './sprite/offscreen-sprite' ;
16+ export { Rect } from './sprite/rect' ;
17+ export { VisibleSprite } from './sprite/visible-sprite' ;
1818
1919export { Log } from '@webav/internal-utils' ;
You can’t perform that action at this time.
0 commit comments