StanzaJS Discussion - 2020-05-14


  1. Flavius Andrei hey, Lance
  2. Flavius Andrei is there a way to start a call on audio and later add a video track?
  3. Flavius Andrei peerTrackAdded is fired only the first time, when the initial call is created…
  4. Lance no
  5. Lance soon™ though. the published jingle engine isnt the one i want to use for it
  6. Flavius Andrei uhm..
  7. Flavius Andrei so… my option would be to hangup and call again, with video
  8. Flavius Andrei thanks
  9. Lance or a second session
  10. Flavius Andrei oh
  11. Flavius Andrei a second session
  12. Flavius Andrei so, right now i'm using an older stanza.browser.js from a jingle example of yours + ionic5 which is using angular 8, all on ts 3.4.3
  13. Flavius Andrei + stanza types i modified a bit to prevent some ts 3.7.2 errors
  14. Flavius Andrei is there a guide somewhere to follow to build the latest stanzajs for browser in order to give it a spin?
  15. Lance do you have the repo checked out?
  16. Lance npm run build
  17. Flavius Andrei angular 6 removed support for node polyfills so websocket connection to xmpp isn't working, with your latest stanzajs if i install it with npm in my project
  18. Lance will create a dist directory with the browserjs file in there
  19. Flavius Andrei and about the types? :)
  20. Flavius Andrei those are killing me :)
  21. Flavius Andrei actually, i guess i could use your latest types and just add // @ts-ignore on the lines unsupported by ts3.4.2...
  22. Lance the dist/npm directory is what gets sent to npm. all the d.ts files are scattered in there wherever tsc leaves them
  23. Flavius Andrei hmm
  24. Flavius Andrei https://github.com/legastero/stanza/blob/master/src/jingle/MediaSession.ts#L58-L70
  25. Flavius Andrei i could use that to add new tracks
  26. Flavius Andrei also if a user switches cameras…
  27. Flavius Andrei something like videoSender.replaceTrack(stream.getVideoTracks()[0]);
  28. Lance replaceTrack will work, since it won't need negotiation
  29. Flavius Andrei thanks
  30. Flavius Andrei should i create a stanzajs folder in node_modules in my project and put all the contents from dist/npm in it?
  31. Flavius Andrei to use your types?
  32. Flavius Andrei right now i have node_modules/@types/stanzaio where i have your modified types
  33. Lance that sounds reasonable to me
  34. Flavius Andrei yup, ts breaking changes :)
  35. Flavius Andrei An accessor cannot be declared in an ambient context.
  36. Flavius Andrei i mean
  37. Flavius Andrei node_modules/@types/stanza-types/jingle/Session.d.ts:42:9 - error TS1086: An accessor cannot be declared in an ambient context.
  38. Flavius Andrei as a workaround i'd write this get text(): string; as readonly text: string;
  39. Flavius Andrei uhm… i see no solution for the setters though…
  40. Flavius Andrei is there a point to this?
  41. Flavius Andrei get started(): boolean; set started(value: boolean);
  42. Flavius Andrei in StreamManagement
  43. Flavius Andrei should be started(value: boolean): boolean
  44. Flavius Andrei since it has getter and setter
  45. Flavius Andrei one last question :)
  46. Flavius Andrei the ask?: boolean; property on RosterItem is the equivalent of subscription === 'pending'?
  47. Lance yeah, ask is a pending-out subscription
  48. Flavius Andrei thanks