video in Node-Webkit

0 favourites
From the Asset Store
8-bit retro-style music and sound effects: 10 loops-able music tracks and 301 individual SFX!
  • Hi there,

    Please help. Do anyone know how can I embed video with Node-Webkit? I'm using the video plugin from rexrainbow. It works on web. However, when I try to export my project to a standalone exe with NOde-Webkit, the embedded video gone away.

    Many thanks

  • I am also very interested if this can be done, I also need it for a project.

  • You could try this to turn the video into GIF:

    video-gif-converter.com

    Then do "Import frames" on a Sprite's animation, and highlight all the frames.

    And this to get the audio from the video:

    free-audio-editor.com/otherfreeproducts/free-video-to-audio-converter.htm

    Then you could try making some events to sync them :)

    Hopefully construct 2 will get a video plugin that works with Node Webkit/ Cocoonjs eventually, but this is what I do to get around it. Good Luck.

  • gifs as replacement to videos? oh gawd. That's terrible. But a workaround for now....

  • I don't know how the plugin works, but I'm guessing you'll need to find a way to get your project to include the video in export - perhaps using the files system?

  • Gifs? I would say no! Even linking Youtube videos would be better option. I think videos would be important for desktop games for multiple reasons.

  • Sorry I tried. -_-

  • Yeah, this is issue that Scirra doesn't add plugins to access Node-webkit API

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah, this is issue that Scirra doesn't add plugins to access Node-webkit API

    I really can't imagine why you'd want to directly access the Node-Webkit API through a graphical interface.

    What would you even gain from this?

    Other than changing the icon (which doesn't really require a new plugin but rather the exporter to add more user input to the package.json than it does right now), I can't think of a simple reason.

    Having access to a specific API isn't magically transforming all your code and what little you might want to add can already be done by using the browser object.

  • 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.

  • i wondered too how to add video not from serwer but display from media folder

  • 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.

  • Thanks a lot tanoshimi, tested it and it works :)

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)