Jump to content

Search the Community

Showing results for tags 'spotify'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Hi. I noticed new MTA version allows specifying headers in fetchRemote, so I could finally implement spotify remote controller (control locally running spotify from the game). I want to share the possibility with you, so here goes.. This is not ready for public use! Download https://www.upload.ee/files/7552466/_spotify_.zip.html Extract [spotify] inside server resources Start Spotify on same computer where you run the game. In MTA server, run one of (or all): spotify_cli, spotify_gui, spotify_notifier, spotify_status In MTA client permanently accept domain access for "open.spotify.com" (this is used anonymously, to get oauth token, MTA client has no spotify session data from you). You might need to reconnect to the server after that as I haven't handled the domain access. Troubleshooting/Feedback: * You might need to change the "starting port" in spotify_api/api.lua, line 42 from 4380 to something else, like 4371 (there currently seems to be a bug with port scanning because on my computer spotify was listening on two ports, both of them responded to version check, but actual status request failed on one of them. Will deal with that definitely if I have some feedback, like which ports people are using and which one is working for them) * New MTA version has "localhost" whitelisted by default. If it's not you will get prompt to whitelist it. * Currently spotify_api connects automatically on client resource start, but there is usecase where user alt+tabs out of game, starts Spotify and then we would like to try connecting again. Maybe you have some good ideas how to design the API for that - should it automatically retry connecting (if not connected) on any exported function call? Also, maybe there is good usecase that connecting should not be done on resource start at all and is deferred until really needed. Currently there might be substantial delay finding the correct port though, because fetchRemote timeout argument doesn't seem to have any effect, so the timeout is really slow (around ~1 sec) for each port. In given zip file it's not an issue as it is trying range 4380-4381 Unfortunately, the spotify remote control API that this resource is using, supports only few basic commands: starting specific track (in specific context (context not implemented in my resource yet)), pausing, resuming and getting current status (and track) info. That is all. No seeking, no volume change, no prev/next track (unless you know what is prev and next, and just play those tracks). Nevertheless the existing commands alone are pretty nice to have. My goal is to publish the spotify_api and let others implement their own usages (either incorporated into gamemode - i.e each map has it's own music; or create some nice GUI controller for the music). Provided spotify_cli and spotify_gui are just dumb interfaces so I know the API is actually working and designed ok. Provided examples: spotify_cli Adds commands to play specific track/playlist/album uri; play; pause. Type command 'spotify.commands' to see list of possible commands. spotify_gui Press 0 (as in zero) to show playlist GUI with play and pause buttons. Click on song name to start playing it. spotify_status Permanently shows current playing song and seek position. spotify_notifier Similar to spotify_status, but pops up only for few seconds when new song started and does not include playing time.
×
×
  • Create New...