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

在使用OffscreenSprite及Combinator将一段音频文件和一段视频文件合并成视频之后,视频可以在浏览器中正常播放并通过进度条控制播放时间,但是将这个视频下载到本地之后通过播放器却无法控制播放时间和快进呢? #89

Closed
Mik-pan opened this issue Apr 22, 2024 · 3 comments

Comments

@Mik-pan
Copy link

Mik-pan commented Apr 22, 2024

`

    const audioSpr = new OffscreenSprite(
        'audioSpr',
        new AudioClip((await fetch(audioSrc)).body, {
            loop: false
        })
    )

    const videoSpr = new OffscreenSprite(
        'videoSpr',
        new MP4Clip((await fetch(videoSrc)).body)
    )

    const com = new Combinator({
        width: this.options.width,
        height: this.options.height
    })
    
    await com.add(videoSpr, { duration: mergeDuration, main: true })
    await com.add(audioSpr)


    const blob = await new Response(com.output() ?? com).blob()
    const videourl = URL.createObjectURL(blob)

`

@hughfenghen
Copy link
Member

hughfenghen commented Apr 22, 2024

#60 请优化 issue 样式

@hughfenghen
Copy link
Member

本地不行是播放器兼容性问题,参考 #20

@Mik-pan
Copy link
Author

Mik-pan commented Apr 22, 2024

明白,我参考了一下[#20 ],应该可以解决这个问题,谢谢!

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