代码调整

This commit is contained in:
joylink_cuiweidong 2022-09-27 16:57:42 +08:00
parent 6068021153
commit 9ebf00d08a
2 changed files with 17 additions and 7 deletions

View File

@ -127,13 +127,14 @@ export default {
// // // //
// console.log('loadstart'); // console.log('loadstart');
// }); // });
// this.on('loadeddata', function() { this.on('loadeddata', function() {
// console.log('loadeddata'); console.log('loadeddata');
// }); });
// this.on('seeked', function() { this.on('seeked', function() {
// // , // ,
// console.log('seeked'); console.log('seeked');
// }); video.play();
});
this.on('loadedmetadata', function() { this.on('loadedmetadata', function() {
console.log('loadedmetadata'); console.log('loadedmetadata');
// //
@ -150,6 +151,7 @@ export default {
if (currentTime == lastTime) { if (currentTime == lastTime) {
video.currentTime(currentTime + 10000); video.currentTime(currentTime + 10000);
video.play(); video.play();
// video.autoplay(true);
// // 5 // // 5
// if (++tryTimes > 5) { // if (++tryTimes > 5) {
// alert(''); // alert('');

View File

@ -52,6 +52,14 @@ export default {
}, function () { }, function () {
console.log('videojs播放器初始化成功'); console.log('videojs播放器初始化成功');
const video = this; const video = this;
this.on('loadeddata', function() {
console.log('loadeddata');
});
this.on('seeked', function() {
// ,
console.log('seeked');
video.play();
});
this.on('loadedmetadata', function() { this.on('loadedmetadata', function() {
console.log('loadedmetadata'); console.log('loadedmetadata');
// //