').css({
fontSize: '85px'
}).html(this.getSettings('empty_content_headline')));
document.body.prepend(this.elements.$elementor);
}
/**
* CSS from another server cannot be loaded with the current dom to image library.
* this method take all the links from another domain and proxy them.
*/
loadExternalCss() {
const excludedUrls = [this.getSettings('home_url'), ...this.getSettings('excluded_external_css_urls')];
const notSelector = excludedUrls.map(url => `[href^="${url}"]`).join(', ');
jQuery('link').not(notSelector).each((index, el) => {
const $link = jQuery(el),
$newLink = $link.clone();
$newLink.attr('href', this.getScreenshotProxyUrl($link.attr('href')));
this.elements.$head.append($newLink);
$link.remove();
});
}
/**
* Make a proxy to images urls that has some problems with cross origin (like youtube).
*/
loadExternalImages() {
const selector = this.getSettings('external_images_urls').map(url => `img[src^="${url}"]`).join(', ');
jQuery(selector).each((index, el) => {
const $img = jQuery(el);
$img.attr('src', this.getScreenshotProxyUrl($img.attr('src')));
});
}
/**
* Html to images libraries can not snapshot IFrames
* this method convert all the IFrames to some other elements.
*/
handleIFrames() {
this.elements.$elementor.find('iframe').each((index, el) => {
const $iframe = jQuery(el),
$iframeMask = jQuery('', {
css: {
background: 'gray',
width: $iframe.width(),
height: $iframe.height()
}
});
$iframe.before($iframeMask);
$iframe.remove();
});
}
/**
* Remove all the sections that should not be in the screenshot.
*/
removeUnnecessaryElements() {
let currentHeight = 0;
this.elements.$sections.filter((index, el) => {
let shouldBeRemoved = false;
if (currentHeight >= this.getSettings('crop.height')) {
shouldBeRemoved = true;
}
currentHeight += jQuery(el).outerHeight();
return shouldBeRemoved;
}).each((index, el) => {
el.remove();
});
// Some 3rd party plugins inject elements into the dom, so this method removes all
// the elements that was injected, to make sure that it capture a screenshot only of the post itself.
this.elements.$notElementorElements.remove();
}
/**
* Some urls make some problems to the svg parser.
* this method convert all the urls to just '/'.
*/
handleLinks() {
elementorCommon.elements.$body.find('a').attr('href', '/');
}
/**
* Remove unnecessary margin from the first element of the post (singles and footers).
*/
removeFirstSectionMargin() {
this.elements.$firstSection.css({
marginTop: 0
});
}
/**
* Creates a png image.
*
* @return {Promise} URI containing image data
*/
createImage() {
const pageLoadedPromise = new Promise(resolve => {
window.addEventListener('load', () => {
resolve();
});
});
const timeOutPromise = new Promise(resolve => {
setTimeout(() => {
resolve();
}, this.getSettings('render_timeout'));
});
return Promise.race([pageLoadedPromise, timeOutPromise]).then(() => {
this.log('Start creating screenshot.');
if (this.getSettings('isDebugSvg')) {
domtoimage.toSvg(document.body, {
imagePlaceholder: this.getSettings('image_placeholder')
}).then(svg => this.download(svg));
return Promise.reject('Debug SVG.');
}
// TODO: Extract to util function.
const isSafari = /^((?!chrome|android).)*safari/i.test(window.userAgent);
// Safari browser has some problems with the images that dom-to-images
// library creates, so in this specific case the screenshot uses html2canvas.
// Note that dom-to-image creates more accurate screenshot in "not safari" browsers.
if (isSafari) {
this.log('Creating screenshot with "html2canvas"');
return html2canvas(document.body).then(canvas => {
return canvas.toDataURL('image/png');
});
}
this.log('Creating screenshot with "dom-to-image"');
return domtoimage.toPng(document.body, {
imagePlaceholder: this.getSettings('image_placeholder')
});
});
}
/**
* Download a uri, use for debugging the svg that created from dom to image libraries.
*
* @param {string} uri
*/
download(uri) {
const $link = jQuery('', {
href: uri,
download: 'debugSvg.svg',
html: 'Download SVG'
});
elementorCommon.elements.$body.append($link);
$link.trigger('click');
}
/**
* Creates fake image element to get the size of the image later on.
*
* @param {string} dataUrl
* @return {Promise} Image Element
*/
createImageElement(dataUrl) {
const image = new Image();
image.src = dataUrl;
return new Promise(resolve => {
image.onload = () => resolve(image);
});
}
/**
* Crop the image to requested sizes.
*
* @param {HTMLImageElement} image
* @return {Promise} Canvas
*/
cropCanvas(image) {
const width = this.getSettings('crop.width');
const height = this.getSettings('crop.height');
const cropCanvas = document.createElement('canvas'),
cropContext = cropCanvas.getContext('2d'),
ratio = width / image.width;
cropCanvas.width = width;
cropCanvas.height = height > image.height ? image.height : height;
cropContext.drawImage(image, 0, 0, image.width, image.height, 0, 0, image.width * ratio, image.height * ratio);
return Promise.resolve(cropCanvas);
}
/**
* Send the image to the server.
*
* @param {HTMLCanvasElement} canvas
* @return {Promise} Screenshot URL
*/
save(canvas) {
return new Promise((resolve, reject) => {
elementorCommon.ajax.addRequest('screenshot_save', {
data: {
post_id: this.getSettings('post_id'),
screenshot: canvas.toDataURL('image/png')
},
success: url => {
this.log(`Screenshot created: ${encodeURI(url)}`);
resolve(url);
},
error: () => {
this.log('Failed to create screenshot.');
reject();
}
});
});
}
/**
* Mark this post screenshot as failed.
*/
markAsFailed() {
return new Promise((resolve, reject) => {
elementorCommon.ajax.addRequest('screenshot_failed', {
data: {
post_id: this.getSettings('post_id')
},
success: () => {
this.log(`Marked as failed.`);
resolve();
},
error: () => {
this.log('Failed to mark this screenshot as failed.');
reject();
}
});
});
}
/**
* @param {string} url
* @return {string} Screenshot Proxy URL
*/
getScreenshotProxyUrl(url) {
return `${this.getSettings('home_url')}?screenshot_proxy&nonce=${this.getSettings('nonce')}&href=${url}`;
}
/**
* Notify that the screenshot has been succeed.
*
* @param {string} imageUrl
*/
screenshotSucceed(imageUrl) {
this.screenshotDone(true, imageUrl);
}
/**
* Notify that the screenshot has been failed.
*
* @param {Error} e
*/
screenshotFailed(e) {
this.log(e, null);
this.markAsFailed().then(() => this.screenshotDone(false));
}
/**
* Final method of the screenshot.
*
* @param {boolean} success
* @param {string} imageUrl
*/
screenshotDone(success) {
let imageUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
clearTimeout(this.timeoutTimer);
this.timeoutTimer = null;
// Send the message to the parent window and not to the top.
// e.g: The `Theme builder` is loaded into an iFrame so the message of the screenshot
// should be sent to the `Theme builder` window and not to the top window.
window.parent.postMessage({
name: 'capture-screenshot-done',
success,
id: this.getSettings('post_id'),
imageUrl
}, '*');
this.log(`Screenshot ${success ? 'Succeed' : 'Failed'}.`, 'timeEnd');
}
/**
* Log messages for debugging.
*
* @param {any} message
* @param {string?} timerMethod
*/
log(message) {
let timerMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'timeLog';
if (!this.getSettings('isDebug')) {
return;
}
// eslint-disable-next-line no-console
console.log('string' === typeof message ? `${this.getSettings('post_id')} - ${message}` : message);
if (timerMethod) {
// eslint-disable-next-line no-console
console[timerMethod](this.getSettings('timer_label'));
}
}
}
jQuery(() => {
new Screenshot();
});
/******/ })()
;
//# sourceMappingURL=screenshot.js.map/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2013 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
(function(){"use strict";function e(b){b.fn._fadeIn=b.fn.fadeIn;var p=b.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),y=(document.documentMode,b.isFunction(document.createElement("div").style.setExpression)),m=(b.blockUI=function(e){t(window,e)},b.unblockUI=function(e){v(window,e)},b.growlUI=function(e,o,t,n){function i(e){b.blockUI({message:s,fadeIn:void 0!==(e=e||{}).fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:t,centerY:!1,showOverlay:!1,onUnblock:n,css:b.blockUI.defaults.growlCSS})}var s=b('');e&&s.append("
Ve Kamleya is a song from a Bollywood movie Rocky Aur Rani Kii Prem Kahaani released in 2023 featuring Alia Bhatt and Ranveer Sing. A lot of short-form content creators started creating reels around this song and soon it was trending Instagram reels and TikTok. We have compiled Ve Kamleya capcut templates that went viral recently. So if you are looking for Ve Kamleya templates with unique transitions and effects, then preview all the templates added below and click on the Use in Capcut button.
Apa Fer Milaange CapCut Template Link 2024
Kawara Sajna CapCut Template
Apa Fer Milaange Trending CapCut Template
Apa Fer Milaange Blur CapCut Template
Apa Fer Milaange Transitions CapCut Template
Hye Ni Apa CapCut Template
Apa Fer Milaange Song Template
Apa Fer Milaange Sad CapCut Template
Apa Fer Milaange Viral CapCut Template
Apa Fer Milaange Template Link
Apa Fer Milaange Cartoons CapCut Template
Apa Fer Milaange CapCut Template Trend
How To Use [post_name]?
To create an amazing video using the [post_name] follow these five simple steps:
Download the latest version of the CapCut App on your mobile phone.
Search for [post_name], and if you are unable to find it then navigate to the trending CapCut templatespage.
Click the “Use in CapCut” button under the template. This will redirect you to the CapCut App. If you’re in India, make sure to turn on your VPN before clicking the button.
Import your photos and videos according to the template requirements, then click “Export.” You can also upload your video directly on TikTok without any watermark by selecting “Save and Share on TikTok”
Disclaimer: We are not the owner of the demo videos attached below. These videos belong to the template creator. We added these templates just for ease so that the users can select the one that fits their needs. If you are the original creator of this template and want us to remove it from our website, then don’t hesitate to inform us here.