定制 jeremy_vk/php_video_embedder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jeremy_vk/php_video_embedder

最新稳定版本:v0.0.4

Composer 安装命令:

composer require jeremy_vk/php_video_embedder

包简介

a librairy for embed videos from video platforms to your website, just with paste the video url

README 文档

README

This library simply return HTML embed code, just by passing the video url.

Requirements

This library required php >= 8.1 version

Getting started

Just run

composer require jeremy_vk/php_video_embedder

How to use it

Simply instance the EmbedMedia\Services\VideoEmbedder class

$videoEmbedder = new EmbedMedia\Services\VideoEmbedder(new EmbedMedia\Services\VideoPlatformResolver());

Or use the dependency injection

public function __construct (private VideoEmbedder $videoEmbedder){}

Here is an example of how to use the VideoEmbedder to embed video

$videoURL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ55";
$embedCode = $videoEmbedder->embedVideo($videoURL);
echo $embedCode;

Should return

<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ55" frameborder="0" allowfullscreen style="width: 100%; height: 100%"></iframe>

Three platforms are configured:

  • Tiktok
  • Youtube
  • Instagram

If you want to contribute to this project, like add a new platform, you can open an issue to talk about it, or just open a pull request

统计信息

  • 总下载量: 86
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固