Skip to content

Commit

Permalink
fix(FEC-11122): chromecast - pre-roll ad failed to be skipped during …
Browse files Browse the repository at this point in the history
…the casting (#588)
  • Loading branch information
yairans committed Apr 5, 2021
1 parent a7a8ccd commit 7c0acd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ad-skip/ad-skip.js
Expand Up @@ -41,6 +41,10 @@ class AdSkip extends Component {
return Math.ceil(this.props.adSkipTimeOffset - this.props.currentTime);
}

skipAd = () => {
this.props.player.ads.skipAd();
};

/**
* render component
*
Expand All @@ -51,7 +55,7 @@ class AdSkip extends Component {
if (this.props.adSkippableState) {
return this.getSkipTimeOffset() <= 0 ? (
<Localizer>
<a className={[style.btn, style.btnBranded, style.btnSkipAd].join(' ')} onClick={this.props.player.ads.skipAd}>
<a className={[style.btn, style.btnBranded, style.btnSkipAd].join(' ')} onClick={this.skipAd}>
<Text id="ads.skip_ad" />
</a>
</Localizer>
Expand Down

0 comments on commit 7c0acd7

Please sign in to comment.