shaka-player icon indicating copy to clipboard operation
shaka-player copied to clipboard

Wrong caption icon (including demo)

Open jakubkrolikowski opened this issue 3 years ago • 4 comments

Have you read the FAQ and checked for duplicate open issues? yes

What version of Shaka Player are you using? 3.3x, 4.1.x

Can you reproduce the issue with our latest release version? yes

Can you reproduce the issue with the latest code from main? yes

Are you using the demo app or your own custom app? yes

What did you do?

I think the caption select icon in the overflow menu is set to "OFF" when it should be in "ON" mode. When any subtitles track is selected the icon should be ON. Currently, icon says "captions are disabled" when they are not. Look at Angel One demo:

image

The bug is in shaka-player/ui/text_selection.js:

 onCaptionStateChange_() {
    if (this.player.isTextTrackVisible()) {
      this.icon.textContent =
          shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS_OFF; // here should be CLOSED_CAPTIONS
      this.button.ariaPressed = 'true';
    } else {
      this.icon.textContent =
          shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS; // here should be CLOSED_CAPTIONS_OFF
      this.button.ariaPressed = 'false';
    }

    this.controls.dispatchEvent(
        new shaka.util.FakeEvent('captionselectionupdated'));
  }

jakubkrolikowski avatar Jul 15 '22 21:07 jakubkrolikowski

Yes, I think you're right! Would you care to make a PR to resolve this?

joeyparrish avatar Jul 22 '22 20:07 joeyparrish

@joeyparrish @jakubkrolikowski could i work on this

kartikeyshaurya avatar Jul 30 '22 05:07 kartikeyshaurya

@kartikeyshaurya Yes, please, I'm out of office till August 22nd.

jakubkrolikowski avatar Jul 30 '22 17:07 jakubkrolikowski

@kartikeyshaurya, I assigned the issue to you. You should always feel free to work on PRs without waiting for assignment, though.

joeyparrish avatar Aug 01 '22 16:08 joeyparrish