script for opening a video as a local file?

Does anyone know a way to open a local file (a video) instead of through Youtube in Quest? Thanks.


I would guess you can use the msg command, and have it print out some HTML to show the video. There is a page on what HTML to use here:
http://www.w3schools.com/tags/tag_video.asp

If using the web editor, actually getting the video uploaded will be a problem.


Thanks for the help. I'm using the desktop version now. I will try that.


Couldn't get it to work with the msg command, nor with the print web page command. If you know any other ways, please advise.


What exactly did you try? Could you paste the code or even just the text in the msg command into a post?

Thinking about it, you may need to use GetFileURL to access the file.
https://github.com/ThePix/quest/wiki/Images-Part-01:-Basic-techniques


I found a way to open an online movie by using an embed command in Print Web Link, but I've tried this and other methods of attempting to open a local movie file with no success. It seems that the program just cannot find a local movie, whether using Print Message or Print Web Link. It will load the player with an empty screen, but never loads the video.
I'll fiddle around with GetFileUrl and see if I can get that to work.

The common way to open a local file using: (I left the end brackets out because they won't print in this message)

video width="320" height="240" controls>
source src="movie.mp4" type="video/mp4"
</video

will show the movie player in Print Message but never opens the designated video file, whether it's in the same directory as the .aslx file or in a different one that is assigned.
I've tried a few other methods but the results are always the same. No video is found.
Thanks for your help.


Have you tested this within Quest or in a browser with an uploaded game? The Quest engine can not play mp4. It is using the native chrome engine and this does not support mp4. Browser like Chrome or Firefox however can play mp4, but IE does not. Best is to read this: http://html5please.com/ (search for "< video>")


Yes, I've tested it within the Quest desktop version. I use Chrome as a browser. What kinds of video formats does Quest support?
What about opening an html file within the Quest directory to open the movie? Would this possibly work?


Have a look at this: https://www.chromium.org/audio-video (Quest is using Chromium)
You can't open a html page in Quest or start an external Browser. And don't forget that your game should run in the Quest desktop version and as uploaded game in the online webplayer. So if you really want to show videos in a game you must use the HTML5 tag VIDEO. There you can define several sources for a video something like

<video width="320" height="240" controls>
 <source src="movie.mp4" type="video/mp4">
 <source src="movie.ogg" type="video/ogg">
</video> 

so that the web component of Quest or of the used Browser can choose the file which can be displayed correctly


I've already tried that script and others but they don't work. I've tried it with mp4, ogg, avi, wmv and other video formats, using Print Message. I place the video in the same directory as the .aslx file and the program will load the player but not the video. If you should find another means of playing a local video in the program, please let me know. Thanks.


You probably need to use GetFileURL as well, if you intend to upload, so Quest can find the file.

msg("<video width=\"320\" height=\"240\" controls>")
msg("<source src=\"" + GetFileURL("movie.mp4") + "\"type=\"video/mp4\">")
msg("</video>")

Did you manage to get this working?

Technically it should work, I can trigger sounds using HTML5. I've never managed to get it working with video though.


out of curiosity, what does Quest use for a video player?


It doesn't. You can host a YouTube video and that's it.


well, then, that's alkemist's problem - and yours, silver. you have to have a video player to play a video. Youtube has a video player and when you use a link to a URL on youtube, you're just telling youtube to play the video.

If you want to use a video that's not on youtube, you're going to have to figure out how to code a video player into Quest. And I'm guessing that's not happening anytime soon.

So - solution: create a channel on youtube for your game videos, and nothing else, and put your videos there. Not a good solution if you want to play videos you don't have the right to - but then you shouldn't be doing that anyway.


The proposed solution is to use html5. It works with sounds but I've never got It to work with video. Nobody seems to know why it doesn't work.

Anyway given that Quest games have a 20MB limit it seems almost pointless to do anyway.


But the video tag for html 5 is just a tag. it's not a player. The tag tells the browser to play a video. However, it only works because the browser in question has a built in video player.

The tag is intended to replace shockwave flash for playing videos in web browsers. But for Quest to use it, Quest would not only need to understand that the tag meant play a video, but also have a native, built in player to play the video with.

Which is why you don't get video. Quest doesn't have a built in player.


It isn't Quest that has the player, it's whatever browser you're using (online) or chromium for offline.

That's why you can trigger audio with html5. Technically it should be possible to do with video also (as it works with audio).


you're calling Quest from a browser. But the browser isn't going to read Quest's code to see you need to play a video. You'll need to call the video in the html page you're also calling quest from.

The video called that way isn't going to play inside quest, it'll play in the page that you're going to run quest from. But it will play separately. And that's not what the OP wanted. Or at least not what I understood.

I understood that the OP wanted to open a video inside Quest rather than just calling a link to a youtube video. Which can't be done, with or without html 5. The reason being that the VIDEO tag that has been enabled in html5 is just a tag. IF placed inside a web page's html code, it tells the browser to use its own video player to play the video.

But using the VIDEO tag inside quest isn't using it inside the html code of the webpage. You're using it inside an application that the webpage is serving up. And the browser isn't going to play your video just because you used the tag.

Quest, the application, needs to be coded so that when it sees the VIDEO tag in its own code, it knows to tell the browser to kick off its video player.


Then audio triggered by html5 shouldn't work either as audio also needs a player. It is also just a tag that Quest doesn't know is telling it to play audio.

Yet it works.


documentation says that Quest is using Chrome as the browser. So - that asks the question is Chrome using the html5 video tag or is it just firefox and IE. And also, has the Chrome browser underneath Quest's hood been updated to understand what the html 5 video tag is?


It is specifically the desktop version using Chrome as the browser. The web player uses whatever the player is using.


As I explained earlier xD


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums