Skip to content

Commit

Permalink
Remove video iframe element from DOM when not visible
Browse files Browse the repository at this point in the history
  • Loading branch information
amits97 committed Nov 1, 2023
1 parent c9ac076 commit 64d9a0e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naadan-chords",
"version": "0.79.5",
"version": "0.79.6",
"homepage": "https://www.naadanchords.com/",
"private": true,
"dependencies": {
Expand Down
10 changes: 6 additions & 4 deletions src/containers/ContentParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,12 @@ export default class ContentParser extends Component {
</Tab.Pane>
<Tab.Pane eventKey="video">
<div className="tab-contents chord-sheet">
<YouTubeEmbed
youtubeId={youtubeId}
onLoad={this.hideVideoTab}
/>
{this.state.activeTab === "video" && (
<YouTubeEmbed
youtubeId={youtubeId}
onLoad={this.hideVideoTab}
/>
)}
</div>
</Tab.Pane>
</Tab.Content>
Expand Down

0 comments on commit 64d9a0e

Please sign in to comment.