我尝试将 Flow Player 集成到 Ext.net 中。如何在代码(.cs 文件)中设置视频源。
<ext:Panel ID="VideoPanel" runat="server" Split="true">
<Content>
<div class="flowplayer">
<video src="../video/Ganesh.mp4"></video>
</div>
</Content>
</ext:Panel>
我可以通过代码(.cs 文件)添加视频源吗
我在我的广播页面中使用视频。它在表单面板中使用
我的 ASPX 代码是:-----
<ext:FormPanel
ID="FormPanel1"
runat="server"
Region="East" Title="Broadcasting Details"
Split="true"
Margins="0 5 5 5"
Frame="true" ColumnWidth="0.3"
Width="280"
DefaultAnchor="100%">
<Items>
<ext:TextField ID="TextTitle" runat="server" FieldLabel="Title" Name="title" />
<ext:TextField ID="TextShortDescription" runat="server" FieldLabel="Short Description" Name="shortDescription" />
<ext:Label ID="descriptionLabel" Text="Description" runat="server"></ext:Label>
<ext:HtmlEditor ID="TextDescription" Name="descriptionContent" runat="server">
</ext:HtmlEditor>
<ext:Checkbox ID="CheckIsPublic" runat="server" FieldLabel="IsPublic" Name="isPublic" />
<ext:Panel runat="server" Layout="HBoxLayout" Split="true" Frame="true">
<Items>
<ext:Checkbox ID="CheckisEmbedded" runat="server" FieldLabel="Is Embedded" Name="isEmbedded">
<Listeners>
<Change Fn="changeText" />
</Listeners>
</ext:Checkbox>
<ext:ToolbarFill ID="ToolbarFill2" runat="server"></ext:ToolbarFill>
<ext:TextField ID="TextEmbeddedCode" runat="server" Name="embeddedCode" Region="West">
<Listeners>
<Change Fn="isFromOtherSite_Checked" />
</Listeners>
</ext:TextField>
</Items>
</ext:Panel>
<ext:Panel ID="VideoPanel" runat="server" Split="true">
<Content>
<div runat="server" id="videoDiv" class="flowplayer">
<video runat="server" id="video1" ></video>
</div>
</Content>
</ext:Panel>
<ext:FileUploadField ID="fileUploadBroadCast" runat="server" FieldLabel="Broadcast File" Name="fileName" Hidden="false" />
<ext:Hidden ID="newsIdHidden" runat="server" Name="broadcastingId" />
</Items>
<BottomBar>
<ext:Toolbar ID="Toolbar2" runat="server">
<Items>
<ext:Button ID="Button1" runat="server" Text="Save" Icon="Tick">
<DirectEvents>
<Click OnEvent="SaveButton_Click"></Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="Reset Fields" Icon="Reload">
<DirectEvents>
<Click OnEvent="Reset_Click"></Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button3" runat="server" Text="Delete" Icon="Decline">
<DirectEvents>
<Click OnEvent="Delete_Click"></Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:FormPanel>
并在directevent方法中设置src,这段代码是:
protected void Select(object sender, DirectEventArgs e)
{
this.Video1.Attributes.Add("src", "Ganesh.mp4");
}