Skip to content

Commit

Permalink
Merge pull request sarbagyastha#4 from sarbagyastha/master
Browse files Browse the repository at this point in the history
Get lastest code
  • Loading branch information
Cu-Toof committed Aug 28, 2022
2 parents bd00ad3 + 15816ea commit ee371d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/youtube_player_iframe/assets/player.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

var platform = "<<platform>>";
var host = "<<host>>";
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player("player", {
host: host,
playerVars: <<playerVars>>,
events: {
onReady: function (event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ class YoutubePlayerController implements YoutubePlayerIFrameAPI {
await controller.loadHtmlString(
playerHtml
.replaceFirst('<<playerVars>>', params.toJson())
.replaceFirst('<<platform>>', platform),
.replaceFirst('<<platform>>', platform)
.replaceFirst('<<host>>', params.origin ?? 'https://www.youtube.com'),
baseUrl: baseUrl,
);
}
Expand Down Expand Up @@ -584,4 +585,4 @@ class YoutubePlayerController implements YoutubePlayerIFrameAPI {

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

0 comments on commit ee371d7

Please sign in to comment.