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.

Hooks.js 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. import React, { Component } from 'react';
  2. import { MiddlewareRegistry } from '../../react/features/base/redux';
  3. clog("zxi .",window.dev_middleware_listner)
  4. if (window.dev_middleware_listner){
  5. MiddlewareRegistry.register(store => next => action => {
  6. // clog("dbg zyx",action.type)
  7. // if
  8. setTimeout(window.dev_middleware_listner,1,{store,next,action,that:this})
  9. // window.dev_middleware_listner({store,next,action,that:this})
  10. // switch(action.type){
  11. // case "CONFERENCE_JOINED":
  12. // }
  13. return next(action);
  14. });
  15. }
  16. // clog("JX_dev2" ,window.dev_middleware_listner)
  17. // var CornerObj = {"ABC":"123"}
  18. var CornerUI = {"ABC":"1234"}
  19. var CornerUI2 = {"ABC":"12345"}
  20. class CornerObj2 extends Component<Props> {
  21. constructor(){
  22. super(...arguments)
  23. clog("hook CornerObj",this,arguments)
  24. }
  25. render() {
  26. // console.log("JDI CO rend SmallVideo",SmallVideo)
  27. // First make sure we are sensitive enough.
  28. // const audioLevel = Math.min(this.props.audioLevel * 1.2, 1);
  29. // const location = "LOCO";
  30. // console.log("jdr CornerObj rend",this,this.corner_data,this.corner_data2)
  31. // Let's now stretch the audio level over the number of dots we have.
  32. // const stretchedAudioLevel = AUDIO_LEVEL_DOTS * audioLevel;
  33. // const audioLevelDots = [];
  34. clog("hook render CornerObj",this,arguments)
  35. clog("hook render CornerObj props",this.props)
  36. // { this.corner_data }
  37. // {window.abc}
  38. return (
  39. <span className="jspan_c">
  40. {this.props.children}
  41. </span>
  42. );
  43. }
  44. }
  45. class CornerObj extends Component<Props> {
  46. constructor(){
  47. super(...arguments)
  48. this._props = $.extend(true,{},this.props)
  49. this._props.className = Object.assign(this._props.className || "" )
  50. this._props.className ? 0 : this._props.className=""
  51. this._props.className = "dev_hook " + this._props.className
  52. // this._props.type ? : = "span"
  53. clog("hook CornerObj",this,arguments)
  54. }
  55. render() {
  56. // type
  57. // console.log("JDI CO rend SmallVideo",SmallVideo)
  58. // First make sure we are sensitive enough.
  59. // const audioLevel = Math.min(this.props.audioLevel * 1.2, 1);
  60. // const location = "LOCO";
  61. // console.log("jdr CornerObj rend",this,this.corner_data,this.corner_data2)
  62. // Let's now stretch the audio level over the number of dots we have.
  63. // const stretchedAudioLevel = AUDIO_LEVEL_DOTS * audioLevel;
  64. // const audioLevelDots = [];
  65. clog("hook render CornerObj",this,arguments)
  66. clog("hook render CornerObj props",this.props)
  67. // { this.corner_data }
  68. // {window.abc}
  69. if (this._props.type == "div"){
  70. return (
  71. <div className={this._props.className}>
  72. {this.props.children}
  73. </div>
  74. );
  75. // } else if (this._props.type == "span"){
  76. } else {
  77. return (
  78. <span className={this._props.className}>
  79. {this.props.children}
  80. </span>
  81. );
  82. }
  83. /*
  84. return (
  85. <{this._props.type} className={this._props.className}>
  86. </{this._props.type}>
  87. );
  88. */
  89. // <span className={this._props.className}>
  90. // </span>
  91. }
  92. // <span {this.props.children}>
  93. // </span>
  94. // {this.props.children}
  95. // {this.props.children}
  96. }
  97. class DevHook extends Component<Props> {
  98. constructor(){
  99. super(...arguments)
  100. this._props = $.extend(true,{},this.props)
  101. this._props.className = Object.assign(this._props.className || "" )
  102. this._props.className ? 0 : this._props.className=""
  103. this._props.className = "dev_hook " + this._props.className
  104. // this._props.type ? : = "span"
  105. // clog("hook CornerObj",this,arguments)
  106. }
  107. render() {
  108. // clog("hook render CornerObj",this,arguments)
  109. // clog("hook render CornerObj props",this.props)
  110. if (this._props.type == "div"){
  111. return (
  112. <div className={this._props.className}>
  113. {this.props.children}
  114. </div>
  115. );
  116. // } else if (this._props.type == "span"){
  117. } else {
  118. return (
  119. <span className={this._props.className}>
  120. {this.props.children}
  121. </span>
  122. );
  123. }
  124. }
  125. }
  126. export {CornerObj,DevHook,CornerUI,CornerUI2};