You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

j1.js 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. // glob_u2.cb.ws.reg_cb(update_ui,"WS_OPEN:","update_ui")
  2. // glob_u2.cb.ws.reg_cb(update_ui,"WS_CLOSE:","update_ui")
  3. // glob_u2.cb.ws.reg_cb(update_ui,"WS_MSTO_INITED","update_ui")
  4. // glob_u2.msto.conference.events.all = {type:"reply_info"}
  5. // glob_u2.msto.conference.events.all={type:"avio.set_mute.."}
  6. function function_name2(o) {
  7. clog("function_name2",arguments)
  8. // glob_u2.msto
  9. if (glob_u2.data.channel_name == o.o.val.to){
  10. location.replace(o.o.val.url)
  11. }
  12. }
  13. function function_name(o) {
  14. // body...
  15. clog("function_name",arguments)
  16. if(location.host.split(".")[0].includes("r")){
  17. clog("?????????????????????????????r:",o.o.val.url)
  18. if (window.nginx_info){
  19. location.replace(o.o.val.url)
  20. } {
  21. }
  22. }
  23. }
  24. function set_remote_loc(url){
  25. glob_u2.msto.conference.events.all={type:"set_remote_loc",url:url}
  26. }
  27. function set_remote_loc2(url,to){
  28. glob_u2.msto.conference.events.all={type:"set_remote_loc2",url:url,to:to}
  29. }
  30. // glob_u2.cb.ord_v1.ord.reg_cb(function_name,"STO_EVENT:avio.set_mute")
  31. // glob_u2.cb.ws.reg_cb(function_name,"STO_EVENT:set_remote_loc")
  32. // set_remote_loc("https://xtr.jfidev.com/loc.a/indx/index.new.html/nv_j9_dep.j9_dev.prx_dev.invite_dev.dev_av_io.av_jsync/room4")
  33. function reply_info(o){
  34. clog("reply_info",arguments)
  35. glob_u2.msto.my_channel.a="a"
  36. }
  37. function add_info(){
  38. clog("add_info??")
  39. // might rename or move later
  40. var con_info = window?.get_con_info?.() || {role:"None",isJitsi:0}
  41. glob_u2.msto.my_channel.role = con_info.role
  42. glob_u2.msto.my_channel.inIframe = window.self !== window.top;
  43. // inIframe = window.self !== window.top;
  44. // glob_u2.msto.my_channel.r1 = "con_info.role"
  45. // delete glob_u2.msto.ws_channels["specific.b29d1db1b97640d585a10cf432c8b417!2a8d7e4b69e44f41a3fb5168ca0b17ee"]
  46. // delete glob_u2.msto.ws_channels["specific.b29d1db1b97640d585a10cf432c8b417!2a8d7e4b69e44f41a3fb5168ca0b17ee"]
  47. glob_u2.msto.my_channel.c =!!window?.APP
  48. glob_u2.msto.my_channel.href =location.href
  49. glob_u2.msto.my_channel.rem = "<!--#echo var="REMOTE_ADDR" -->"
  50. // con_info.isJitsi
  51. // con_info.inVideoChat
  52. glob_u2.msto.my_channel.isJitsi = con_info.isJitsi
  53. glob_u2.msto.my_channel.inVideoChat = con_info.inVideoChat
  54. // glob_u2.msto.my_data.displayName =JSON.parse(localStorage["features/base/settings"]).displayName
  55. if (localStorage["features/base/settings"]){
  56. glob_u2.msto.my_data.displayName =window?.APP?.store?.getState?.()?.["features/base/settings"]?.displayName || JSON.parse(localStorage["features/base/settings"]).displayName
  57. glob_u2.msto.my_channel.displayName =window?.APP?.store?.getState?.()?.["features/base/settings"]?.displayName || JSON.parse(localStorage["features/base/settings"]).displayName
  58. }
  59. // glob_u2.msto.my_channel.href20 ="location.href."
  60. // str.replace(/^"(.+(?="$))"$/, '$1');
  61. glob_u2.msto.my_data.jsync_d1 = localStorage.jsync_d1
  62. glob_u2.msto.my_channel.jsync_d1 = localStorage.jsync_d1
  63. glob_u2.msto.my_data.jsync_dev_type = localStorage.jsync_dev_type
  64. }
  65. // cause I cant come up with a name
  66. // jsync_lsto_d1
  67. function set_remote_jsync_lsto(key,val,to){
  68. glob_u2.msto.conference.events.all={type:"set_jsync_lsto",subtype:"set_lsto",key,val,to}
  69. }
  70. function rec_jsync_lsto(o,scope,info){
  71. // var ev = o.o.val
  72. // location.replace(o.o.val.url)
  73. var evo = o.parsed.payload.val
  74. // evo
  75. switch (evo.subtype) {
  76. case "set_lsto":
  77. if (glob_u2.data.channel_name == o.o.val.to){
  78. if (typeof(evo.val) == "object"){
  79. localStorage[evo.key] = JSON.stringify(evo.val)
  80. } else {
  81. localStorage[evo.key] = evo.val
  82. }
  83. }
  84. break;
  85. default:
  86. }
  87. // if ()
  88. // clog("rec_jsync_lsto",o,scope,info,this,"?",evo)
  89. }
  90. // set_jsync_lsto
  91. // glob_u2.msto.conference.events.all={type:"set_jsync_lsto",subtype:"set_lsto",key:"jsync_d1",val:[1,2,4,6]}
  92. // glob_u2.msto.conference.events.all={type:"reply_info"}
  93. function fno(argument) {
  94. glob_u2.cb.ws.reg_cb(rec_jsync_lsto,"STO_EVENT:set_jsync_lsto")
  95. glob_u2.cb.ws.reg_cb(function_name,"STO_EVENT:set_remote_loc")
  96. glob_u2.cb.ws.reg_cb(function_name2,"STO_EVENT:set_remote_loc2")
  97. glob_u2.cb.ws.reg_cb(add_info,"STO_EVENT:reply_info")
  98. glob_u2.cb.ws.reg_cb(add_info,"WS_MSTO_INITED","add_info")
  99. // rldi.setint(15050)
  100. }
  101. console.log("av_jsync!",document.readyState)
  102. if (document.readyState != "complete"){
  103. onload.fno.arr_m = onload.fno.arr_m || []
  104. onload.fno.arr_m.push(fno)
  105. } else {
  106. fno()
  107. add_info()
  108. }