dever 5 years ago
parent
commit
02cdf16107
2 changed files with 12 additions and 5 deletions
  1. 9 2
      lib/dever/components/video.nvue
  2. 3 3
      pages/dream/view/vodShort.vue

+ 9 - 2
lib/dever/components/video.nvue

@@ -19,7 +19,7 @@
 				:webkit-playsinline="true"
 				:webkit-playsinline="true"
 				x-webkit-airplay="allow"
 				x-webkit-airplay="allow"
 				x5-video-player-type="h5-page"
 				x5-video-player-type="h5-page"
-				width="100%" height="100%"
+				:initial-time="startTime"
 				>
 				>
 			</video>
 			</video>
 		</view>
 		</view>
@@ -88,6 +88,7 @@ export default {
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
+			startTime : 0,
 			play : false,
 			play : false,
 			poster : true,
 			poster : true,
 			video : false,
 			video : false,
@@ -108,7 +109,13 @@ export default {
 			this.play = true;
 			this.play = true;
 		},
 		},
 		stop : function() {
 		stop : function() {
-			this.video.pause();
+			var self = this;
+			//this.poster = true;
+			this.startTime = 0;
+			setTimeout(function() {
+				self.video.pause();
+			}, 500);
+			
 			this.play = false;
 			this.play = false;
 		},
 		},
 		open : function()  {
 		open : function()  {

+ 3 - 3
pages/dream/view/vodShort.vue

@@ -54,9 +54,9 @@ export default {
 		changeVod : function(e)  {
 		changeVod : function(e)  {
 			var self = this;
 			var self = this;
 			self.$nextTick(()=>{
 			self.$nextTick(()=>{
-				//self.stop();
-				//self.current_index = e.detail.current;
-				//self.start();
+				self.stop();
+				self.current_index = e.detail.current;
+				self.start();
 			});
 			});
 					
 					
 		},
 		},