PHPackages                             prashantdhungana/social-embed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. prashantdhungana/social-embed

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

prashantdhungana/social-embed
=============================

Embed Youtube and Tiktok videos as an iframe

1.0.0(1y ago)010MITBladePHP ^8.1

Since Jul 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/PrashantDhungana/social-embed)[ Packagist](https://packagist.org/packages/prashantdhungana/social-embed)[ RSS](/packages/prashantdhungana-social-embed/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

SocialEmbed Plugin
==================

[](#socialembed-plugin)

The `SocialEmbed` plugin is a custom Filament form component that allows users to embed TikTok and YouTube videos by providing a URL. This component extends the `TextInput` component from the Filament Forms library.

Features
--------

[](#features)

- Supports embedding videos from TikTok and YouTube.
- Customizable width and height for the embedded video.
- Automatic URL processing to generate the correct embed link.
- Live validation and updating of the embed link.
- Notification support for unsupported video platforms.

Installation
------------

[](#installation)

1. Require the plugin via Composer:

    ```
    composer require prashantdhungana/social-embed
    ```
2. Add the `SocialEmbed` component to your form:

    ```
    use PrashantDhungana\SocialEmbed\SocialEmbed;

    SocialEmbed::make('video');
    ```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

To use the `SocialEmbed` component in your form, simply call the `make` method and pass the name of the field:

```
```php
use PrashantDhungana\SocialEmbed\SocialEmbed;

SocialEmbed::make('video');
```

```

This will create a text input field with a placeholder prompting the user to enter a TikTok or YouTube video URL.

### Customizing Dimensions

[](#customizing-dimensions)

You can customize the width and height of the embedded video using the width and height methods:

```
```php
use PrashantDhungana\SocialEmbed\SocialEmbed;

SocialEmbed::make('video_url')
    ->width('80%')
    ->height('400');
```

```

### Notifications

[](#notifications)

If the provided URL is from an unsupported video platform, a notification will be displayed to the user.

Methods
-------

[](#methods)

`make(string $name): static`Creates a new instance of the `SocialEmbed` component.

`width(string $width): static`Sets the width of the embedded video. Accepts a string representing the width (e.g., `'100%'`).

`height(string $height): static`Sets the height of the embedded video. Accepts a string representing the height (e.g., `'500'`).

`getWidth(): string`Returns the current width of the embedded video.

`getHeight(): string`Returns the current height of the embedded video.

Processing Links
----------------

[](#processing-links)

The `processLink` method automatically processes the provided URL and generates the appropriate embed link. If the URL is not supported, a notification will be sent to the user.

Supported Platforms
-------------------

[](#supported-platforms)

- TikTok
- YouTube

Example URL Formats
-------------------

[](#example-url-formats)

- Tiktok: `https://www.tiktok.com/@username/video/123456789`
- Youtube: `https://www.youtube.com/watch?v=abcdefghijk`, `https://youtu.be/abcdefghijk`, `https://www.youtube.com/embed/abcdefghijk`

License
-------

[](#license)

This project is open-source and available under the MIT License.

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.

Credits
-------

[](#credits)

- [Prashant Dhungana](https://github.com/PrashantDhungana)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

728d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29656761?v=4)[Prashant Sharma Dhungana](/maintainers/PrashantDhungana)[@PrashantDhungana](https://github.com/PrashantDhungana)

---

Top Contributors

[![PrashantDhungana](https://avatars.githubusercontent.com/u/29656761?v=4)](https://github.com/PrashantDhungana "PrashantDhungana (2 commits)")

### Embed Badge

![Health badge](/badges/prashantdhungana-social-embed/health.svg)

```
[![Health](https://phpackages.com/badges/prashantdhungana-social-embed/health.svg)](https://phpackages.com/packages/prashantdhungana-social-embed)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[codebar-ag/laravel-filament-json-field

A Laravel Filament JSON Field integration with CodeMirror support

1126.6k](/packages/codebar-ag-laravel-filament-json-field)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k17](/packages/wsmallnews-filament-nestedset)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
