video in Node-Webkit

Discussion and feedback on Construct 2

Post » Wed Feb 20, 2013 9:16 pm

I've not used the "video" plugin, but I've embedded videos by using the HTML_Div_Pode plugin and then just adding a <video> tag in the innerHTML, referencing a video file in the project. Works great for me, whether exported to web or Node-Webkit.
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Wed Feb 20, 2013 9:45 pm

i wondered too how to add video not from serwer but display from media folder
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Wed Feb 20, 2013 10:26 pm

Hey guys!

So I did some experimenting and got a video to play. There may be other methods, but this one worked the first time I tried it.

Add the video file to your project files and also add the browser object to your project. Use the browser object to load the video.

Browser > Go to URL (or a new window/optional) > type the name of your video file in the quotes. Example: if you added the video, "vid.mp4" then type that exactly in the quotes. The video should play fine with sound and whatnot.

One way to use this to show videos is to have a hidden layer with a black background that hides the rest of the layout and display the video on top of this; alternately, you could just load it in a different layout.

Does anyone know a way, using the browser object and URL, to control the size of the video? If we could, we might use this method to display a video on an in-game TV, for example.

The other issue is the video files are usually very large, so optimizing the format and keeping the video length small is crucial.

EDIT: this was done with r119 and Chrome. I'm guessing the video will have to be in a format compatible with browsers. I have no idea if there is a "universal" format that all browsers recognize.Space Ape2013-02-20 22:28:16
B
16
S
6
G
2
Posts: 152
Reputation: 3,764

Post » Thu Feb 21, 2013 11:55 am

Thanks a lot tanoshimi, tested it and it works :)
B
10
S
1
Posts: 26
Reputation: 1,007

Post » Thu Feb 21, 2013 12:16 pm

Can I only play OGG video's in node webkit because when I use mp4 it works in browser but when I export as node-webkit it does not play.
B
10
S
1
Posts: 26
Reputation: 1,007

Post » Thu Feb 21, 2013 1:31 pm

Node Webkit is based on Chrome, so naturally you'd have to convert your media files to OGG since that's what Chrome supports.
B
6
S
2
Posts: 206
Reputation: 1,685

Post » Sun Jun 23, 2013 5:25 pm

[QUOTE=tanoshimi] I've not used the "video" plugin, but I've embedded videos by using the HTML_Div_Pode plugin and then just adding a <video> tag in the innerHTML, referencing a video file in the project. Works great for me, whether exported to web or Node-Webkit.[/QUOTE]

I also use HTML_Div_Pode Plugin and adding a specific file video in the innerHTML it's work great when export in HTML5 but it's doesn't work in Node-Webkit.

could you tell me some trick to lunch video file through Node-Webkit
B
4
Posts: 16
Reputation: 864

Post » Mon Jul 01, 2013 12:26 pm

@mcnolia44
"
<video width='"&WindowWidth/2&"' height='"&WindowHeight/2&"' controls preload='meta'>
     <source src='1A.webm' type='video/webm' />
     <source src='1A.ogv' type='video/ogg' />
     Video cannot be displayed. Try updating your browser.
</video>

"
Theres my code that is in my pode_div. Also you need to use webM or ogg video format for it too play. Dont forget to include the files in your project folder. Hope it helps :)


While i'm on the topic, im struggling to get the fullscreen and video scrolling controls to work. Last time I had this problem putting it in an iframe worked. This doesn't seem to fix the problem in node webkit.

Any help would be appreciated

Thank youDaganRead2013-07-01 12:28:57
B
3
Posts: 5
Reputation: 208

Post » Thu Dec 05, 2013 9:18 am

[QUOTE=kentkan] Thanks for all of your input. Eventually, I found a way to solve that issue. Just a few steps.

1. Input your video(mp4) to 'Files'
2. Setup your video in the 'Video' plugin
3. Export with Node-webkit... Probably, it doesn't work
4. Then, it's the tricky thing... replace the 'ffmpegsumo.dll'. It comes with the latest Chrome.[/QUOTE]

Wow !!! Kentkan This is AWESOME !!!
Thank you
B
11
S
1
Posts: 84
Reputation: 1,462

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: RookieDev, Thirstyy and 11 guests