videoList.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. var player = videojs('example');
  2. player.playlist([
  3. {
  4. name:'视频教程-调价',
  5. // description:'视频教程-调价',
  6. duration:110,
  7. sources: [{
  8. src: 'https://d1video.smartcost.com.cn/video/play/2022/调价.mp4',
  9. type: 'video/mp4'
  10. }],
  11. poster:'home/video/tiaojia.jpg',
  12. thumbnail: [
  13. {
  14. srcset: 'home/video/tiaojia.jpg',
  15. type: 'image/jpg',
  16. media: '(max-width: 130px;)'
  17. },
  18. {
  19. src:'home/video/tiaojia.jpg'
  20. }
  21. ]
  22. },
  23. // {
  24. // name:'视频教程-共用单价文件',//视频标题
  25. // // description:'视频教程-共用单价文件',//视频描述
  26. // duration:112,//视频总时长,单位秒(s)
  27. // sources: [{//视频资源地址以及视频的MIME类型
  28. // src: 'https://d1video.smartcost.com.cn/video/play/2022/共用单价文件.mp4',
  29. // type: 'video/mp4'
  30. // }],
  31. // //视频封面地址
  32. // poster:'home/video/gydjwenjian.jpg',
  33. // //右侧视频播放列表的图片
  34. // thumbnail: [
  35. // {//默认图片
  36. // srcset: 'home/video/gydjwenjian.jpg',
  37. // type: 'image/jpg',
  38. // media: '(max-width: 130px;)'
  39. // },
  40. // {//实际视频缩略图图片
  41. // src:'home/video/gydjwenjian.jpg'
  42. // }
  43. // ]
  44. // },
  45. {
  46. name:'视频教程-清单精灵',//视频标题
  47. description:'Explore the depths of our planet\'s oceans.',//视频描述
  48. duration:110,//视频总时长,单位秒(s)
  49. sources: [{//视频资源地址以及视频的MIME类型
  50. src: 'https://d1video.smartcost.com.cn/video/play/2022/清单精灵.mp4',
  51. type: 'video/mp4'
  52. }],
  53. //视频封面地址
  54. poster:'home/video/qdjianling.jpg',
  55. thumbnail: [
  56. {//默认图片
  57. srcset: 'home/video/qdjianling.jpg',
  58. type: 'image/jpg',
  59. media: '(max-width: 130px;)'
  60. },
  61. {//实际视频缩略图图片
  62. src:'home/video/qdjianling.jpg'
  63. }
  64. ]
  65. },
  66. {
  67. name:'视频教程-查找定位',
  68. description:'Explore the depths of our planet\'s oceans.',
  69. duration:122,
  70. sources: [{
  71. src: 'https://d1video.smartcost.com.cn/video/play/2022/查找定位.mp4',
  72. type: 'video/mp4'
  73. }],
  74. poster:'home/video/czdingwei.jpg',
  75. thumbnail: [
  76. {
  77. srcset: 'home/video/czdingwei.jpg',
  78. type: 'image/jpg',
  79. media: '(max-width: 130px;)'
  80. },
  81. {
  82. src:'home/video/czdingwei.jpg'
  83. }
  84. ]
  85. },
  86. {
  87. name:'视频教程-分享协作',//视频标题
  88. description:'Explore the depths of our planet\'s oceans.',//视频描述
  89. duration:116,//视频总时长,单位秒(s)
  90. sources: [{//视频资源地址以及视频的MIME类型
  91. src: 'https://d1video.smartcost.com.cn/video/play/2022/分享协作.mp4',
  92. type: 'video/mp4'
  93. }],
  94. //视频封面地址
  95. poster:'home/video/fxxiezuo.jpg',
  96. //右侧视频播放列表的图片
  97. thumbnail: [
  98. {//默认图片
  99. srcset: 'home/video/fxxiezuo.jpg',
  100. type: 'image/jpg',
  101. media: '(max-width: 130px;)'
  102. },
  103. {//实际视频缩略图图片
  104. src:'home/video/fxxiezuo.jpg'
  105. }
  106. ]
  107. }, {
  108. name:'视频教程-模版克隆',//视频标题
  109. description:'Explore the depths of our planet\'s oceans.',//视频描述
  110. duration:113,//视频总时长,单位秒(s)
  111. sources: [{//视频资源地址以及视频的MIME类型
  112. src: 'https://d1video.smartcost.com.cn/video/play/2022/模板克隆.mp4',
  113. type: 'video/mp4'
  114. }],
  115. //视频封面地址
  116. poster:'video/mbkelong.jpg',
  117. thumbnail: [
  118. {//默认图片
  119. srcset: 'home/video/mbkelong.jpg',
  120. type: 'image/jpg',
  121. media: '(max-width: 130px;)'
  122. },
  123. {//实际视频缩略图图片
  124. src:'home/video/mbkelong.jpg'
  125. }
  126. ]
  127. },
  128. {
  129. name:'视频教程-复制整块',
  130. description:'Explore the depths of our planet\'s oceans.',
  131. duration:95,
  132. sources: [{
  133. src: 'https://d1video.smartcost.com.cn/video/play/2022/复制整块.mp4',
  134. type: 'video/mp4'
  135. }],
  136. poster:'home/video/fzzhengkuai.jpg',
  137. thumbnail: [
  138. {
  139. srcset: 'home/video/fzzhengkuai.jpg',
  140. type: 'image/jpg',
  141. media: '(max-width: 130px;)'
  142. },
  143. {
  144. src:'home/video/fzzhengkuai.jpg'
  145. }
  146. ]
  147. }
  148. ]);
  149. player.playlistUi();
  150. player.playlist.autoadvance(0); // 自动播放, 0秒延时
  151. player.playlist.repeat(true); //循环播放