kurento js 连接测试 demo

张映 发表于 2018-07-11

分类目录: nodejs/vue/js/jquery

标签:, ,

1,clone kurento-tutorial-js

# git clone https://github.com/Kurento/kurento-tutorial-js.git

如果clone比较慢,直接下载zip

2,合并server.crt server.key

将kurento-hello-world/keys文件下,server.crt server.key,合并到defaultCertificate.pem

# cat /etc/kurento/defaultCertificate.pem //新建一个pem文件
-----BEGIN RSA PRIVATE KEY----- //server.key的内容
MIIEogIBAAKCAQEAwk7I4cn6slYkRDs/uQqhZrfV9/uEo1nEXqxgTmUWLekFhYhj
。。。。。。。。。。。。。。。。。
nFWlTP4Urs8PeykvK9ao8r/T8BnPIC16U6ENYvAc0mRlFA2j1GA=
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE----- //server.crt的内容
MIIDBjCCAe4CCQCuf5QfyX2oDDANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJB
。。。。。。。。。。。。。
dCSsLJlXyqAQFg==
-----END CERTIFICATE-----

3,修改kurento的配置文件

# cat /etc/kurento/kurento.conf.json
{
  "mediaServer" : {
    "resources": {
      //Resources usage limit for raising an exception when an object creation is attempted
      "exceptionLimit": "0.8",
      // Resources usage limit for restarting the server when no objects are alive
      "killLimit": "0.7",
        // Garbage collector period in seconds
        "garbageCollectorPeriod": 240
    },
    "net" : {
      "websocket": {
        "port": 8888,
        "secure": {
          "port": 8433,
          "certificate": "defaultCertificate.pem",
          "password": ""
        },
        "registrar": {
          "address": "ws://localhost:9090",
          "localAddress": "localhost"
        },
        "path": "kurento",
        "threads": 10
      }
    }
  }
}

2,3二步,为了解决,remote stream 没有视频的问题。

4,安装nodejs

# apt-get install nodejs
# npm install -g bower
# npm install -g http-server

5,启动kurento服务

# /etc/init.d/kurento-media-server-6.0 start
# cd kurento-hello-world
# bower install
# http-server -p 8443 -S -C keys/server.crt -K keys/server.key
Starting up http-server, serving ./ through https
Available on:

https://127.0.0.1:8443

https://192.168.0.247:8443

Hit CTRL-C to stop the server

注意:bower install,http-server这二个命令,要用非root账号运行



转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/jsjquery/1940.html