dever %!s(int64=5) %!d(string=hai) anos
pai
achega
87dffdd2d9
Modificáronse 1 ficheiros con 11 adicións e 6 borrados
  1. 11 6
      lib/dever/components/video.nvue

+ 11 - 6
lib/dever/components/video.nvue

@@ -11,7 +11,7 @@
 				:controls="false"
 				:loop="true"
 				:id="id()"
-				objectFit="fill"
+				:objectFit="objectFit"
 				:enable-progress-gesture="false"
 				play-btn-position="center"
 				class="video"
@@ -20,6 +20,7 @@
 				x-webkit-airplay="allow"
 				x5-video-player-type="h5-page"
 				:initial-time="startTime"
+				:page-gesture="false"
 				>
 			</video>
 		</view>
@@ -88,6 +89,7 @@ export default {
 	},
 	data() {
 		return {
+			objectFit : 'fill',
 			startTime : 0,
 			play : false,
 			poster : true,
@@ -108,21 +110,24 @@ export default {
 			this.video.play();
 			this.play = true;
 		},
-		stop : function() {
+		stop : function(state) {
 			var self = this;
 			//this.poster = true;
 			this.startTime = 0;
-			setTimeout(function() {
+			if (state) {
 				self.video.pause();
-			}, 500);
-			
+			} else {
+				setTimeout(function() {
+					self.video.pause();
+				}, 1000);
+			}
 			this.play = false;
 		},
 		open : function()  {
 			if (!this.play) {
 				this.start();
 			} else {
-				this.stop();
+				this.stop(true);
 			}
 		},
 	},