diff --git a/live-streamming/nginx.conf b/live-streamming/nginx.conf index 98cb0f8..f735506 100644 --- a/live-streamming/nginx.conf +++ b/live-streamming/nginx.conf @@ -28,6 +28,7 @@ rtmp { hls_path /tmp/hls; hls_cleanup off; hls_fragment 3; + hls_sync 500ms hls_playlist_length 60; hls_base_url https://video-share.shop/api/v1/stream/ts/; diff --git a/src/main/kotlin/com/KY/KoreanYoutube/stream/StreamService.kt b/src/main/kotlin/com/KY/KoreanYoutube/stream/StreamService.kt index 0e20161..b732c6b 100644 --- a/src/main/kotlin/com/KY/KoreanYoutube/stream/StreamService.kt +++ b/src/main/kotlin/com/KY/KoreanYoutube/stream/StreamService.kt @@ -62,9 +62,7 @@ class StreamService( } fun startStream(key: String): Flux> { - val streamPath = Paths.get("stream") - - val filePath = "/tmp/hls/$key" + logger.info{"==========================startStream=========================="} val m3u8Path = Paths.get(File.separatorChar+"tmp",File.separatorChar + "hls", File.separatorChar + key,File.separatorChar + "index.m3u8" ) //Flux.merge(checkStreamStart(m3u8Path),startStreamListen(streamPath, key, m3u8Path, filePath)).subscribeOn(Schedulers.parallel()).subscribe() diff --git a/src/main/resources/templates/streamDetail.html b/src/main/resources/templates/streamDetail.html index aedff39..4b3d8ee 100644 --- a/src/main/resources/templates/streamDetail.html +++ b/src/main/resources/templates/streamDetail.html @@ -14,9 +14,9 @@