Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8783449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:49:58+00:00 2026-06-13T20:49:58+00:00

It triggers twice all the time with different values… This is my code: window.onload

  • 0

It triggers twice all the time with different values…

This is my code:

window.onload = function init() {
  console.log('subscribing')
  player.observe(models.EVENT.CHANGE, function (e) {
    console.log('e.data.curtrack %d', e.data.curtrack)
    console.log('e.data.playstate %d', e.data.playstate)
    console.log('---')
    console.log(player.playing)
  })
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:49:59+00:00Added an answer on June 13, 2026 at 8:49 pm

    Just confirmed it to be a Spotify client bug directly from the dev team on irc.
    This is a fix + other candies like a common event interface.

    https://gist.github.com/bc1a7e1c06c1077f238d (Emitter comes from the component repo https://github.com/component/emitter)

    Using my patch we can do something like this:

    var sp = getSpotifyApi(1)
    var models = sp.require('sp://import/scripts/api/models')
    var player = sp.require('player-fix').player
    
    window.onload = function init() {
      console.log('subscribing')
    
      player.on('play', function () {
        console.log('play')
      }).on('pause', function () {
        console.log('pause')
      }).on('trackChange', function (track) {
        console.log('trackChange', track.data.name)
      }).on('shuffleChange', function (shuffle) {
        console.log('shuffleChange', shuffle)
      }).on('repeatChange', function (repeat) {
        console.log('repeatChange', repeat)
      }).on('volumeChange', function (volume) {
        console.log('volumeChange', volume)
      }).on('contextChange', function () {
        console.log('contextChange')
      })
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code triggers the complaint below: #!/usr/bin/perl use strict; use warnings; my $s =
Tomcat deploy my project twice. is anybody faced and solved this issue?. This is
I'm attempting to load different content into a div, the refresh code I have
I have this MouseEvent function that I have totally no idea why it fired
can triggers be created in assemblies ?
Im creating Triggers and Action Application for my Final Year Project, I return a
Using PostgreSQL triggers, is it possible to record the changes that have happened to
I know about Allow Triggers to Fire Others server setting that allows the action
Do you see database triggers / referential integrity rules being used in a way
How can one use Triggers for Logging History of database changes in MySQL? If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.