Thanks to visit codestin.com
Credit goes to lib.haxe.org

HxUntitled

Full MP4 and Shader support for Haxe
https://github.com/BushTrain460615/HxUntitled

To install, run:

haxelib install HxUntitled 1.0.1 

See using Haxelib in Haxelib documentation for more information.

README.md

This might be the best haxelib it has it all

I want to make this be the only haxelib you need to build FNF so i need to put lime open fl and alot of other ones in here so look out for all that stuff coming to this lib right here

How To Install

Go To PowerShell Or CMD and enter this bash haxelib install text-haxe-extension

Credits for the libs

TODO

  • [x] Add HxCodec
  • [x] Add HxShaders
  • [x] Make This a official Haxelib

## instructions

hxCodec

A library which adds native video support for OpenFL and HaxeFlixel.

Original repository
Click here to check the roadmap


Instructions for Friday Night Funkin'

  1. Install the Haxelib You can install it through haxelib:
haxelib install hxCodec

You can also install it through Git for the latest updates:

haxelib git hxCodec https://github.com/polybiusproxy/hxCodec
  1. Add this code in Project.xml
<haxelib name="hxCodec" if="desktop || android" />

OPTIONAL: If you want debug traces in your console, add this code:

<!-- Show debug traces for hxCodec -->
<haxedef name="HXC_DEBUG_TRACE" if="debug" />
  1. Create a folder called videos in your assets/preload folder.

  2. Add this code in Paths.hx:

inline static public function video(key:String)
{
	return 'assets/videos/$key';
}

Playing videos

  1. Put your video in the videos folder.

Note: hxCodec supports all the video formats VLC can play!

  1. Add somewhere in PlayState:
function playCutscene(name:String, atEndOfSong:Bool = false)
{
	inCutscene = true;
	FlxG.sound.music.stop();

	var video:VideoHandler = new VideoHandler();
	video.finishCallback = function()
	{
		if (atEndOfSong)
		{
			if (storyPlaylist.length <= 0)
				FlxG.switchState(new StoryMenuState());
			else
			{
				SONG = Song.loadFromJson(storyPlaylist[0].toLowerCase());
				FlxG.switchState(new PlayState());
			}
		}
		else
			startCountdown();
	}
	video.playVideo(Paths.video(name));
}

Examples

At the PlayState "create()" function:

switch (curSong.toLowerCase())
{
	case 'song1':
		playCutscene('song1scene.asf');
	case 'song2':
		playCutscene('song2scene.avi');
	default:
		startCountdown();
}

At the PlayState "endSong()" function:

if (SONG.song.toLowerCase() == 'song1')
	playCutscene('song1scene.mjpeg', true);

Examples for Kade Engine 1.8

At the PlayState "create()" function:

generateSong(SONG.songId);

switch (curSong.toLowerCase())
{
	case 'song1':
		playCutscene('song1scene.mp4');
	default:
		startCountdown();
}

At the PlayState "endSong()" function:

PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0], diff);
FlxG.sound.music.stop();

switch (curSong.toLowerCase())
{
	case 'song1':
		playCutscene('song1scene.ogg', true);
	case 'song2':
		playCutscene('song2scene.wav', true);
}

Building

Windows and MacOS

You don't need any special instructions in order to build for Windows or MacOS. Just pull the lime build windows / lime build mac command and the library will be building with your game.

Linux

In order to make your game work with the library, you have to install libvlc-dev and libvlccore-dev from your distro's package manager.

Example with APT:

sudo apt-get install libvlc-dev
sudo apt-get install libvlccore-dev
sudo apt-get install vlc-bin

Android

In order for hxCodec to work on Android, you will need a library called extension-androidtools.

To install it, enter the following in a terminal:

haxelib git extension-androidtools https://github.com/MAJigsaw77/extension-androidtools.git

Next, add this into Project.xml

<haxelib name="extension-androidtools" if="android" />

Currently, hxCodec will search the videos only on the external storage of the device (/storage/emulated/0/MyAppName/assets/videos/yourvideo.mp4). You will also have to put the location manually in the paths.


HxShaders

  1. Paste this in your project.xml
  2. Go to your shader code. Remove the code that says import flixel.system.FlxAssets.FlxShader; and replace it with import tools.FlxShader;
Contributors
BushTrain460615
Version
1.0.1
Published
3 years ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub