Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am danabenson on github.
* I am dana (https://keybase.io/dana) on keybase.
* I have a public key whose fingerprint is 75F6 5261 65A1 3821 FBAC F782 FB40 15D9 5833 9DE6
To claim this, I am signing this object:
@danabenson
danabenson / gist:5358031
Last active December 16, 2015 01:49
stream mp3 from fms
var serverUrl:String = "rtmp://localhost/simplevideostreaming";
var streamName:String = "mp3:xy.mp3";
var nc:NetConnection = null;
var nsPlay:NetStream = null;
function ncOnStatus(infoObject:NetStatusEvent)
{
trace("ncOnStatus: "+infoObject.info.code);
if (infoObject.info.code == "NetConnection.Connect.Success")
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ output extension=".tsproj" #>
-out app.js
<#
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#@ output extension=".ts" #>
<#
string dirPath = this.Host.ResolvePath("");
string[] tsFiles = Directory.GetFiles(dirPath, "*.ts", SearchOption.AllDirectories);