国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
【PythonDjango后臺(tái)實(shí)例 第七章】Django使用Video.js視頻播放插件

實(shí)驗(yàn)環(huán)境:

Python3.6.2

Django.1.9.12

-----------------------------------------------------------------------------------------

今天咱的Django智慧養(yǎng)殖系統(tǒng)又前進(jìn)了一步。


這是完工后的效果圖。

好了現(xiàn)在說說怎樣使用Video.js插件

這是一個(gè)目前最好的開源Video視頻插件

Video.js第三方下載地址:下載地址

-----------------------------

簡(jiǎn)單使用說明:

在html頁(yè)面中引入CSS和JS文件

    <link rel="stylesheet" href="../static/assets/css/video-js.css">
  1. <script src="../static/assets/js/video.min.js"></script>
  2. <script src="../static/assets/js/videojs-ie8.min.js"></script>
這里面的Src地址自己修改


然后就可以在html頁(yè)面中添加自己的視頻組件內(nèi)容了

  1. <div class="main">
  2. <!-- MAIN CONTENT -->
  3. <div class="main-content">
  4. <div class="container-fluid">
  5. <h3 class="page-title">視頻播放與控制頁(yè)面測(cè)試</h3>
  6. <div class="row">
  7. <div class="col-md-9">
  8. <div class="panel">
  9. <div class="panel-heading">
  10. <h3 class="panel-title"><strong>刮糞板工作區(qū)監(jiān)控</strong></h3>
  11. </div>
  12. <center>
  13. <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="1024" height="768"
  14. poster="http://video-js.zencoder.com/oceans-clip.png"
  15. data-setup="{}">
  16. <source src="../static/assets/mp4/testmp5.mp4" type='video/mp4' />
  17. <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
  18. <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
  19. </video>
  20. </center>
  21. </div>
  22. </div>
  23. <div class="col-md-3">
  24. <div class="row">
  25. <div class="panel">
  26. <div class="panel-heading">
  27. <h3 class="panel-title"><strong>刮糞板控制</strong></h3>
  28. </div>
  29. <div class="panel-body">
  30. <span style="font-size:18px;color:#000000"> 通信狀態(tài): </span>
  31. <button type="button" class="am-btn am-btn-primary am-active">正在通信</button>
  32. <button type="button" class="am-btn am-btn-default am-active">未通信</button>
  33. <hr/>
  34. <span style="font-size:18px;color:#000000"> 設(shè)備狀態(tài): </span>
  35. <button type="button" class="am-btn am-btn-primary am-active">正在運(yùn)行</button>
  36. <button type="button" class="am-btn am-btn-default am-active">未運(yùn)行</button>
  37. <hr/>
  38. <p style="font-size:18px;color:#000000">控制區(qū)域</p>
  39. <button type="button" class="am-btn am-btn-default am-round">清掃作業(yè)</button>
  40. <button type="button" class="am-btn am-btn-default am-round">動(dòng)作暫停</button>
  41. <button type="button" class="am-btn am-btn-default am-round">設(shè)備歸位</button>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="row">
  46. <div class="panel">
  47. <div class="panel-heading">
  48. <h3 class="panel-title"><strong>設(shè)備作業(yè)統(tǒng)計(jì)</strong></h3>
  49. </div>
  50. <div class="panel-body">
  51. <h3 class="panel-title"><strong>總運(yùn)行時(shí)間:</strong></h3>
  52. <hr/>
  53. <h3 class="panel-title"><strong>總運(yùn)行次數(shù):</strong></h3>
  54. <hr/>
  55. <h3 class="panel-title"><strong>上次作業(yè)時(shí)間:</strong></h3>
  56. <hr/>
  57. <h3 class="panel-title"><strong>平均作業(yè)時(shí)長(zhǎng):</strong></h3>
  58. <hr/>
  59. <h3 class="panel-title"><strong>今日作業(yè)次數(shù):</strong></h3>
  60. <hr/>
  61. <div id="record01" style="width: 300px;height:100px;"></div>
  62. <script type="text/javascript">
  63. var record01 = echarts.init(document.getElementById('record01'));
  64. record01.title = '坐標(biāo)軸刻度與標(biāo)簽對(duì)齊';
  65. option = {
  66. title: {
  67. text: '運(yùn)行次數(shù)展示'
  68. },
  69. tooltip: {
  70. trigger: 'axis'
  71. },
  72. legend: {
  73. },
  74. grid: {
  75. left: '3%',
  76. right: '4%',
  77. bottom: '3%',
  78. containLabel: true
  79. },
  80. xAxis: {
  81. type: 'category',
  82. boundaryGap: false,
  83. data: ['08-12','08-12','08-12','08-12','08-12','08-12','今天']
  84. },
  85. yAxis: {
  86. type: 'value'
  87. },
  88. series: [
  89. {
  90. name:'運(yùn)行次數(shù)',
  91. type:'line',
  92. stack: '總量',
  93. data:[3, 2, 4, 6, 7, 4, 5]
  94. },
  95. ]
  96. };
  97. record01.setOption(option);
  98. </script>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
這是我的頁(yè)面的html內(nèi)容代碼

其中的Video的引用

核心代碼:

  1. <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="1024" height="768"
  2. poster="http://video-js.zencoder.com/oceans-clip.png"
  3. data-setup="{}">
  4. <source src="../static/assets/mp4/testmp5.mp4" type='video/mp4' />
  5. <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
  6. <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
  7. </video>


本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
JS代碼實(shí)現(xiàn)頁(yè)面切換效果(上一頁(yè)+具體頁(yè)+下一頁(yè))
Bootstrap
使用toggle()方法進(jìn)行顯示隱藏
第十七節(jié),Bootstrap按鈕和折疊插件
模態(tài)框 modal.js
vue.js簡(jiǎn)易的計(jì)算器代碼
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服