]> git.feebdaed.xyz Git - gomehub.git/commitdiff
Add sorrylinus streaming
authorseantywork <seantywork@gmail.com>
Wed, 17 Jul 2024 09:22:25 +0000 (18:22 +0900)
committerseantywork <seantywork@gmail.com>
Wed, 17 Jul 2024 09:22:25 +0000 (18:22 +0900)
pkg/stream/stream_cctv.go
public/js/mypage/index.js

index 0ce25cfb27fc85d9ce5e113ea0dc3e2d790cd84c..818888554723fe5cd5795bb9c4f9b50edfb7e037 100644 (file)
@@ -165,6 +165,15 @@ func PostCCTVOpen(c *gin.Context) {
 
        var cs CCTVStruct
 
+       if DEBUG {
+
+               cs.StreamingKey = "rtmp://" + INTERNAL_URL + ":" + string(RTP_RECEIVE_PORT) + "/publish/" + streamingKey
+       } else {
+
+               cs.StreamingKey = "rtmps://" + EXTERNAL_URL + ":" + string(RTP_RECEIVE_PORT_EXTERNAL) + "/publish/" + streamingKey
+
+       }
+
        cs.StreamingKey = streamingKey
        cs.Description = string(desc_b)
 
index 13b9770e3f6248d23e5befdebf54794253a99e4d..f07b3a2e5507296cc8f82cdefca757ea4154b326 100644 (file)
@@ -273,6 +273,8 @@ async function initCCTV(){
                 pc.setRemoteDescription(new RTCSessionDescription(remoteDesc))
             
                 STREAMING_KEY = cs.streaming_key
+
+                console.log("streaming address: " + STREAMING_KEY)
             
             } catch (e){