Advertisement
PepperoniPapaya

video

May 28th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
  2. <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
  3. <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
  4. Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
  5. <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
  6. <%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
  7. <%@ Import Namespace="Microsoft.SharePoint" %>
  8. <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
  9. Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
  10. <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VideoHotUserControl.ascx.cs"
  11. Inherits="MPIPortalCMS.Webpart.Video.VideoHot.VideoHotUserControl" %>
  12. <script type="text/javascript" src="/_layouts/images/MPI_Javascript/JQUI/swfobject.js"></script>
  13. <script language="javascript" type="text/javascript">
  14. function ViewFLVHome(path, path_ava, id, width, height) {
  15. var oflv = new SWFObject("/_layouts/Tools/FLV/flvplayer.swf", "playlist", width, height, "8");
  16. oflv.addParam("allowfullscreen", "true");
  17. oflv.addParam("wmode", "transparent");
  18. oflv.addVariable("file", path);
  19. oflv.addParam('allowscriptaccess', 'always');
  20. oflv.addVariable("width", width);
  21. oflv.addVariable("height", height);
  22. oflv.addVariable("shuffle", "false");
  23. oflv.addVariable("repeat", "list");
  24. oflv.addVariable("image", path_ava);
  25. oflv.write(id);
  26. }
  27.  
  28. </script>
  29. <div class="mybox">
  30. <div class="danhmuc">
  31. <div class="myheaderbox-left">
  32. </div>
  33. <div class="myheaderbox">
  34. <a href="video.aspx"><asp:Label ID="lblTieuDe" runat="server"></asp:Label></a>
  35. </div>
  36. <div class="myheaderbox-right">
  37. </div>
  38. <div class="mycontentbox">
  39. <%-- <div id="title" style="color: #0A5D82; font-weight: bold; font-family: Arial; font-size: 11px;
  40. margin-top: 5px; margin-left: 10px;">
  41. <%= title_default %>
  42. </div>--%>
  43. <div class="vdm" id="flv_default">
  44. Bạn cần cài <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a>
  45. để xem Clip này.
  46. </div>
  47. <video id="my-html5-player" controls preload="auto" width="230" height="190"
  48. poster="image.png" data-setup="{}">
  49. <source src="video.mp4" type='video/mp4'>
  50. <source src="video.webm" type='video/webm'>
  51. <source src="video.ogg" type='video/ogg'>
  52. </video>
  53. <div class="vdm1">
  54. <ul>
  55. <asp:DataList ID="dlNext" runat="server" RepeatColumns="1" RepeatDirection="Horizontal">
  56. <ItemTemplate>
  57. <li><a class="media" href="javascript:;" title='<%# Eval("strTieuDe") %>' path='<%# Eval("strLinkUrl") %>'
  58. path_ava='<%# Eval("strAnhDaiDien") %>'>
  59. </a> </li>
  60. </ItemTemplate>
  61. </asp:DataList>
  62. </ul>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <script language="javascript" type="text/javascript">
  68. var curVideoPath = '<%= path_default %>';
  69. var curVideoAva = '<%= path_ava_default %>';
  70.  
  71. $(document).ready(function () {
  72. showCorrectPlayer();
  73. $.each($(".mybox .danhmuc .mycontentbox .vdm1 ul li a"), function () {
  74. $(this).click(function () {
  75. $("#title").html($(this).attr("title"));
  76. $.each($(".mybox .danhmuc .mycontentbox .vdm1 ul li a"), function () {
  77. $(this).css('font-weight', 'normal');
  78. });
  79. $(this).css('font-weight', 'bold');
  80. curVideoPath = $(this).attr("path");
  81. curVideoAva = $(this).attr("path_ava");
  82. showCorrectPlayer();
  83. });
  84. });
  85. });
  86. function showCorrectPlayer() {
  87. html5player = $("#my-html5-player");
  88. flashplayer = $("#flv_default");
  89. if (curVideoPath.split('.').pop() === "flv") {
  90. html5player.pause();
  91. html5player.hide();
  92. ViewFLVHome(curVideoPath, curVideoAva, "flv_default", 230, 190);
  93. flashplayer.show();
  94. } else {
  95. flashplayer.empty();
  96. html5player.attr("src", curVideoPath);
  97. html5player.attr("poster", curVideoAva);
  98. html5player[0].load();
  99. html5player.show();
  100. }
  101. }
  102. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement