12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>screen_program</title>
- <style type="text/css">
- *{margin: 0;padding: 0px;}
- </style>
- </head>
- <body>
- <div id="type1" style="width: 128px;height: 256px;background: #000;display: none;">
- <img src="" style="max-width: 128px;max-height: 256px">
- </div>
- <div id="type2" style="width: 128px;height: 256px;background: #000;padding-left: 4px;padding-top: 7px;display: none;">
- <!-- <embed src="" autostart="true" loop="true" /> -->
- <object style="width: 100%;height: 100%;" id="myMovieId" loop='true' data="" type="video/mp4">
- <param name="filename" value="">
- <param name="loop" value="true">
- </object>
- <!-- <video src="" style="width: 100%;height: 100%;"></video> -->
- </div>
- </body>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
- <script type="text/javascript">
- $(function () {
- var type = <?php echo $programData['type'];?>;
- var fileType = <?php echo $programData['fileType'];?>;
- var type1 = $('#type1');
- var type2 = $('#type2');
- if (type == 1) {
- if (fileType == 1) { // 图片
- type1.css('display','block');
- $('img').attr('src','<?php echo $programData['path'];?>');
- }else if (fileType == 2) { // 视屏
- type2.css('display','block');
- // $('embed').attr('src','http://www.shidian.com/upload/file/screenData/1560245807_16.mp4');
- $('object').attr('data','<?php echo $programData['path']?>');
- $('param').attr('value','<?php echo $programData['path']?>');
- // var player=document.getElementById("myMovieId");
- // console.log(player);
- // player.loop = true;
- // player.play();
- // var myVideo = document.getElementsByTagName('embed')[0];
- // myVideo.loop = true;
- // myVideo.play();
- }
- }
- })
- </script>
- </html>
|