Skip to content

Using an array for URL breaks the code #906

Description

@lcukerd

Declaring Urls as described here will break the code and cause Error

Current Behavior

Error occurs. You get

Uncaught TypeError: url.match is not a function
    at YouTube.load (YouTube.js:170)
    at Object.onMount (Player.js:83)

Expected Behavior

Player should load both URL and give option to play either (similar to when loading playlist).

Steps to Reproduce

Create player like
<ReactPlayer playing url={['https://www.youtube.com/watch?v=d46Azg3Pm4c', 'https://www.youtube.com/watch?v=eVsXVzSse8I']} />

Environment

  • Browser: Chrome
  • Operating system: MacOs 10.15.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions