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

  • Home
  • SEARCH
  • 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 6916227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:34:29+00:00 2026-05-27T09:34:29+00:00

Trying to play a specific track from an album with the player view. It

  • 0

Trying to play a specific track from an album with the player view.
It works all good when using

player.play(objTrack, objTrack.album);

But I don’t want the song to autoplay, so I’m using:

player.track = objTrack;
player.context = objTrack.album;

But when I do so, either it won’t work at all or it will start playing the first track of the album regardless which track I set.

How can I make this work? :/
Thanks.


This does not do the trick either.
I’m currently trying this method:

var album = m.Album.fromURI('spotify:album:7Kmmw7Z5D2UD5MVwdm10sT', function(album) {
   var player = new v.Player();
   player.track = album.get(3);
   player.context = album;
   document.body.appendChild(player.node);
});

But this will not fetch and play track number 3, it will play the first track of the album. And if the album only contains 1 track, it will crash. Any ideas?

  • 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-05-27T09:34:30+00:00Added an answer on May 27, 2026 at 9:34 am

    If you have the current track number I suppose you got it from a track object. Here is my way:

    // trackObj <- The track object
    
    var album = m.Album.fromURI('spotify:album:7Kmmw7Z5D2UD5MVwdm10sT', function(album) {
        var player = new v.Player();
        player.track = trackObj;
        album.get = function() {
            return trackObj;
        }
        player.context = album;
        document.body.appendChild(player.node);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to play continuous stream using android mediaplayer.but am not able to
I'm trying to play a specific portion of a mp3 file using MediaElement. I
I am trying to play audio in a Java applet but it is not
I am trying to play audio buffered sound (.wav) using AudioTrack. Please see the
I'm trying to play only part of a sound using FMOD, say frames 50000-100000
I'm trying to play a playlist I get using the MediaStore provider. However, when
I'm trying to play a sound based on which button is pressed using AVAudioPlayer.
I'm trying to make a simple xml-editor for some basic but specific needs, the
I'm trying to sync animation to music at a specific BPM. I've tried using
I'm trying to stream some youTube videos using the MPMoviePlayerController but I'm having some

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.