用ckplayer網頁程式碼就可以直接在網頁端呼叫播放。程式碼如下:
<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8" data-name="ckplayer"></script>
<div class="video" style="width: 600px;height: 400px;"></div>
<script type="text/javascript">
//定義一個變數:videoObject,用來做為影片初始化配置
var videoObject = {
container: ".video", //“#”代表容器的ID,“.”或“”代表容器的class
variable: "player", //播放函式名稱,該屬性必需設定,值等於下面的new ckplayer()的物件
video: "http://ckplayer-video.oss-cn-shanghai.aliyuncs.com/sample-mp4/05cacb4e02f9d9e.mp4"//影片地址
};
var player = new ckplayer(videoObject);//初始化播放器
</script>
用ckplayer網頁程式碼就可以直接在網頁端呼叫播放。程式碼如下:
<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8" data-name="ckplayer"></script>
<div class="video" style="width: 600px;height: 400px;"></div>
<script type="text/javascript">
//定義一個變數:videoObject,用來做為影片初始化配置
var videoObject = {
container: ".video", //“#”代表容器的ID,“.”或“”代表容器的class
variable: "player", //播放函式名稱,該屬性必需設定,值等於下面的new ckplayer()的物件
video: "http://ckplayer-video.oss-cn-shanghai.aliyuncs.com/sample-mp4/05cacb4e02f9d9e.mp4"//影片地址
};
var player = new ckplayer(videoObject);//初始化播放器
</script>