<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Mod]Overlapping playback of 2 tracks of background music from the mod, how i can fix that?]]></title><description><![CDATA[<p dir="auto">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.<br />
My manifest.json:</p>
<pre><code>{
    "manifest_version": 3,
    "name": "S.T.A.L.K.E.R. &amp; 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"
                }
	    }
        }
    }
}
</code></pre>
<p dir="auto">Please tell me how i can fix that?</p>
]]></description><link>https://forums.opera.com/topic/60440/mod-overlapping-playback-of-2-tracks-of-background-music-from-the-mod-how-i-can-fix-that</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 17:30:32 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/60440.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Feb 2023 16:51:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Mod]Overlapping playback of 2 tracks of background music from the mod, how i can fix that? on Mon, 07 Oct 2024 16:29:13 GMT]]></title><description><![CDATA[<p dir="auto">Re: &lsqb;&lsqb;Mod]Overlapping playback of 2 tracks of background music from the mod](how i can fix that?)</p>
<p dir="auto">So yesterday I was trying to make a mod for opera gx for the first time and i went through the same problem <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/484939">@Mandi-OS</a> had a while ago, I wanted to have 2 options of music but using <a href="https://github.com/opera-gaming/gxmods/tree/main" target="_blank" rel="noopener noreferrer nofollow ugc">the official template</a> 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.</p>
<p dir="auto">A brief explanation:<br />
As explained in this video <a href="https://www.youtube.com/watch?v=BqsTvTCdcM0&amp;list=PLhIbBGhnxj5K6bC3aFiI2jAFy9kZ77jf3&amp;index=4" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>, 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.</p>
<p dir="auto">Official manifest layout:</p>
<pre><code>"background_music":
            [
                "music/track_1.mp3", &lt;- always playing
                "music/track_2.mp3" &lt;- from this point on, they will be played dynamically
            ],
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">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:</p>
<pre><code>"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"
  }
],
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
]]></description><link>https://forums.opera.com/post/361532</link><guid isPermaLink="true">https://forums.opera.com/post/361532</guid><dc:creator><![CDATA[GhostRiderX-X]]></dc:creator><pubDate>Mon, 07 Oct 2024 16:29:13 GMT</pubDate></item><item><title><![CDATA[Reply to [Mod]Overlapping playback of 2 tracks of background music from the mod, how i can fix that? on Thu, 20 Apr 2023 16:14:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/484939">@mandi-os</a> personally what I did is I combined all of the songs in adobe premier pro under one file , that way they don't overlap.</p>
]]></description><link>https://forums.opera.com/post/306988</link><guid isPermaLink="true">https://forums.opera.com/post/306988</guid><dc:creator><![CDATA[hisyu]]></dc:creator><pubDate>Thu, 20 Apr 2023 16:14:39 GMT</pubDate></item><item><title><![CDATA[Reply to [Mod]Overlapping playback of 2 tracks of background music from the mod, how i can fix that? on Thu, 20 Apr 2023 16:11:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/484939">@mandi-os</a> happens to me aswell</p>
]]></description><link>https://forums.opera.com/post/306987</link><guid isPermaLink="true">https://forums.opera.com/post/306987</guid><dc:creator><![CDATA[hisyu]]></dc:creator><pubDate>Thu, 20 Apr 2023 16:11:55 GMT</pubDate></item><item><title><![CDATA[Reply to [Mod]Overlapping playback of 2 tracks of background music from the mod, how i can fix that? on Sun, 26 Feb 2023 23:05:00 GMT]]></title><description><![CDATA[<p dir="auto">I have the same problem, whenever I click or use the keyboard to type all the music overlaps.</p>
]]></description><link>https://forums.opera.com/post/302089</link><guid isPermaLink="true">https://forums.opera.com/post/302089</guid><dc:creator><![CDATA[jedimaster123123]]></dc:creator><pubDate>Sun, 26 Feb 2023 23:05:00 GMT</pubDate></item></channel></rss>