Explorar o código

use http for snap.

zuoxue %!s(int64=5) %!d(string=hai) anos
pai
achega
8b9b7c4537
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  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;
 		},
 	}
 };