Coder Social home page Coder Social logo

live's Introduction

直播抓取

支持的直播平台:YY直播、斗鱼直播、花椒直播、熊猫直播、映客直播、一直播

使用步骤

1. 使用composer 安装
composer require itxiao6/live
2. 创建test.php
/**
 * 引入Composer 自动加载规则
 */
include_once('vendor/autoload.php');
/**
 * 当前支持的直播平台
 * 1.熊猫直播
 * 2.斗鱼
 * 3.花椒直播
 * 4.一直播
 * 5.映客直播
 */
/**
 * 自动分析平台 及 抓取直播流信息
 */
$res = \Itxiao6\Live\Live::getInterface() -> auto($_GET['url']);
/**
 * 输出测试页面 播放直播
 */
echo '<html>    
    <head>    
        <title>视频直播</title>    
        <meta charset="utf-8">    
        <link href="https://cdn.bootcss.com/video.js/5.5.3/video-js.css" rel="stylesheet">
        <!-- If you\'d like to support IE8 -->    
        <script src="https://cdn.bootcss.com/video.js/5.5.3/ie8/videojs-ie8.min.js"></script>   
    </head>    
<body>
  <h1>直播间</h1>    
    <video id="my-video" class="video-js" controls preload="auto" width="640" height="300" data-setup="{}"> '.$res -> get_source().' </video>    
 <script src="https://cdn.bootcss.com/video.js/5.5.3/video.js"></script>
</body>    
</html>';
3.访问测试页面(播放器使用的 Video.js) 文档参考链接

live's People

Contributors

itxiao6 avatar

Watchers

James Cloos avatar 薛将军 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.