Sign in to follow this  
TimoMazzika

how to Start Music C# !!

Recommended Posts

If you want to start a music/sound from the game you need to execute

mp.game.audio.triggerMusicEvent(eventName);

eventName is the name of the sound/music from the game. You can get the list of them here.

If you want to play your own music you can just start that in the browser itself. Play music and hide the browser. You do not have to have the player controls and can control the HTML media player via JS. More info here.

Share this post


Link to post
Share on other sites
4 hours ago, Stan9964 said:

If you want to start a music/sound from the game you need to execute

mp.game.audio.triggerMusicEvent(eventName);

eventName is the name of the sound/music from the game. You can get the list of them here.

If you want to play your own music you can just start that in the browser itself. Play music and hide the browser. You do not have to have the player controls and can control the HTML media player via JS. More info here.

Reminder: Chromium Embedded Framework doesn't comes with the anility to read mp3 and some other formats by default(licenses issues) and in the current version I think George forgot to add them into the rage build.

Also you may have some problems with the autoplay feature too, where the user may need to trigger a click/keypress to start the music. This can also be editet in the config for CEF but as above I'm not sure if George has done that in the current version because I saw some people complaining about it.

Share this post


Link to post
Share on other sites
On 4/30/2019 at 5:31 PM, robearded said:

Also you may have some problems with the autoplay feature too, where the user may need to trigger a click/keypress to start the music.

What if you hide the controls and trigger play with JavaScript?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.