Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

2 years ago
/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
2 years ago
import {MyDocument} from '../../lib/appManagers/appDocsManager';
import {AppManagers} from '../../lib/appManagers/managers';
import rootScope from '../../lib/rootScope';
import wrapSticker from './sticker';
2 years ago
export default async function wrapLocalSticker({emoji, width, height, managers = rootScope.managers}: {
2 years ago
doc?: MyDocument,
url?: string,
emoji?: string,
width: number,
height: number,
managers?: AppManagers
}) {
const container = document.createElement('div');
const doc = await managers.appStickersManager.getAnimatedEmojiSticker(emoji);
2 years ago
if(doc) {
wrapSticker({
doc,
div: container,
loop: false,
play: true,
width,
height,
emoji,
managers
}).then(() => {
// this.animation = player;
});
} else {
container.classList.add('media-sticker-wrapper');
}
return {container};
}