apache / openmeetings

Mirror of Apache Openmeetings
Other
632 stars 257 forks source link

Trial update of kurento utils. #98

Closed sebawagner closed 3 years ago

sebawagner commented 4 years ago

This is not going to work. But just to demonstrate how close vs different this generated JS looks to ours.

The kurento-utils.js was created by: npm install kurento-utils

and then I created a input.js file: require('kurento-utils') {} And then I did run browserify with (you can install browserify with npm install -g browserify): browserify -s kurento-utils --bare input.js -o kurento-utils.js

Which created below kurento-utils.js file. Which looks similar but not the same and it also doesn't work.

sebawagner commented 4 years ago

DO NOT MERGE

solomax commented 4 years ago

Hello @sebawagner,

current kurento-utils seems to be the latest so I'm not sure why you would like to update it :)))

the steps I'm using:

  1. go to Maven central search for kurento-utils (for ex. here https://mvnrepository.com/artifact/org.kurento/kurento-utils-js)

  2. extract JS file out of it (not minified)

  3. merge (NOT replace) it with current version

    • replace var uuidv4 = require('uuid/v4'); with window.uuidv4 = require('uuid/v4');

    • remove insertScriptSrcInHtmlDom (definition and call)

    • add exports.browser = browser; to exports section

that's it :)

sebawagner commented 4 years ago

the would require us to wait for the maven release to be pushed which hasn't been done since a while. While the docker image for kurento actually has been updated more often. Looking at the tags there is also a 6.13.2 version of the software: https://hub.docker.com/r/kurento/kurento-media-server/tags

but there is no 6.13.2 version of the Maven release.

Seems like we would need to ask the to push another version or something.

sebawagner commented 4 years ago

Probably following this logic we would need to also specify the exact Kurento server version in our installation guide that corresponds to the utils version and integration.

Just saying "install kurento" that may not actually work.

sebawagner commented 4 years ago

There is also this comment from Jesus https://github.com/Kurento/kurento-utils-js/commit/5b80a375c71a18d0c36a36d7160fba145ff1764c#commitcomment-39885946

Pointing to yet another kurento-utils version that may have quite a number of fixes: https://github.com/piranna/kurento-utils-js

solomax commented 4 years ago

Hello @sebawagner,

I guess we can manually build kurento-utils from sources, but I would prefer to use releases we are currently using latest release https://github.com/Kurento/kurento-utils-js/releases

kurento-media-server is native application It most probably has different release schedule

Why do you think we need this library updated?

sebawagner commented 4 years ago

I can see explicit references to Safari in kurento-utils in the various updates and we have an issue in OpenMeeting where Safari doesn't publish Sounds/Microphone.

solomax commented 4 years ago

I can see no valuable fixes in diffs: https://github.com/Kurento/kurento-utils-js/compare/6.13.1...master

According Safari audio issue As I wrote before it most probably caused by this code: https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js#L79

I would test with codeblock at lines 79-99 commented out

solomax commented 4 years ago

JFYI kurento-utils was just updated to latest 6.14.0 release :)

sebawagner commented 4 years ago

I put some logging and output around the code in https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js#L79

And I did compare Safari and Chrome. There is no error or anything in particular different. You can also see in Safari that the audio stream is inside the track when it is calling: _stream.addTrack(track);

Below is some log output from Safari: It looks the same like on Chrome

[Log] navigator.mediaDevices.getUserMedia – {video: {frameRate: 30, width: 320, facingMode: {ideal: "user"}}, audio: {sampleRate: 22, echoCancellation: true, noiseSuppression: true}} (room-ver-1595649596917.js, line 313)

[Log] navigator.mediaDevices.getUserMedia – {video: {frameRate: 30, width: 320, facingMode: {ideal: "user"}}, audio: {sampleRate: 22, echoCancellation: true, noiseSuppression: true}} (room-ver-1595649596917.js, line 313)

[Log] stream.getAudioTracks().length – 1 (room-ver-1595649596917.js, line 319)

[Log] VideoUtil.isEdge() – false (room-ver-1595649596917.js, line 329)

[Log] stream.getVideoTracks() – [MediaStreamTrack] (1) (room-ver-1595649596917.js, line 337) [MediaStreamTrack]Array (1)

[Log] _stream.addTrack – MediaStreamTrack {kind: "video", id: "bcdd87d5-fb1f-49a7-a55e-3aab37e5eeab", label: "FaceTime HD Camera (Built-in)", …} (room-ver-1595649596917.js, line 339) MediaStreamTrack {kind: "video", id: "bcdd87d5-fb1f-49a7-a55e-3aab37e5eeab", label: "FaceTime HD Camera (Built-in)", enabled: true, contentHint: "", …}MediaStreamTrackcontentHint: ""enabled: trueid: "bcdd87d5-fb1f-49a7-a55e-3aab37e5eeab"kind: "video"label: "FaceTime HD Camera (Built-in)"muted: falseonended: nullonmute: nullonoverconstrained: nullonunmute: nullreadyState: "live"MediaStreamTrack Prototype

[Log] callback (3) (room-ver-1595649596917.js, line 345) {stream: Object, iceServers: [], instanceUid: "40e68f85-b2d7-4607-aa12-f8bad7cb784e"} {video: {frameRate: 30, width: 320, facingMode: {ideal: "user"}}, audio: {sampleRate: 22, echoCancellation: true, noiseSuppression: true}} MediaStream {id: "c2cb6d90-d3ff-484c-98c8-94a12a2228c9", active: true, onaddtrack: null, onremovetrack: null, getAudioTracks: function, …}

[Debug] Created SDP offer (settings-ver-1595649597421.js, line 6917)

[Debug] Local description set (settings-ver-1595649597421.js, line 6922) – "v=0\r↵o=- 7099854880187604162 2 IN IP4 127.0.0.1\r↵s=-\r↵t=0 0\r↵a=group:BUNDLE 0 1\r↵a=msid-semantic: WMS c2cb6d90-d3ff-484c-98c8-94a12a2228c9…"

Still the result is having no audio published on Safari.

solomax commented 3 years ago

I believe this one can be closed :)