2011-03-16 158 views
1

我正在移植ASP。 NET應用程序到MVC。在一個頁面中,我需要播放音頻和視頻文件。 爲此,我在應用程序中使用了MediaPlayers.dll。 在ASP .NET我的usd它像下面所示如何在MVC中播放音頻和視頻

<%@ Register Assembly="MediaPlayers" Namespace="MediaPlayers" TagPrefix="cc1" %> 

,我使用以下代碼

 <cc1:MediaPlayer ID="MediaPlayer1" runat="server" Width="250" Height="42" autoStart="True" 
                       MovieWindowSize="0" ShowControls="True" UIMode="full" WindowLessVideo="True" 
                       AllowHideControls="True" AllowHideDisplay="True" Balance="0" ButtonsVisible="True" 
                       DisplayMode="0" EnableContextMenu="True" Enabled="True" Filename="" fullScreen="False" 
                       Invisible="False" Loop="1" Rate="1" ShowDisplay="False" StretchToFit="True" Volume="100"> 
                      </cc1:MediaPlayer> 

我可以從代碼訪問它後面使用id Mediaplayer1訪問此DLL。

但現在在mvc中,我如何將這個DLL包含在我的應用程序中,以及如何從控制器訪問它?

回答

0

Razor Views提供他們自己的媒體播放器處理。 A description在mvc網站上。