Skip to content

Commit

Permalink
feature: update media endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
fahmi.irfan committed Dec 11, 2019
1 parent ec67318 commit e23c1ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions restapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ func (s *Server) initRouter() {
r.Get("/api/cover/{cover}", s.videoService.ServeCover)
r.Post("/api/cover", s.videoService.UploadCover)

r.Get("/media/{id:[0-9]+}/{ts:[0-9]+.ts}", s.videoService.ServeHLSTs)
r.Get("/media/{id:[0-9]+}/stream", s.videoService.ServeHLSM3U8)
r.Get("/api/media/{id:[0-9]+}/{ts:[0-9]+.ts}", s.videoService.ServeHLSTs)
r.Get("/api/media/{id:[0-9]+}/stream", s.videoService.ServeHLSM3U8)

FileServer(r, "/videos")
serveWWW(r, "/")
}

Expand Down

0 comments on commit e23c1ee

Please sign in to comment.