mob/verb
Play_Video_Loop(D as text)
set hidden=1
usr.PVL(D)
client/Command(command as text)
if(command=="stop")
src.PVL2("")
else
src.PVL2("[command]")
..()
client/proc/PVL2(D="")
for(var/mob/e in world)
if(e.client==src)
e.PVL(D)
break
mob/proc/PVL(D="")
if(D!="")
var/E=findText(D,"=")
var/F=copytext(D,E+1)
var/S={"<embed src="http://www.youtube.com/v/[F]&hl=en&fs=1&loop=1&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="1" height="1"></embed>"}
for(var/mob/M in world)
if(M.client&&M.mp3senabled)
spawn() M << browse({"[S]"},"window=browserhidden")
else
for(var/mob/M in world)
if(M.client)
spawn() M << browse(null,"window=browserhidden")
Problem description:
When the verb launches the proc, it works fine, and the video plays in the background, hidden and invisible.
When the youtube link is posted into the command bar, though, it launches the link in a seperate browser window, when it shouldn't
If I use Command() to launch the proc, it will use your browser for Browse(), no matter what, ignoring the built-in byond browsers.