خلق من جانب الخادم تطبيق DVR لتكون قادرة على تسجيل DVR في FMS
-
03-07-2019 - |
سؤال
وأريد أن أكون قادرة على استخدام compability DVR في FMS3. ولكن للقيام بذلك لست بحاجة لتنفيذ تطبيق DVR من جانب الخادم جاء في الوثائق. المشكلة هي أنني لا يمكن العثور على أي مثال في هذا الشأن.
و"تحتاج إلى إضافة من جانب الخادم أكشن للتعامل مع تسجيل والصحيح أكشن العميل لاعب وسائل الاعلام الخاصة بك."
وأي مساعدة حول هذا البرنامج النصي من جانب الخادم سيكون موضع تقدير كبير!
والتحيات نيكلاس
المحلول 2
وحتى الآن يعمل، وهنا هو رمز من جانب الخادم لأولئك الذين في حاجة إليها في وقت ما:
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);
}
}
نصائح أخرى
وأعتقد أن هذا ما يفسر النصي جانب الملقم بشكل جيد إلى حد ما:
لا تنتمي إلى StackOverflow