Эх сурвалжийг харах

sign_play_list
content_type=application/vnd.apple.mpegurl

chanjunkai 5 жил өмнө
parent
commit
5cd8447501

+ 5 - 1
Controller/CloudStorage.py

@@ -217,6 +217,9 @@ class CloudStorageView(View):
             aws_secret_access_key=aws_secret_access_key,
             region_name=bucket__region
         )
+        '''
+            http://test.dvema.com/cloudstorage/signplaym3u8?uid=VVDHCVBYDKFMJRWA111A&channel=1&time=1586940120&sign=tktktktk
+        '''
         conn = session.client('s3')
         playlist_entries = []
         for i in range(fg):
@@ -237,7 +240,8 @@ class CloudStorageView(View):
                 'duration': 10,
             })
         playlist = PlaylistGenerator(playlist_entries).generate()
-        response = HttpResponse(playlist, content_type="application/octet-stream")
+        response = HttpResponse(playlist, content_type="application/vnd.apple.mpegurl")
+        # response = HttpResponse(playlist, content_type="application/octet-stream")
         return response
         return HttpResponse(status=200, content=playlist)