Browse Source

Signed-off-by: caner <5658514@qq.com>

caner 3 years ago
parent
commit
e18aeea1fc
2 changed files with 4 additions and 3 deletions
  1. 2 2
      SRSWebRtcPlayer.ts
  2. 2 1
      package.json

+ 2 - 2
SRSWebRtcPlayer.ts

@@ -6,8 +6,8 @@ import MD5 from 'js-md5'
 class WebRtcPlayer {
     private Peer: any
     private TIMER: any
-    constructor(option: { HOST: string; TOKEN: string; UUID: string; PROFILE: number; PORT: number; DOM: HTMLVideoElement; starttime?: number; endtime?: number }) {
-        this.initWebRtc(option.HOST, option.PORT, option.TOKEN, option.UUID, option.PROFILE, option.DOM, option.starttime, option.endtime).then(res => {
+    constructor(option: { HOST: string; TOKEN: string; UUID: string; PROFILE: number; PORT: number; DOM: HTMLVideoElement; STIME?: number; ETIME?: number }) {
+        this.initWebRtc(option.HOST, option.PORT, option.TOKEN, option.UUID, option.PROFILE, option.DOM, option.STIME, option.ETIME).then(res => {
             this.Peer = res
         }).catch(() => {
             this.Peer = null

+ 2 - 1
package.json

@@ -9,7 +9,8 @@
     "preview": "vite preview"
   },
   "dependencies": {
-    "axios": "^1.1.3"
+    "axios": "^1.1.3",
+    "js-md5": "^0.7.3"
   },
   "devDependencies": {}
 }