0 Favourites

Construct 2 Video Playback

  • Just a quick couple of questions regarding Construct 2.

    Is C2 capable of video playback? And if so, more importantly, can C2 render dynamic elements on top of the video region?

    I should add that a sprite animation is not a viable option in my case.

  • Video plugin

    That should work, haven't used it myself. :)

  • Thank you for pointing that out. I have looked into this plugin already though, and at it appears at least, by default, to render on top of all other elements in the C2 runtime. I don't know if it is possible to force a different behavior however.

  • Bump.

    Just wanted to confirm that this is the final word on the issue and that as it stands, there exists no practical way to render a video in the background, behind dynamic elements in C2.

  • The video plugin uses a html element that sits on top of the canvas. You can't put it between layers but you might be able to put it behind your game. If you set the video's z-index with CSS and make the background of your game transparent. Might work.

  • Ah, thank you. That sounds like an option worth pursuing. I'll try to post back here if I get it to work.

  • So I managed to manipulate the video element to an extent using CSS.

    My experience with CSS is quite limited however I can for example, hide the video with a simple: "visibility: hidden;".

    However, if I try to change the z ordering of the video element by applying: "z-index: -1;", The video seems to remain on top.

    I have placed other objects in the layout on multiple separate layers (some above the video object). When using "z-index: -1;", I see none of these other objects on top of the video.

    Would anyone have any thoughts or suggestions as to what I am doing wrong?

  • Bump... again. I was just wondering if anyone knew what I might be doing wrong here? It may be something simple but it's also beyond my poor knowledge of construct 2 and CSS.

  • Sorry for the constant replies. I believe that I have solved this one. Although quite what I was doing wrong I am still not sure.

    Though it is unlikely that anyone else would want to do this, as far as I know, using the simple "z-index: -1'" in CSS seems to place the video in the background.

    Naturally you will want to ensure that all other layers above the video have a transparent background if you want to see the video.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • No, not the only one! I have the exact same problem now. So could you give a more detailed description of your solution?

    Should this be edited in a file after export or is it through some plugin that you edit the css?

  • Though I believe that there are multiple ways to accomplish this, I used this plugin.

    CSS Import Plugin

  • thank you. I've installed the plugin <img src="smileys/smiley1.gif" border="0" align="middle" />

    ehm.. and what did you do then? Sorry but I've never dealt with css and I'm completely blank as to how to implement this.

  • Oh.. nevermind. Turns out that was pretty easy <img src="smileys/smiley17.gif" border="0" align="middle" />

    For others interested:

    Give the video instance an ID.

    make a document with this text:

    #videoID{

         z-index: -1;

    }

    save as style.css. Import to Files in c2. Then make an On start of layout event that imports the css-file through the plugin and then it works.

    On another note; is anyone else experiencing that video is shaking slightly unless it's placed at 0,0 on stage?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
1,586 437,312
matriax's avatar
matriax
Unread hot topic Locked topic
0 Favourites
Construct 3 any news?
889 125,612
uzumiapps's avatar
uzumiapps
Unread hot topic
353 32,094
yojona's avatar
yojona