Giter Site home page Giter Site logo

cclivedemo's Introduction

CC直播

简介


CC视频成立于2005年主要实现视频、直播,业务主要有点播、直播、课堂,合作新东方、清华大学、好医生、凤凰网等


开启web端视频直播的使用流程

引入web端

  • 首先要做的是创建一个项目文件,并且保证项目在服务器环境下运行,localhost可以
  • 必须引入的文件jq库,再有一个是CC提供的js库
  • JS

<script src="//view.csslcloud.net/js/jquery-1.9.0.min.js" type="text/javascript"></script>
<script src="//view.csslcloud.net/js/liveSDK.js" type="text/javascript"></script>
//然后在自己的逻辑代码中初始化一下

<script type="text/javascript">
    DWLive.init({
        userid: 'userid',//讲师Id,必填项,就是上文客户端连接中的userId
        roomid: 'roomid',//通userId理
        viewername: 'name',//描述内容,自编
        viewertoken: 'token',//视情况,自编,
        viewercustomua: 'web'//视情况,自编
    });
</script>
  • HTML

<!--如果在页面想看到视频直播-->
<div id="livePlayer"></div>
<!--如果在页面想看到文档直播-->
<div id="drawPanel"></div>
  • css

 //不需要引用任何css文件,具体的样式实现以及交互,例如文档和视频的切换等,根据自己需要实现
  • 注意

CC不建议将直播嵌入【iframe】中使用,因为使用iframe方式将直播页面嵌入到网站后,使用微信或Safari浏览器访问时无法登录,尽管有解决办法引入
<script src="//view.csslcloud.net/js/_fix.js"></script>,但是仍然不建议做iframe嵌入

M端

  • M端采用的是video标签播放,PC端使用的是flash播放,M端测试不能在PC模拟器上进行,必须在真机上,且不能自动播放,其余引用方式和PC端无分别

cclivedemo's People

Watchers

 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.