Skip to content

Commit

Permalink
add comment for audio detection
Browse files Browse the repository at this point in the history
  • Loading branch information
harisha-swaminathan committed Mar 17, 2022
1 parent 6edb802 commit 1cecdfe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/control-bar/picture-in-picture-toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class PictureInPictureToggle extends Button {
this.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], (e) => this.handlePictureInPictureEnabledChange(e));

this.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], () => {
// This audio detection will not detect HLS or DASH audio-only streams because there was no reliable way to detect them at the time
const isSourceAudio = player.currentType().substring(0, 5) === 'audio';

if (isSourceAudio || player.audioPosterMode() || player.audioOnlyMode()) {
Expand Down

0 comments on commit 1cecdfe

Please sign in to comment.