Author Topic: Audio/Video in MOTD  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

Offline TheConsciousness

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Audio/Video in MOTD
« on: May 30, 2015, 01:54:28 PM »
Hi everyone. I've worked with ULX a bit in the past, but now I want to further customize the MOTD by adding in a short MP3 clip. Is there any way to add audio or video to the page?

Right now I've got:
Code: [Select]
<audio autoplay="true"><source src="sound.mp3" type="audio/mpeg"></audio>with the MP3 file placed in the motd.txt directory (which doesn't sound right); and it doesn't play. Is there a directory where I'll need to place the file so that it can be played?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Audio/Video in MOTD
« Reply #1 on: May 30, 2015, 03:37:56 PM »
You'll need to have the mp3 (or any other media) hosted on a actual http server somewhere.
Gmod's motd code doesn't transfer associated external files.
I'm not even sure it would let you use the virtual sounds associated with Source/Gmod that every player might have.
I'm not even sure Source's html (or Gmod's hack of it) would understand the audio tag.
It's very limited.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Audio/Video in MOTD
« Reply #2 on: May 30, 2015, 04:03:44 PM »
The only way I was able to get this to work was to embed a youtube video and hide it.
That was a while back though, don't know what works these days.