allow to set starttime of video

This commit is contained in:
Ralf Becker 2021-02-02 12:02:26 +02:00
parent a412aa18a4
commit bbd9a5a765
2 changed files with 23 additions and 2 deletions

View File

@ -24,6 +24,7 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.et2_video = void 0;
/*egw:uses
/vendor/bower-asset/jquery/dist/jquery.js;
et2_core_interfaces;
@ -97,6 +98,9 @@ var et2_video = /** @class */ (function (_super) {
if (this.options.src_type) {
source.attr('type', this.options.src_type);
}
if (this.options.starttime) {
this.seek_video(this.options.starttime);
}
}
};
/**
@ -178,11 +182,17 @@ var et2_video = /** @class */ (function (_super) {
"description": "Defines that the audio output of the video should be muted"
},
"autoplay": {
"name": "Autoply",
"name": "Autoplay",
"type": "boolean",
"default": false,
"description": "Defines if Video will start playing as soon as it is ready"
},
starttime: {
"name": "Inital position of video",
"type": "float",
"default": 0,
"description": "Set initial position of video"
},
"controls": {
"name": "Control buttons",
"type": "boolean",

View File

@ -69,11 +69,17 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode
"description": "Defines that the audio output of the video should be muted"
},
"autoplay": {
"name": "Autoply",
"name": "Autoplay",
"type": "boolean",
"default": false,
"description": "Defines if Video will start playing as soon as it is ready"
},
starttime: {
"name": "Inital position of video",
"type": "float",
"default": 0,
"description": "Set initial position of video"
},
"controls": {
"name": "Control buttons",
"type": "boolean",
@ -142,6 +148,11 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode
{
source.attr('type', this.options.src_type);
}
if (this.options.starttime)
{
this.seek_video(this.options.starttime);
}
}
}