12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <script>
- Farm.url = '{{loadUrl}}&ajax=1';
- Farm.CreateLoop();
- </script>
- {% if 'camera' in data and data['camera'] %}
- <script type="text/javascript" src="{{static_url('pc/lib/player/video.min.js')}}"></script>
- <script type="text/javascript" src="{{static_url('pc/lib/player/videojs-contrib-hls.min.js')}}"></script>
- <script>
- $(".player").each(function()
- {
- var self = $(this);
- var id = self.attr('id');
- var url = self.attr('data-url');
- var player = videojs(id, { fluid: true }, function()
- {
- this.play();
- this.on('loadeddata', function() {
- var height = $('.video-js video').height();
- $('.box img').height(height).css('display','block');
- });
- });
- });
- </script>
- <script type="text/javascript" src="http://g.alicdn.com/de/prismplayer/1.9.9/prism-min.js"></script>
- <script>
- /*
- $(".player").each(function()
- {
- var self = $(this);
- var id = self.attr('id');
- var url = self.attr('data-url');
- // 初始化播放器
- var player = new prismplayer({
- id: id, // 容器id
- source: url, // 视频url
- isLive:true,//设置为true时为直播状态
- width: "100%", // 播放器宽度
- height: "383px" // 播放器高度
- });
- player.on('ready',function(e) {
- self.show();
- });
- });
- */
- </script>
- {% end %}
|