constant.ts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. import { MediaTypeEnum } from '@/interface';
  2. export const QQ_CLIENT_ID = '101958191';
  3. export const QQ_OAUTH_URL = 'https://graph.qq.com/oauth2.0';
  4. export const QQ_REDIRECT_URI = 'https://live.hsslive.cn/oauth/qq_login';
  5. export const AUTHOR_GITHUB = 'https://github.com/galaxy-s10';
  6. // wss://srs-pull.hsslive.cn
  7. // ws://www.hfgmupw.cn
  8. export const WEBSOCKET_URL =
  9. process.env.NODE_ENV === 'development'
  10. ? 'ws://localhost:4300'
  11. : 'wss://srs-pull.hsslive.cn';
  12. // https://live-api.hsslive.cn
  13. // http://www.hfgmupw.cn/api/
  14. export const AXIOS_BASEURL =
  15. process.env.NODE_ENV === 'development'
  16. ? '/api'
  17. : 'https://live-api.hsslive.cn';
  18. // .hsslive.cn
  19. // .hfgmupw.cn
  20. export const COOKIE_DOMAIN =
  21. process.env.NODE_ENV === 'development' ? undefined : '.hsslive.cn';
  22. export const COMMON_URL = {
  23. apifox:
  24. 'https://apifox.com/apidoc/shared-c7556b54-17b2-494e-a039-572d83f103ed/',
  25. admin: 'https://live-admin.hsslive.cn',
  26. mobileApk:
  27. 'https://resource.hsslive.cn/billd-live/image/e859ec0e1fac824ce92b6522104f53ed.apk',
  28. bilibiliCollectiondetail:
  29. 'https://space.bilibili.com/381307133/channel/collectiondetail?sid=1458070&ctype=0',
  30. payCoursesArticle: 'https://www.hsslive.cn/article/151',
  31. };
  32. export const SRS_CB_URL_PARAMS = {
  33. publishKey: 'pushkey',
  34. publishType: 'pushtype',
  35. userToken: 'usertoken',
  36. userId: 'userid',
  37. randomId: 'randomid',
  38. };
  39. export const QINIU_BLOG = {
  40. domain: 'resource.hsslive.cn',
  41. url: 'https://resource.hsslive.cn/',
  42. bucket: 'hssblog',
  43. prefix: {
  44. 'image/': 'image/',
  45. 'backupsDatabase/': 'backupsDatabase/',
  46. 'media/': 'media/',
  47. 'nuxt-blog-client/': 'nuxt-blog-client/',
  48. 'billd-live/image/': 'billd-live/image/',
  49. },
  50. };
  51. // 全局的cookie的key
  52. export const COOKIE_KEY = {
  53. loginInfo: 'loginInfo',
  54. };
  55. export const lsKeyPrefix = 'billd_live___';
  56. // 全局的localStorage的key
  57. export const lsKey = {
  58. lastBuildDate: 'lastBuildDate',
  59. token: 'token',
  60. };
  61. export const mediaTypeEnumMap = {
  62. [MediaTypeEnum.camera]: '摄像头',
  63. [MediaTypeEnum.microphone]: '麦克风',
  64. [MediaTypeEnum.screen]: '窗口',
  65. [MediaTypeEnum.img]: '图片',
  66. [MediaTypeEnum.txt]: '文字',
  67. [MediaTypeEnum.media]: '视频',
  68. [MediaTypeEnum.time]: '时间',
  69. [MediaTypeEnum.stopwatch]: '秒表',
  70. };
  71. export const sliderList = [
  72. {
  73. img: 'https://resource.hsslive.cn/billd-live/image/a4039f86e5352bcfccaddecc4b72a1df.webp',
  74. txt: 'SRS',
  75. link: 'https://ossrs.net',
  76. },
  77. {
  78. img: 'https://resource.hsslive.cn/image/c3c342f6852706e0b70d011e8753d2d6.webp',
  79. txt: 'FFmpeg',
  80. link: 'https://ffmpeg.org',
  81. },
  82. {
  83. img: 'https://resource.hsslive.cn/image/0214acde5f5f5e3caf278ce446cc4414.webp',
  84. txt: 'WebRTC',
  85. link: 'https://github.com/webrtc',
  86. },
  87. {
  88. img: 'https://resource.hsslive.cn/billd-live/image/1277df4371045310acbc4bf2fc0811b8.webp',
  89. txt: 'Vue3',
  90. link: 'https://vuejs.org',
  91. },
  92. {
  93. img: 'https://resource.hsslive.cn/image/dd907463af7fdec395e5f6d088b0308b.webp',
  94. txt: 'Pinia',
  95. link: 'https://pinia.vuejs.org',
  96. },
  97. {
  98. img: 'https://resource.hsslive.cn/image/9d54ed9673f2ca4ffc78fc6348f2b736.png',
  99. txt: 'TypeScript',
  100. link: 'https://www.typescriptlang.org',
  101. },
  102. {
  103. img: 'https://resource.hsslive.cn/image/a6473eed036e5d35ca2c9f7118c974cd.webp',
  104. txt: 'Vite4',
  105. link: 'https://vitejs.dev',
  106. },
  107. {
  108. img: 'https://resource.hsslive.cn/image/627105f0e5674018cb03c8da036ae5d5.webp',
  109. txt: 'Webpack5',
  110. link: 'https://webpack.js.org',
  111. },
  112. {
  113. img: 'https://resource.hsslive.cn/billd-live/image/5304af2ea6864369df3ba895d20e3d14.png',
  114. txt: 'swc',
  115. link: 'https://swc.rs',
  116. },
  117. {
  118. img: 'https://resource.hsslive.cn/image/dd8ffe33c22723381a3664684eaca237.png',
  119. txt: 'esbuild',
  120. link: 'https://esbuild.github.io',
  121. },
  122. {
  123. img: 'https://resource.hsslive.cn/image/f6b9f5cfade1d96634dddb0b89b056be.png',
  124. txt: 'Pnpm',
  125. link: 'https://pnpm.io',
  126. },
  127. {
  128. img: 'https://resource.hsslive.cn/image/89fadfed21f1dd6389dfeb227b3d1ca6.webp',
  129. txt: 'naive-ui',
  130. link: 'https://www.naiveui.com',
  131. },
  132. {
  133. img: 'https://resource.hsslive.cn/image/5ce36cab3d6b23974625900dc4cf39a3.webp',
  134. txt: 'Node',
  135. link: 'https://nodejs.org',
  136. },
  137. {
  138. img: 'https://resource.hsslive.cn/image/0dcabc80c616240edc3111450fbf79aa.webp',
  139. txt: 'socket.io',
  140. link: 'https://socket.io',
  141. },
  142. {
  143. img: 'https://resource.hsslive.cn/image/2009474c455813d487803e2acfcbb4af.webp',
  144. txt: 'mysql',
  145. link: 'https://www.mysql.com/',
  146. },
  147. {
  148. img: 'https://resource.hsslive.cn/image/e66deaf779edb2a94e91f9b0f2995f6d.webp',
  149. txt: 'redis',
  150. link: 'https://redis.io',
  151. },
  152. {
  153. img: 'https://resource.hsslive.cn/image/fd783552a400643c611c62e9200bb429.webp',
  154. txt: 'Sequelize',
  155. link: 'https://sequelize.org',
  156. },
  157. {
  158. img: 'https://resource.hsslive.cn/image/dce3470845321ce654d09ce811837749.webp',
  159. txt: '腾讯云云直播 CSS',
  160. link: 'https://cloud.tencent.com/product/css',
  161. },
  162. {
  163. img: 'https://resource.hsslive.cn/image/074835fbbaf976992e78bc6a585530e6.webp',
  164. txt: '阿里云轻量服务器',
  165. link: 'https://www.aliyun.com',
  166. },
  167. {
  168. img: 'https://resource.hsslive.cn/image/9a934ebf993f5d3b4146f050f7071518.webp',
  169. txt: '七牛云对象存储',
  170. link: 'https://www.qiniu.com',
  171. },
  172. {
  173. img: 'https://resource.hsslive.cn/image/e247f6fd39320051d236f3f844b9056f.webp',
  174. txt: '支付宝当面付',
  175. link: 'https://opendocs.alipay.com/open/194',
  176. },
  177. {
  178. img: 'https://resource.hsslive.cn/image/d5eb237bd54bc4e729186115e89e5935.webp',
  179. txt: 'Docker',
  180. link: 'https://www.docker.com',
  181. },
  182. {
  183. img: 'https://resource.hsslive.cn/image/92a6f3e295634ddd21b6b8034fa3b25f.webp',
  184. txt: 'Jenkins',
  185. link: 'https://www.jenkins.io',
  186. },
  187. {
  188. img: 'https://resource.hsslive.cn/image/354823b72eb805264c940f5232d824fe.webp',
  189. txt: 'PM2',
  190. link: 'https://github.com/Unitech/pm2',
  191. },
  192. {
  193. img: 'https://resource.hsslive.cn/image/d4417f70fa36edbc62b5aa3840cbf25f.webp',
  194. txt: 'bilibili',
  195. link: 'https://www.bilibili.com',
  196. },
  197. ];