Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replay video with tradition has some errors #41

Closed
Statfine opened this issue Apr 20, 2017 · 2 comments
Closed

replay video with tradition has some errors #41

Statfine opened this issue Apr 20, 2017 · 2 comments

Comments

@Statfine
Copy link

const node = this.ctx.video('mp4');
node.startAt(0);
node.stopAt(5);

const node2 = this.ctx.video('mp4');
node2.startAt(2);
node2.stopAt(10);

const node3 = this.ctx.video('mp4');
node3.startAt(7);
node3.stopAt(15);

const node4 = this.ctx.video('mp4');
node4.startAt(15);
node4.stopAt(20);

const node5 = this.ctx.video('mp4');
node5.startAt(20);
node5.stopAt(27);

const crossFade = this.ctx.transition(VideoContext.DEFINITIONS.HORIZONTAL_WIPE);
const crossFade2 = this.ctx.transition(VideoContext.DEFINITIONS.CROSSFADE); // 渐显
const crossFade3 = this.ctx.transition(VideoContext.DEFINITIONS.CROSSFADE); // 渐显
const crossFade4 = this.ctx.transition(VideoContext.DEFINITIONS.CROSSFADE); // 渐显

// 1 2 平移
node.connect(crossFade);
node2.connect(crossFade);
crossFade.transition(2, 5, 0.0, 1.0);

// 2 3 渐显
crossFade.connect(crossFade2); // connect to input of crossfade2 rather than destination.
node3.connect(crossFade2);
crossFade2.connect(this.ctx.destination);
crossFade2.transition(7, 10, 0.0, 1.0);

// 4 无特效
node4.connect(this.ctx.destination);

// 5 开始
node5.connect(crossFade3);
crossFade3.connect(this.ctx.destination);
crossFade3.transition(20, 23, 1.0, 0.0);

The code is like this; first play is all right; but when i replay it after first end; some node show nocontant in this.ctx.registerCallback('nocontent', function () { console.log('nocontent'); }); has something wrong with it or did I make a mistake?

@MatthewShotton
Copy link
Contributor

Hi @Statfine
I'm having trouble reproducing this bug, I've used your code and added the following callback to make the VideoContext replay:

this.ctx.registerCallback("ended", ()=>{
    this.ctx.currentTime = 0;
    this.ctx.play();
});

and i'm not seeing any "nocontent" callbacks being called.

Could you confirm that your using the latest build of VideoContext (v0.39.0)? A bug related to this was fixed in 0.38.3.

Kind regards,
Matt

@Statfine
Copy link
Author

@MatthewShotton you are right; used old version cause this bug. After update it to 0.39; all right.Thanks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants