ID:161155
 
I've tried this code, but to no avail. I've tried a few other things and non of them seem to work...
mob/verb/Monkey_Vid_Please()showvid(src,'monkey.wmv',277)
proc/showvid(mob/m as mob,f,t as num)
var {w;h;s}
s=winget(m,"mainwindow","size")
w=text2num(copytext(s,1,findtext(s,"x")))
h=text2num(copytext(s,findtext(s,"x")+1))
var/html={"
<html>
<body bgcolor="black">
<!-- START FreeVideoCoding.com -->
<embed src=
[f] width="[w]" height="[h]" autostart="1" showcontrols="1" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"> </embed>
<!-- END FreeVideoCoding.com -->
</body>
</html>
"}

m<<browse(html,"window=video;can_close=0;size=[s]")
for(var/v=1 to t)sleep(1)
m<<browse(null,"window=video")

Has anyone ever tried this before?
Tubutas wrote:
Can byond Embed wmv's in to html files?

BYOND uses Internet Explorer to display HTML files. Therefore, if IE can, so does BYOND.
In response to Kaioken
Alright, but i was asking for dynamic things. Like pick a video then play, in a sense you answered but.. I want to know if byond's file procs are good enough to make what im doing work..
In response to Tubutas
Sure, that should definitely be possible. You'd need to send the file to the resource cache with browse_rsc() before it can be used in a webpage, though, just like you do with images.
In response to Kaioken
oh, right... browse rsc....YESH IT WORKED HUZZA ty.
In response to Tubutas
btw, it doesn't auto-play would anyone know how to do that?

Updated code
proc/showvid(mob/m as mob,f,t as num)
var {w;h;s;html;v}
s=winget(m,"mainwindow","size")
w=text2num(copytext(s,1,findtext(s,"x")))
h=text2num(copytext(s,findtext(s,"x")+1))
v=file(f)
m<<browse_rsc(v,"vid")
html={"
<html>
<body bgcolor="black">
<!-- START FreeVideoCoding.com -->
<embed src="vid" width="
[w]" height="[h]" autostart="YES" showcontrols="YES" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"> </embed>
<!-- END FreeVideoCoding.com -->
</body>
</html>
"}

m<<browse(html,"window=video;can_close=0;size=[w+50]x[h+50]")
for(var/z=1 to t)sleep(1)
m<<browse(null,"window=video")