stream_ios_log.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?php
  2. $live = function()
  3. {
  4. $array = array();
  5. $info = Dever::db('live/info')->state();
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. $active = function()
  13. {
  14. $array = array();
  15. $info = Dever::db('live/active')->state();
  16. if($info)
  17. {
  18. $array += $info;
  19. }
  20. return $array;
  21. };
  22. $stream = function()
  23. {
  24. $array = array();
  25. $info = Dever::db('live/stream')->state();
  26. if($info)
  27. {
  28. $array += $info;
  29. }
  30. return $array;
  31. };
  32. return array
  33. (
  34. # 表名
  35. 'name' => 'stream_ios_log',
  36. # 显示给用户看的名称
  37. 'lang' => 'IOS推流日志',
  38. 'order' => 2,
  39. 'menu' => false,
  40. 'desc' => 'IOS推流日志是根据接口实时获取IOS端的直播推流日志,不能接收到obs端的推流日志。',
  41. # 数据结构
  42. 'struct' => array
  43. (
  44. 'id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => 'ID',
  48. 'default' => '',
  49. 'desc' => '',
  50. 'match' => 'is_numeric',
  51. 'search' => 'order',
  52. 'list' => true,
  53. ),
  54. 'live_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '所属直播云',
  58. 'default' => '1',
  59. 'desc' => '所属直播云',
  60. 'match' => 'is_numeric',
  61. 'update' => 'select',
  62. //'option' => $live,
  63. 'search' => 'select',
  64. //'list' => true,
  65. ),
  66. 'active_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '所属活动',
  70. 'default' => '1',
  71. 'desc' => '所属活动',
  72. 'match' => 'is_numeric',
  73. 'update' => 'select',
  74. //'option' => $active,
  75. 'search' => 'select',
  76. //'list' => true,
  77. ),
  78. 'stream_id' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '所属直播流',
  82. 'default' => '1',
  83. 'desc' => '所属直播流',
  84. 'match' => 'is_numeric',
  85. //'update' => 'select',
  86. 'option' => $stream,
  87. //'search' => 'select',
  88. 'list' => true,
  89. ),
  90. 'sdate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '开始时间',
  94. 'match' => 'is_numeric',
  95. 'default' => '',
  96. 'desc' => '',
  97. 'update' => 'date',
  98. 'callback' => 'maketime',
  99. 'list' => '{sdate} > 0 ? date("Y-m-d H:i:s", {sdate}) : "未开始"',
  100. ),
  101. 'edate' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '结束时间',
  105. 'match' => 'is_numeric',
  106. 'default' => '',
  107. 'desc' => '',
  108. //'update' => 'date',
  109. 'callback' => 'maketime',
  110. 'list' => '{edate} > 0 ? date("Y-m-d H:i:s", {edate}) : "未结束"',
  111. ),
  112. 'url_m3u8' => array
  113. (
  114. 'type' => 'varchar-800',
  115. 'name' => '直播回放地址',
  116. 'default' => '',
  117. 'desc' => '直播回放地址',
  118. 'match' => 'option',
  119. //'update' => 'text',
  120. 'list' => true,
  121. ),
  122. 'url_mp4' => array
  123. (
  124. 'type' => 'varchar-800',
  125. 'name' => '直播回放地址',
  126. 'default' => '',
  127. 'desc' => '直播回放地址',
  128. 'match' => 'option',
  129. //'update' => 'text',
  130. //'list' => true,
  131. ),
  132. 'state' => array
  133. (
  134. 'type' => 'tinyint-1',
  135. 'name' => '状态',
  136. 'default' => '1',
  137. 'desc' => '请选择状态',
  138. 'match' => 'is_numeric',
  139. ),
  140. 'cdate' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '创建时间',
  144. 'match' => array('is_numeric', time()),
  145. 'desc' => '',
  146. # 只有insert时才生效
  147. 'insert' => true,
  148. //'search' => 'date',
  149. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  150. ),
  151. ),
  152. 'manage' => array
  153. (
  154. //'excel' => true,
  155. 'delete' => false,
  156. 'edit' => false,
  157. //'insert' => false,
  158. ),
  159. );