Skip to content

Inconsistent name of constructor vs factory method for media nodes #1205

@rtoy

Description

@rtoy

I think in all cases, if we have a constructor named FooNode, the corresponding factory method is called createFoo. Except for the media nodes. We have

  • MediaElementAudioSourceNode -> createMediaElementSource
  • MediaStreamAudioSourceNode -> createMediaStream
  • MediaStreamTrackAudioSourceNode -> createMediaStreamTrackSource
  • MediaStreamAudioDestinationNode -> createMediaStreamDestination

I find this rather annoying because I always forget the the factory method is named slightly differently from the node.

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