ID:1732129
 
(See the best response by Nadrew.)
I have put together a video which I would like to be played replacing all the windows even the chat box on log in taking up the whole screen. How would I do this?

Your best bet is by having a global child/splitter control that you can switch the contents of on the fly and just have a full-window browser that you can stick in there with the HTML needed to display the video.
In response to Nadrew
Nadrew wrote:
Your best bet is by having a global child/splitter control that you can switch the contents of on the fly and just have a full-window browser that you can stick in there with the HTML needed to display the video.

Can you give me an example of how you would carry this out? First of all would I need to add a window to the interface which will cover the whole screen? If so how would I stop the user closing the window? May you write me an example of the required code?
Best response
This is more interface work than code work really, on your main window you'd have some kind of splitter control that contains the bulk of the rest of your interface in its own window, then you can set the 'left/top' parameter of that control to your browser window and output() the HTML required to display a video. If you need more info on the HTML required you'd be better off looking around Google.

If the user closes the window they'd be exiting the game, since you'd be showing the content in the default/main window.

The tricky part is knowing when the video is finished and taking the proper action, I haven't personally done much work with showing videos but I imagine it's possible to detect things like this, especially if you use a Flash-based video player.
In response to Nadrew
Nadrew wrote:
This is more interface work than code work really, on your main window you'd have some kind of splitter control that contains the bulk of the rest of your interface in its own window, then you can set the 'left/top' parameter of that control to your browser window and output() the HTML required to display a video. If you need more info on the HTML required you'd be better off looking around Google.

If the user closes the window they'd be exiting the game, since you'd be showing the content in the default/main window.

The tricky part is knowing when the video is finished and taking the proper action, I haven't personally done much work with showing videos but I imagine it's possible to detect things like this, especially if you use a Flash-based video player.



It really is a shame that I am terrible with interface work. Really need to improve on that.
So I have made the output window but my concern is just trying to get it to project the video? Would I upload it to YouTube then link it or have it in the game files or what?

winshow(src,"LoginVideo",1)
winset(src,"LoginVideo.Video","video = 'FootballManager15.wmv'")


Would I do it like that?
Google around for methods of showing videos using HTML and/or Flash, that's your best route I'd say for what you want, then you'd just use a browser control to display what you need.
I have tried 2 different solutions within the html format using the video element.

mob/proc/LoginVideo()
var/LoginVideovideo = {"
<html>
<title>Welcome to Football Manager</title>
</head>
<body bgcolor=#000000 text=#f5f5f5>
<video src="FootballManager15.wmv">
</video>

</body>
</html>
"}

src << browse(LoginVideovideo, "window=LoginVideo")


With that being the first and this being the second.

mob/proc/LoginVideo()
var/LoginVideovideo = {"
<html>
<title>Welcome to Football Manager</title>
</head>
<body bgcolor=#000000 text=#f5f5f5>

<video width="640" height="360"
src="FootballManager15.wmv"
</body>
</html>
"}

src << browse(LoginVideovideo, "window=LoginVideo")
In response to Nadrew
Nadrew wrote:
Google around for methods of showing videos using HTML and/or Flash, that's your best route I'd say for what you want, then you'd just use a browser control to display what you need.

^
In response to King_ed
BYOND does not support the <video> tag, as the browser BYOND uses does not adhere to the HTML5 specification. You'll have to use a Flash-made alternative.
In response to LordAndrew
LordAndrew wrote:
BYOND does not support the <video> tag, as the browser BYOND uses does not adhere to the HTML5 specification. You'll have to use a Flash-made alternative.

So how would I do this?
In response to King_ed
You'd have to find a Flash video player that can both be embedded on a webpage, and play the video format you have (which looks to be .wmv). You'll have to Google around for one, as I cannot think of any off the top of my head.
In response to LordAndrew
LordAndrew wrote:
You'd have to find a Flash video player that can both be embedded on a webpage, and play the video format you have (which looks to be .wmv). You'll have to Google around for one, as I cannot think of any off the top of my head.

Then if I find one how would I then get it to display in the interface?
In response to King_ed
You should be able to use browse() and display it embedded within your HTML output, like how you're trying to do with the video tag.
I have done what you have advised but it does not work?

mob/proc/LoginVideo()
var/LoginVideovideo = {"
<html>
<title>Welcome to Football Manager</title>
</head>
<link rel="stylesheet" href="//releases.flowplayer.org/5.5.2/skin/minimalist.css" >
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//releases.flowplayer.org/5.5.2/flowplayer.min.js"></script>
<!-- Include lines below to support multiple resolutions via quality selector plugin -->
<link rel="stylesheet" href="//flowplayer.org/drive/quality-selector.css">
<script src="//flowplayer.org/drive/quality-selector.js"></script>
<body bgcolor=#000000 text=#f5f5f5>
<div class="flowplayer" data-rtmp="rtmp://rtmp.flowplayer.org/cfx/st/" data-ratio="0.5625">
<video>
<source type="video/webm" src="http://drive.flowplayer.org/207783/39095-FootballManager15.webm">
<source type="video/mp4" src="http://drive.flowplayer.org/207783/39095-FootballManager15.mp4">
<source type="video/flash" src="mp4:207783/39095-FootballManager15.mp4">
</video>
</div>
</body>
</html>
"}

src << browse(LoginVideovideo, "window=LoginVideo")
In response to LordAndrew
LordAndrew wrote:
You should be able to use browse() and display it embedded within your HTML output, like how you're trying to do with the video tag.

^