ID:81583
 
Not a bug
BYOND Version:454
Operating System:Windows XP Home
Web Browser:Firefox 3.5.2
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND Developer forums.
Descriptive Problem Summary:

Numbered Steps to Reproduce Problem:
1.) Insert code below and open up Dream Seeker
2.) 'This Works' pops up a youtube video on a popup window to play music
3.) 'This Doesnt Work' should still play the music while hiding the window, but instead you can't hear the music
4.) 'Display', thus, also hides sounds associated with the window

Code Snippet (if applicable) to Reproduce Problem:
    This_Works()
var/videolink="http://www.youtube.com/watch?v=ejEVczA8PLU"
if(videolink!="")
var/E=findText(videolink,"=")
var/F=copytext(videolink,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="250" height="250"></embed>"}
for(var/mob/M in world)
if(M.client)
spawn()
M << browse({"[S]"},"window=flash")
else
for(var/mob/M in world)
if(M.client)
spawn() M << browse(null,"window=flash")
This_Doesnt_Work()
var/videolink="http://www.youtube.com/watch?v=ejEVczA8PLU"
if(videolink!="")
var/E=findText(videolink,"=")
var/F=copytext(videolink,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="250" height="250"></embed>"}
for(var/mob/M in world)
if(M.client)
spawn()
M << browse({"[S]"},"window=flash;display=0")
else
for(var/mob/M in world)
if(M.client)
spawn() M << browse(null,"window=flash;display=0")


Expected Results:
To hear sounds with 'This Doesnt Work', while not seeing the video

Actual Results:
You can't hear the video nor see it

Does the problem occur:
Every time? Or how often? Every Time
In other games? Not applicable
In other user accounts? Not applicable
On other computers? Yes

When does the problem NOT occur?
If you use a sort of workaround

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) Not sure.

Workarounds:
There's probably some out there. None of which is too convenient
display 0 doesn't do (output) anything, it just sends the data to the user for later use.
"If it is turned off (display=0), the text or file is simply sent to the user and expected to be referenced later."
EDIT: If you want to output something to a hidden browser, use one in the interface.