Skip to content

Commit

Permalink
Merge pull request sarbagyastha#5 from Cu-Toof/feature/update_player_…
Browse files Browse the repository at this point in the history
…html

Disable all gesture on player
  • Loading branch information
Cu-Toof authored Aug 28, 2022
2 parents ee371d7 + 6729c4f commit 78bee2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/youtube_player_iframe/assets/player.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@
height: 100%;
background-color: black;
}

html {
width: 100%;
height: 100%;
background-color: black;
}

#player {
pointer-events: <<disablePlayerGestures>>;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ class YoutubePlayerController implements YoutubePlayerIFrameAPI {

await controller.loadHtmlString(
playerHtml
.replaceFirst(
'<<disablePlayerGestures>>',
params.showControls ? 'all' : 'none',
)
.replaceFirst('<<playerVars>>', params.toJson())
.replaceFirst('<<platform>>', platform)
.replaceFirst('<<host>>', params.origin ?? 'https://www.youtube.com'),
Expand Down Expand Up @@ -585,4 +589,4 @@ class YoutubePlayerController implements YoutubePlayerIFrameAPI {

/// Disposes the resources created by [YoutubePlayerController].
void close() => _valueController.close();
}
}

0 comments on commit 78bee2c

Please sign in to comment.