-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
breakingBreaking API changesBreaking API changesjavascriptPull requests that update Javascript codePull requests that update Javascript code
Description
Several APIs take Sync as the first positional argument rather than as a property in the options/props object:
const sync = new Watch.Sync();
// Currently: sync is first arg
const muxer = new Watch.Mse.Muxer(sync, { paused: false });
const videoSource = new Watch.Video.Source(sync, { broadcast });
const audioSource = new Watch.Audio.Source(sync, { broadcast });It would be more consistent and ergonomic if sync were part of the props object:
const muxer = new Watch.Mse.Muxer({ sync, paused: false });
const videoSource = new Watch.Video.Source({ sync, broadcast });
const audioSource = new Watch.Audio.Source({ sync, broadcast });This aligns with how other options like broadcast, paused, canvas etc. are already passed as props. Having sync as a separate positional argument is the odd one out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breakingBreaking API changesBreaking API changesjavascriptPull requests that update Javascript codePull requests that update Javascript code