<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, davidedmundson, fvogt.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15724">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>A player might emit a <tt style="background: #ebebeb; font-size: 13px;">play</tt> signal before its <tt style="background: #ebebeb; font-size: 13px;">duration</tt> is known.<br />
We want to avoid controlling short sounds (e.g. chat notifications) but I found the <tt style="background: #ebebeb; font-size: 13px;">duration</tt> often is <tt style="background: #ebebeb; font-size: 13px;">NaN</tt> on first invication when the sound is loaded for the first time.<br />
Defer activating the player until we get a <tt style="background: #ebebeb; font-size: 13px;">durationchange</tt> event for that player</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">No longer have it trying to control Facebook Messenger notification sounds</li>
<li class="remarkup-list-item">YouTube still works fine</li>
<li class="remarkup-list-item">Some random music stream (<tt style="background: #ebebeb; font-size: 13px;">duration</tt> of <tt style="background: #ebebeb; font-size: 13px;">Infinity</tt>) still works</li>
<li class="remarkup-list-item">HTML Media sessions example (both video and audo) still work fine</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R856 Plasma Browser Integration</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15724">https://phabricator.kde.org/D15724</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>extension/content-script.js</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, davidedmundson, fvogt<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>