()
| 5 | export default class TikTok extends Media { |
| 6 | |
| 7 | _loadMedia() { |
| 8 | var self = this; |
| 9 | |
| 10 | try { |
| 11 | // Extract video ID and username from URL |
| 12 | // URL format: https://www.tiktok.com/@username/video/7611014647642098958 |
| 13 | var url_parts = this.data.url.match(/tiktok\.com\/@([^\/]+)\/video\/(\d+)/); |
| 14 | |
| 15 | if (!url_parts || url_parts.length < 3) { |
| 16 | this.loadErrorDisplay(this._("tiktok_invalidurl_err")); |
| 17 | return; |
| 18 | } |
| 19 | |
| 20 | this.username = url_parts[1]; |
| 21 | this.media_id = url_parts[2]; |
| 22 | |
| 23 | // Clean URL (remove query parameters) |
| 24 | this.clean_url = `https://www.tiktok.com/@${this.username}/video/${this.media_id}`; |
| 25 | |
| 26 | if (!this.options.background) { |
| 27 | this.createMedia(); |
| 28 | } |
| 29 | |
| 30 | } catch (e) { |
| 31 | this.loadErrorDisplay(this._("tiktok_invalidurl_err")); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | createMedia() { |
| 36 | var self = this; |
nothing calls this directly
no test coverage detected