Skip to content

Commit

Permalink
fix podcast autoplays (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Oct 8, 2023
1 parent 5402e5e commit dce524d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ function generateCard(tweet, tweetElement, user) {
tweetElement.getElementsByClassName('tweet-card')[0].append(buttonGroup);
} else if(tweet.card.name === "player") {
let iframe = document.createElement('iframe');
iframe.src = tweet.card.binding_values.player_url.string_value.replace("autoplay=true", "autoplay=false");
iframe.src = tweet.card.binding_values.player_url.string_value.replace("autoplay=true", "autoplay=false").replace("autoplay=1", "autoplay=0");
iframe.classList.add('tweet-player');
let [w, h] = sizeFunctions[1](+tweet.card.binding_values.player_width.string_value, +tweet.card.binding_values.player_height.string_value);
iframe.width = w;
Expand Down

0 comments on commit dce524d

Please sign in to comment.