Skip to content

syncing multiple media on one timing src  #28

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions