Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android is now sending only one Idle state event on first play #167

Open
RavWar opened this issue Sep 20, 2023 · 0 comments
Open

Android is now sending only one Idle state event on first play #167

RavWar opened this issue Sep 20, 2023 · 0 comments

Comments

@RavWar
Copy link

RavWar commented Sep 20, 2023

Hi,

Recently (about a month ago or so) chromecasting from android phone stopped working properly, video player on the phone in 90% of cases becomes stuck and is not responding to any actions or commands. After debugging i found out it's due to Chromecast sending only one single Idle event at the start of first playback, but we wait for Playing event which is not sent. Because of this triggerReady is not firing and Chromecast tech is not completely initialized. Not sure if it's the best solution, but i've added additional !this._hasPlayedAnyItem condition here:

   _onPlayerStateChanged: function() {
      var states = chrome.cast.media.PlayerState,
          playerState = this._remotePlayer.playerState;

      // On android in the begginning statechange triggers only once with status Idle and not Playing
      if (playerState === states.PLAYING || !this._hasPlayedAnyItem) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant