Skip to content

Commit 446fd06

Browse files
committed
fix: videoId with dashes broken on start
Ref: sarbagyastha#1128
1 parent c83cbe1 commit 446fd06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/youtube_player_iframe/lib/src/controller/youtube_player_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class YoutubePlayerController implements YoutubePlayerIFrameAPI {
327327

328328
/// The unique player id.
329329
@internal
330-
String get playerId => 'Youtube${key ?? hashCode}';
330+
String get playerId => 'Youtube${key ?? hashCode}'.replaceAll('-', '_');
331331

332332
/// MetaData for the currently loaded or cued video.
333333
YoutubeMetaData get metadata => _value.metaData;

0 commit comments

Comments
 (0)