@genexus/web-standard-functions
Version:
GeneXus JavaScript standard functions library for web generators
48 lines • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GxVideo = void 0;
class GxVideo {
constructor(url) {
this.uri = url !== null && url !== void 0 ? url : "";
}
serialize() {
return this.VideoURI;
}
deserialize(x) {
return GxVideo.createVideo(x);
}
isEmpty() {
return this.uri === "" || this.uri === null;
}
setEmpty() {
this.uri = "";
}
get VideoName() {
return new URL(this.uri).pathname
.split("/")
.pop()
.split(".")[0];
}
get VideoType() {
return new URL(this.uri).pathname
.split("/")
.pop()
.split(".")[1];
}
get VideoURI() {
return this.uri;
}
set VideoURI(uri) {
this.uri = uri;
}
FromURL(uri) {
this.uri = uri;
}
static createVideo(url) {
const b = new GxVideo();
b.uri = url;
return b;
}
}
exports.GxVideo = GxVideo;
//# sourceMappingURL=gxvideo.js.map