Skip to content

[BUG] SyntaxError: Unexpected identifier when the video ID contains double dash #1144

@kostas95

Description

@kostas95

Is there an existing issue for this?

  • I have searched the existing issues

Package

youtube_player_iframe (Default)

What happened?

I'm implementing a YoutubePlayerController using the fromVideoId constructor.

The video Id of my video on youtube is xDCwOCS--h0

When I init my widget, I get the log

SyntaxError: Unexpected identifier 'h0' and the video widget is black

What is the expected behaviour?

The player should be built (instead of empty widget), be displayed on screen and play the Youtube video

How to reproduce?

  1. Flutter Channel stable, 3.38.2
  2. On web and mobile
  3. Create a simple implementation using videoId xDCwOCS--h0
  4. In the console of IDE there's a log SyntaxError: Unexpected identifier 'h0'

Flutter Doctor Output

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions