支持格式:(阿里云Web播放器SDK,同时支持Flash和Html5两种播放技术。)
Flash 模式(已停止更新):
视频格式:mp4、flv、m3u8、rtmp
视频编码:H.264
音频编码:AAC、MP3
音频格式:MP3
HTML5 模式:视频格式:mp4、m3u8、flv
视频编码:H.264
音频编码:AAC
音频格式:mp3
Flash直播演示实例:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="IE=edge" > <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/> <title>Aliplayer Online Settings</title> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css" /> <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script> </head> <body> <div class="prism-player" id="player-con"></div> <script> var player = new Aliplayer({ "id": "player-con", "source": "http://cctvalih5ca.v.myalicdn.com/live/cctv13_2/index.m3u8",//播放地址,支持MP4、m3u8 "width": "100%", "height": "500px", "autoplay": true, "isLive": true, "rePlay": false, "showBuffer": true, "snapshot": false, "showBarTime": 5000, "useFlashPrism": true, "skinLayout": [ { "name": "bigPlayButton", "align": "blabs", "x": 30, "y": 80 }, { "name": "errorDisplay", "align": "tlabs", "x": 0, "y": 0 }, { "name": "infoDisplay" }, { "name": "controlBar", "align": "blabs", "x": 0, "y": 0, "children": [ { "name": "liveDisplay", "align": "tlabs", "x": 15, "y": 25 }, { "name": "fullScreenButton", "align": "tr", "x": 10, "y": 25 }, { "name": "volume", "align": "tr", "x": 10, "y": 25 } ] } ] }, function (player) { console.log("The player is created"); } ); </script> </body>
实际使用时可以吧播放地址改成:“<?php echo($_REQUEST[‘url’]);?>’”那么调用的时候,就是文件链接地址在结尾加上“?url=”加视频地址就可以播放了;此方法使用所有播放器项目哦,下面演示也是参考这里
Html5点播演示实例:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="IE=edge" > <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/> <title>Aliplayer Online Settings</title> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css" /> <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script> </head> <body> <div class="prism-player" id="player-con"></div> <script> var player = new Aliplayer({ "id": "player-con", "source": "https://api.ilingku.com/video.m3u8",//点播地址,使用情参考上面的方法 "width": "100%", "height": "500px", "autoplay": true, "isLive": false, "rePlay": false, "playsinline": true, "preload": true, "controlBarVisibility": "hover", "useH5Prism": true }, function (player) { console.log("The player is created"); } ); </script> </body>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)