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