【问题标题】:Kurento Media server client-js for opencv-plugin-sample用于 opencv-plugin-sample 的 Kurento 媒体服务器 client-js
【发布时间】:2016-03-14 21:50:51
【问题描述】:

我做什么:

1.我从https://github.com/Kurento/kms-opencv-plugin-sample下载了更新的opencv_plugin-sample。

2.使用cmake-gui运行cmakelist,生成libkmsopencvpluginsamplemodule.so

我必须做什么:

1.现在我需要编写 kms-client-js 让 opencv-plugin-sample 在浏览器中运行

2.我按照http://doc-kurento.readthedocs.org/en/stable/mastering/develop_kurento_modules.html的指示进行操作

      cmake .. -DGENERATE_JS_CLIENT_PROJECT=TRUE

3.我将使用上述命令生成的js文件添加到kurento-crowddetector-client-js,将kurento-module-crowddetector.js路径替换为index.js中的OpencvPluginSample.js路径/strong>

4.当我从客户端路径运行http-server时,出现以下错误

     KurentoClient.js:15 Uncaught ReferenceError: require is not defined
     OpencvPluginSample.js:17 Uncaught ReferenceError: require is not defined
     index.js:64 Uncaught TypeError: Cannot read property 'register' of undefined

5.我必须做什么才能继续前进? 是否有任何文档可以为 opencv-plugin-sample 生成 client-js?

【问题讨论】:

    标签: kurento


    【解决方案1】:

    您不需要生成 kms-client-js。从那个错误来看,您似乎正在向浏览器应用程序添加一个 Node 模块。在将其添加到客户端代码之前,您需要 browserify 该模块。

    【讨论】:

    • ,感谢您的回复,我需要用于浏览器的javascript的client-js(不适用于node的javascript)
    • client-js 已经发布在Bower,所以你只需要浏览你生成的模块。添加新模块时没有任何变化,只是需要包含在模块创建器中生成的代码。
    • @igcracia,我已经使用浏览器的 javascript 运行了 kms-crowddetector 示例。从人群检测器 client-js 文件夹中,运行 1.bower install 2.http-server
    • 我误解了生成client-js和前端组件的过程。您是否有任何分步文档描述“开发新模块后如何实现 client-js 和前端组件”。这对我很有帮助。谢谢
    • 如果有机会,请加入这个房间chat.stackexchange.com/rooms/info/36966/kurento-media-server
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-08
    • 1970-01-01
    • 1970-01-01
    • 2016-06-12
    • 1970-01-01
    相关资源
    最近更新 更多