• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    [Mod]Overlapping playback of 2 tracks of background music from the mod, how i can fix that?

    Opera GX
    5
    6
    1656
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mandi-OS
      Mandi-OS last edited by Mandi-OS

      I create mod which reproduces background music, and i have 2 track(track_1.mp3 and track_2.mp3), when i install this mod in Opera and turned on background music, plays only first track, and the second track overlaps, not all of it, always when i use keyboard or mouse.
      My manifest.json:

      {
          "manifest_version": 3,
          "name": "S.T.A.L.K.E.R. & Metro",
          "description": "Mod for S.T.A.L.K.E.R. and Metro fans",
          "version": "1.1",
          "icons":
          {
              "1540": "icon_1540.png"
          },
          "developer":
          {
              "name": "Mandi_OS"
          },
          "mod":
          {
              "schema_version": 1,
              "payload":
              {	
                  "background_music":
                  [
                      "music/track_1.mp3",
                      "music/track_2.mp3"
                  ],
      
                  "wallpaper":
                  {
                      "dark":
                      {   
      		    "image": "wallpaper/wallpaper_1.jpg",
      		    "text_color": "#FFFFFF",
                          "text_shadow": "#757575"
                      },
      		    "light":
                      {   
      	            "image": "wallpaper/wallpaper_1.jpg",
                          "text_color": "#FFFFFF",
                          "text_shadow": "#0B000E"
                      }
      	    }
              }
          }
      }
      

      Please tell me how i can fix that?

      Reply Quote 1
        hisyu 2 Replies Last reply
      • jedimaster123123
        jedimaster123123 last edited by

        I have the same problem, whenever I click or use the keyboard to type all the music overlaps.

        Reply Quote 1
          1 Reply Last reply
        • hisyu
          hisyu @Mandi-OS last edited by

          @mandi-os happens to me aswell

          Reply Quote 0
            1 Reply Last reply
          • hisyu
            hisyu @Mandi-OS last edited by

            @mandi-os personally what I did is I combined all of the songs in adobe premier pro under one file , that way they don't overlap.

            Reply Quote 1
              1 Reply Last reply
            • GhostRiderX-X
              GhostRiderX-X last edited by

              Re: [[Mod]Overlapping playback of 2 tracks of background music from the mod](how i can fix that?)

              So yesterday I was trying to make a mod for opera gx for the first time and i went through the same problem @Mandi-OS had a while ago, I wanted to have 2 options of music but using the official template both were played at same time dynamically , after a lot of testing I found out why and how to fix it (to some degree), I am making this post hoping it will help people who face the same situation in the future.

              A brief explanation:
              As explained in this video here, with the official manifest layout if you list more than one music, the first music listed will always be played and any musics after it will be played as the the browser identifies actions like clicks, new tabs, etc. I think this is called dynamic background music.

              Official manifest layout:

              "background_music":
                          [
                              "music/track_1.mp3", <- always playing
                              "music/track_2.mp3" <- from this point on, they will be played dynamically
                          ],
              

              If you want to make it play one music and then another, unfortunately as far as I know you need to unite the musics into one through an music editor and only add the united version of the musics.

              But if instead you want to have many musics in a single Mod so the final user can select the one they want, i found this alternative:

              "background_music": [
                {
                  "id": "music1",
                  "name": "track_1_name",
                  "author": "author_1",
                  "tracks": [
                    "music/track_1.mp3"
                  ],
                  "Description": "track_1 of author_1"
                },
                {
                  "id": "music2",
                  "name": "track_2_name",
                  "author": "author_2",
                  "tracks": [
                    "music/track_2.mp3","music/track_2.mp3"
                  ],
                  "Description": "track_1 of author_1"
                }
              ],
              

              In case someone doesn't understand the structure, "id" identifies the music, "name" is the name displayed in background music configuration tab, if you don't provide an "author" your "developer": {"name": "your_name"} is shown as the author of the music, in "tracks" you can list one or many musics (many if you want dynamic background music),i assume "Description" exists since it didn't trigger any errors and the native background musics of the browser have one but it's not shown in opera://settings/background_music_settings, so it's completely optional.

              If anyone finds a way to play one music and then another without uniting the musics feel free to reply this post, I tried looking through a lot of reddit, opera forums posts, github docmuentation and youtube videos and didn't find anything relevant, I feel lucky I even managed to find a solution for having many musics in a single Mod on my own.

              Reply Quote 0
                1 Reply Last reply
              • leocg
                leocg Moderator Volunteer last edited by This post is deleted!
                Reply Quote 0
                  1 Reply Last reply
                • First post
                  Last post

                Computer browsers

                • Opera for Windows
                • Opera for Mac
                • Opera for Linux
                • Opera beta version
                • Opera USB

                Mobile browsers

                • Opera for Android
                • Opera Mini
                • Opera Touch
                • Opera for basic phones

                • Add-ons
                • Opera account
                • Wallpapers
                • Opera Ads

                • Help & support
                • Opera blogs
                • Opera forums
                • Dev.Opera

                • Security
                • Privacy
                • Cookies Policy
                • EULA
                • Terms of Service

                • About Opera
                • Press info
                • Jobs
                • Investors
                • Become a partner
                • Contact us

                Follow Opera

                • Opera - Facebook
                • Opera - Twitter
                • Opera - YouTube
                • Opera - LinkedIn
                • Opera - Instagram

                © Opera Software 1995-2025