Skip to content

syncing multiple media on one timing src  #28

@augustblack

Description

@augustblack

Hi,

Thanks again for this great library.

I'm trying some new things out and wanted to see if I could sync multiple media on one looping time src. I want to skew each media based on when they should start in the loop.

I do:

const loopLength = 20
const timingObject = new TimingObject()
const loopTime = new LoopConverter(timingObject, [0, loopLength])

const player = new window.Audio(url)
const sync = new MCorp.mediaSync(player, loopTime, {skew}) 

However, when I do so (skew is a positive number between 0 and loopLength), nothing plays - I hear no audio.

If I remove the skew and only do const sync = new MCorp.mediaSync(player, loopTime)

I can at least hear the audio play, but all of the media start at 0 in the loopTime.

If I set the skew to be negative and do const sync = new MCorp.mediaSync(player, loopTime, {skew: -1 * skew})

It kind of works, but does a bunch of funny things.

Any advice on how I might proceed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions