I made a simple video / sound player [symbol] for beginners.
This Media Player can be used to play local / streamed video or sound files (.mp4 and .ogv/ogg), it has easy alpha support option, and has some Properties that can be used by States for people who don’t like scripting. It is easy to use and can also be controlled by scripts.
Media Player Properties:
- Time (in ms)
- Volume (0=silent - 1=100%)
- Alpha Video (activate splitted mask mode for videos, see informations below)
- Time display (show current and total time on video)
Exported functions that can be called from the parent script -
Media_Player.nodes.script.source(string); Media_Player.nodes.script.start(); Media_Player.nodes.script.pause(); Media_Player.nodes.script.loop(integer); Media_Player.nodes.script.time(integer); Media_Player.nodes.script.volume(float); Media_Player.nodes.script.alpha(boolean); Media_Player.nodes.script.tdisplay(boolean);
The stop function also emits custom events -
Hope it helps, please try it and tell me if any problem / feel free to improve.
Media Player.zpp (374.9 KB)
(add it to your new project hierarchy).