创建服务器端DVR应用程序,以便能够在FMS中记录DVR

时间:2009-04-30 08:17:25

标签: flex flash server-side fms3 dvr

我希望能够在FMS3中使用DVR兼容性。但要做到这一点,我需要实现它在文档中说的服务器端DVR应用程序。问题是我找不到任何关于此的例子。

“您需要添加服务器端ActionScript来处理录制内容以及正确的客户端ActionScript到您的媒体播放器。”

http://help.adobe.com/en_US/FlashMediaLiveEncoder/3.0/Using/WS0C4F8D5E-0388-4d1e-AE60-D5B3FB1BC682.html

非常感谢有关此服务器端脚本的任何帮助!

关心Niclas

2 个答案:

答案 0 :(得分:0)

我相信这很好地解释了服务器端脚本:

http://labs.influxis.com/?p=92

答案 1 :(得分:0)

所以现在它可以工作,这是有时需要它的人的服务器端代码:

application.onAppStart = function()
{}

application.onConnect = function(p_c)
{
  this.acceptConnection(p_c);
}

application.onPublish = function (p_c, p_stream)
{
   p_stream.record();
}

application.onUnpublish = function(p_c, p_stream)
{
   p_stream.record(false);
}

Client.prototype.FCPublish = function(streamname) 
{ 
   this.call("onFCPublish", null, { code:"NetStream.Publish.Start", description:streamname } ); 
} 

Client.prototype.FCUnpublish = function(streamname) 
{ 
    this.call("onFCUnpublish", null, { code:"NetStream.Unpublish.Success", description:streamname } ); 
} 




Client.prototype.releaseStream = function(streamname) 
{}

 Client.prototype.DVRSetStreamInfo = function(info)
 { 

    s = Stream.get("mp4:" + info.streamName + ".f4v");

    if (s) 
    {       

       if (info.append)
          s.record("append");

       else
          s.record();

       s.play(info.streamName);
  } 

}