Browse Source

use http for snap.

zuoxue 5 năm trước cách đây
mục cha
commit
8b9b7c4537
1 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 10 1
      src/components/videoList.vue

+ 10 - 1
src/components/videoList.vue

@@ -236,8 +236,17 @@ export default {
 			});
 		},
 		getSnap: function(streamInfo) {
+			
 			let videoUrl = this.$global.baseMediaUrl + streamInfo.app + '/' + streamInfo.stream+".flv";
-			return this.$global.genApiUrl('/getSnap') + '&timeout_sec=10&expire_sec=30&url='+videoUrl+"&st="+new Date().getTime();
+			console.log("videoUrl:\t" + videoUrl);
+
+			let snapUrl = videoUrl.replace(/^ws/,"http");
+			console.log( 'snapUrl:\t' + snapUrl);
+
+			let fullSnapRequest = this.$global.genApiUrl('/getSnap') + '&timeout_sec=10&expire_sec=30&url='+snapUrl+"&st="+new Date().getTime();
+			console.log( 'fullSnapRequest:\t' + fullSnapRequest);
+
+			return fullSnapRequest;
 		},
 	}
 };