From 44a568431beeb39013b110024b7af568f95f9cb3 Mon Sep 17 00:00:00 2001 From: netroby Date: Thu, 13 Jul 2017 18:02:10 +0800 Subject: [PATCH] time import , but not usage. CROS must set --- examples/http_flv_and_rtmp_server/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/http_flv_and_rtmp_server/main.go b/examples/http_flv_and_rtmp_server/main.go index eda03a3..2891697 100644 --- a/examples/http_flv_and_rtmp_server/main.go +++ b/examples/http_flv_and_rtmp_server/main.go @@ -3,7 +3,6 @@ package main import ( "sync" "io" - "time" "net/http" "github.com/nareix/joy4/format" "github.com/nareix/joy4/av/avutil" @@ -79,7 +78,8 @@ func main() { if ch != nil { w.Header().Set("Content-Type", "video/x-flv") - w.Header().Set("Transfer-Encoding", "chunked") + w.Header().Set("Transfer-Encoding", "chunked") + w.Header().Set("Access-Control-Allow-Origin", "*") w.WriteHeader(200) flusher := w.(http.Flusher) flusher.Flush()