mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
allow to use image spec like "api/mime128_video" for poster like for regular images
This commit is contained in:
parent
c299c82e09
commit
1d6033fb4e
@ -124,10 +124,13 @@ var et2_video = /** @class */ (function (_super) {
|
|||||||
* Set poster attribute in order to specify
|
* Set poster attribute in order to specify
|
||||||
* an image to be shown while video is loading or before user play it
|
* an image to be shown while video is loading or before user play it
|
||||||
*
|
*
|
||||||
* @param {string} _url
|
* @param {string} _url url or image spec like "api/mime128_video"
|
||||||
*/
|
*/
|
||||||
et2_video.prototype.set_poster = function (_url) {
|
et2_video.prototype.set_poster = function (_url) {
|
||||||
if (_url) {
|
if (_url) {
|
||||||
|
if (_url[0] !== '/' && !_url.match(/^https?:\/\//)) {
|
||||||
|
_url = this.egw().image(_url);
|
||||||
|
}
|
||||||
this.video.attr("poster", _url);
|
this.video.attr("poster", _url);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -176,12 +176,16 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode
|
|||||||
* Set poster attribute in order to specify
|
* Set poster attribute in order to specify
|
||||||
* an image to be shown while video is loading or before user play it
|
* an image to be shown while video is loading or before user play it
|
||||||
*
|
*
|
||||||
* @param {string} _url
|
* @param {string} _url url or image spec like "api/mime128_video"
|
||||||
*/
|
*/
|
||||||
set_poster(_url: string)
|
set_poster(_url: string)
|
||||||
{
|
{
|
||||||
if (_url)
|
if (_url)
|
||||||
{
|
{
|
||||||
|
if (_url[0] !== '/' && !_url.match(/^https?:\/\//))
|
||||||
|
{
|
||||||
|
_url = this.egw().image(_url);
|
||||||
|
}
|
||||||
this.video.attr("poster", _url);
|
this.video.attr("poster", _url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user