Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Online Music


varinyc
 Share

Recommended Posts

I'm trying to get my client to play an mp3 from online instead of my music folder.

I went into map settings, put the url in, checked the url checkbox, and I've even tested to make sure it worked by clicking play.. but when the map loads it says it's an incorrect URL.

o.0 Am I doing something wrong/incomplete? or is there a way to fix this?

PS: it's my site, I'm hosting the music and I have unlimited bandwidth so, no worries there.
Link to comment
Share on other sites

Hmm, I remember reading the url box is broken by default.
I forgot what topic it was in, but it is broken.

So, I would stick to the music folder.
I tried to do that, it played but when I hit save it said that same thing as yours.
Link to comment
Share on other sites

mp3 seems to work for me, especially since that's all i've used

Here's how I got it working so far:

Replace the following:
```
Public Sub PlayBGM(Song As String)
    If ReadINI("CONFIG", "Music", App.Path & "\config.ini") = 1 Then
        If FileExists("\Music\" & Song) Then
            If Not LenB(Song) = 0 Then
                If Not Left$(Song, 7) = "http://" Then
                    Call frmMirage.MusicPlayer.PlayMedia(App.Path & "\Music\" & Song, True)
                    CurrentSong = Song
                Else
                    Call frmMirage.MusicPlayer.PlayMedia(Song, True)
                    CurrentSong = Song
                End If
            End If
        Else
            Call AddText(Song & " does not exist!", BRIGHTRED)
        End If
    End If
End Sub

```
with this:
```
Public Sub PlayBGM(Song As String)
    If ReadINI("CONFIG", "Music", App.Path & "\config.ini") = 1 Then
        If Not LenB(Song) = 0 Then
            If Not Left$(Song, 7) = "http://" Then
                If FileExists("\Music\" & Song) Then
                    Call frmMirage.MusicPlayer.PlayMedia(App.Path & "\Music\" & Song, True)
                    CurrentSong = Song
                Else
                    Call AddText(Song & " does not exist!", BRIGHTRED)
                End If
            Else
                Call frmMirage.MusicPlayer.PlayMedia(Song, True)
                CurrentSong = Song
            End If
        End If
    End If
End Sub

```
and replace the following:
```
Public Sub MapMusic(ByVal Song As String)
    If Not Map(GetPlayerMap(MyIndex)).music = CurrentSong Then
        Call PlayBGM(Map(GetPlayerMap(MyIndex)).music)
    End If
End Sub

```

with this:
```
Public Sub MapMusic(ByVal Song As String)
    If Not Map(GetPlayerMap(MyIndex)).music = CurrentSong Then
        Call StopBGM
        Call PlayBGM(Map(GetPlayerMap(MyIndex)).music)
    End If
End Sub

```
The only problem with this, is the user is responsible for valid links. But other than that, I've had no problems.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...