Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
- <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
- <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
- Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
- <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
- <%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
- <%@ Import Namespace="Microsoft.SharePoint" %>
- <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
- Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
- <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VideoHotUserControl.ascx.cs"
- Inherits="MPIPortalCMS.Webpart.Video.VideoHot.VideoHotUserControl" %>
- <script type="text/javascript" src="/_layouts/images/MPI_Javascript/JQUI/swfobject.js"></script>
- <script language="javascript" type="text/javascript">
- function ViewFLVHome(path, path_ava, id, width, height) {
- var oflv = new SWFObject("/_layouts/Tools/FLV/flvplayer.swf", "playlist", width, height, "8");
- oflv.addParam("allowfullscreen", "true");
- oflv.addParam("wmode", "transparent");
- oflv.addVariable("file", path);
- oflv.addParam('allowscriptaccess', 'always');
- oflv.addVariable("width", width);
- oflv.addVariable("height", height);
- oflv.addVariable("shuffle", "false");
- oflv.addVariable("repeat", "list");
- oflv.addVariable("image", path_ava);
- oflv.write(id);
- }
- </script>
- <div class="mybox">
- <div class="danhmuc">
- <div class="myheaderbox-left">
- </div>
- <div class="myheaderbox">
- <a href="video.aspx"><asp:Label ID="lblTieuDe" runat="server"></asp:Label></a>
- </div>
- <div class="myheaderbox-right">
- </div>
- <div class="mycontentbox">
- <%-- <div id="title" style="color: #0A5D82; font-weight: bold; font-family: Arial; font-size: 11px;
- margin-top: 5px; margin-left: 10px;">
- <%= title_default %>
- </div>--%>
- <div class="vdm" id="flv_default">
- Bạn cần cài <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a>
- để xem Clip này.
- </div>
- <video id="my-html5-player" controls preload="auto" width="230" height="190"
- poster="image.png" data-setup="{}">
- <source src="video.mp4" type='video/mp4'>
- <source src="video.webm" type='video/webm'>
- <source src="video.ogg" type='video/ogg'>
- </video>
- <div class="vdm1">
- <ul>
- <asp:DataList ID="dlNext" runat="server" RepeatColumns="1" RepeatDirection="Horizontal">
- <ItemTemplate>
- <li><a class="media" href="javascript:;" title='<%# Eval("strTieuDe") %>' path='<%# Eval("strLinkUrl") %>'
- path_ava='<%# Eval("strAnhDaiDien") %>'>
- </a> </li>
- </ItemTemplate>
- </asp:DataList>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <script language="javascript" type="text/javascript">
- var curVideoPath = '<%= path_default %>';
- var curVideoAva = '<%= path_ava_default %>';
- $(document).ready(function () {
- showCorrectPlayer();
- $.each($(".mybox .danhmuc .mycontentbox .vdm1 ul li a"), function () {
- $(this).click(function () {
- $("#title").html($(this).attr("title"));
- $.each($(".mybox .danhmuc .mycontentbox .vdm1 ul li a"), function () {
- $(this).css('font-weight', 'normal');
- });
- $(this).css('font-weight', 'bold');
- curVideoPath = $(this).attr("path");
- curVideoAva = $(this).attr("path_ava");
- showCorrectPlayer();
- });
- });
- });
- function showCorrectPlayer() {
- html5player = $("#my-html5-player");
- flashplayer = $("#flv_default");
- if (curVideoPath.split('.').pop() === "flv") {
- html5player.pause();
- html5player.hide();
- ViewFLVHome(curVideoPath, curVideoAva, "flv_default", 230, 190);
- flashplayer.show();
- } else {
- flashplayer.empty();
- html5player.attr("src", curVideoPath);
- html5player.attr("poster", curVideoAva);
- html5player[0].load();
- html5player.show();
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement