none
asp.net的程序如何播放wav RRS feed

答案

全部回复

  • #region 網頁嵌入Windows Media Player
        /// <summary>
        /// 網頁嵌入Windows Media Player
        /// </summary>
        /// <param name="width">寬度,建議374</param>
        /// <param name="height">高度,建議355</param>
        /// <param name="httpFilePath">URL完整檔案路徑</param>
        /// <returns>回傳 WMP的HTML程式碼</returns>
        public string MovieHtml(int width, int height, string httpFilePath)
        {
            string content_att = string.Empty;
    
            content_att += "<div align='center'>";
            content_att += "<OBJECT ID='ActiveMovie1' WIDTH='" + width + "' HEIGHT='"+height+"' CLASSID='CLSID:05589FA1-C356-11CE-BF01-00AA0055595A'>";
            content_att += "<PARAM NAME='Version' VALUE='1'>";
            content_att += "<PARAM NAME='EnableContextMenu' VALUE='-1'>";
            content_att += "<PARAM NAME='ShowDisplay' VALUE='0'>";
            content_att += "<PARAM NAME='ShowControls' VALUE='-1'>";
            content_att += "<PARAM NAME='ShowPositionControls' VALUE='0'>";
            content_att += "<PARAM NAME='ShowSelectionControls' VALUE='0'>";
            content_att += "<PARAM NAME='EnablePositionControls' VALUE='-1'>";
            content_att += "<PARAM NAME='EnableSelectionControls' VALUE='-1'>";
            content_att += "<PARAM NAME='ShowTracker' VALUE='-1'>";
            content_att += "<PARAM NAME='EnableTracker' VALUE='-1'>";
            content_att += "<PARAM NAME='AllowHideDisplay' VALUE='-1'>";
            content_att += "<PARAM NAME='AllowHideControls' VALUE='-1'>";
            content_att += "<PARAM NAME='MovieWindowSize' VALUE='0'>";
            content_att += "<PARAM NAME='FullScreenMode' VALUE='0'>";
            content_att += "<PARAM NAME='AutoStart' VALUE='0'>";
            content_att += "<PARAM NAME='AutoRewind' VALUE='1'>";
            content_att += "<PARAM NAME='PlayCount' VALUE='99'>";
            content_att += "<PARAM NAME='SelectionStart' VALUE='0'>";
            content_att += "<PARAM NAME='SelectionEnd' VALUE='200.5151388'>";
            content_att += "<PARAM NAME='Appearance' VALUE='1'>";
            content_att += "<PARAM NAME='BorderStyle' VALUE='1'>";
            content_att += "<PARAM NAME='FileName' VALUE='" + httpFilePath + "'>";
            content_att += "<PARAM NAME='DisplayMode' VALUE='0'>";
            content_att += "<PARAM NAME='AllowChangeDisplayMode' VALUE='-1'>";
            content_att += "<PARAM NAME='DisplayForeColor' VALUE='16777215'>";
            content_att += "<PARAM NAME='DisplayBackColor' VALUE='0'>";
            content_att += "內容";
            content_att += "</OBJECT>";
            content_att += "</div>";
    
    
            return content_att;
        }
    
        #endregion
    


    网页播放音乐的实现方法代码


    Shadowと愉快なコード達
    2011年12月4日 14:26
  • #region 網頁嵌入Windows Media Player
        /// <summary>
        /// 網頁嵌入Windows Media Player
        /// </summary>
        /// <param name="width">寬度,建議374</param>
        /// <param name="height">高度,建議355</param>
        /// <param name="httpFilePath">URL完整檔案路徑</param>
        /// <returns>回傳 WMP的HTML程式碼</returns>
        public string MovieHtml(int width, int height, string httpFilePath)
        {
            string content_att = string.Empty;
    
            content_att += "<div align='center'>";
            content_att += "<OBJECT ID='ActiveMovie1' WIDTH='" + width + "' HEIGHT='"+height+"' CLASSID='CLSID:05589FA1-C356-11CE-BF01-00AA0055595A'>";
            content_att += "<PARAM NAME='Version' VALUE='1'>";
            content_att += "<PARAM NAME='EnableContextMenu' VALUE='-1'>";
            content_att += "<PARAM NAME='ShowDisplay' VALUE='0'>";
            content_att += "<PARAM NAME='ShowControls' VALUE='-1'>";
            content_att += "<PARAM NAME='ShowPositionControls' VALUE='0'>";
            content_att += "<PARAM NAME='ShowSelectionControls' VALUE='0'>";
            content_att += "<PARAM NAME='EnablePositionControls' VALUE='-1'>";
            content_att += "<PARAM NAME='EnableSelectionControls' VALUE='-1'>";
            content_att += "<PARAM NAME='ShowTracker' VALUE='-1'>";
            content_att += "<PARAM NAME='EnableTracker' VALUE='-1'>";
            content_att += "<PARAM NAME='AllowHideDisplay' VALUE='-1'>";
            content_att += "<PARAM NAME='AllowHideControls' VALUE='-1'>";
            content_att += "<PARAM NAME='MovieWindowSize' VALUE='0'>";
            content_att += "<PARAM NAME='FullScreenMode' VALUE='0'>";
            content_att += "<PARAM NAME='AutoStart' VALUE='0'>";
            content_att += "<PARAM NAME='AutoRewind' VALUE='1'>";
            content_att += "<PARAM NAME='PlayCount' VALUE='99'>";
            content_att += "<PARAM NAME='SelectionStart' VALUE='0'>";
            content_att += "<PARAM NAME='SelectionEnd' VALUE='200.5151388'>";
            content_att += "<PARAM NAME='Appearance' VALUE='1'>";
            content_att += "<PARAM NAME='BorderStyle' VALUE='1'>";
            content_att += "<PARAM NAME='FileName' VALUE='" + httpFilePath + "'>";
            content_att += "<PARAM NAME='DisplayMode' VALUE='0'>";
            content_att += "<PARAM NAME='AllowChangeDisplayMode' VALUE='-1'>";
            content_att += "<PARAM NAME='DisplayForeColor' VALUE='16777215'>";
            content_att += "<PARAM NAME='DisplayBackColor' VALUE='0'>";
            content_att += "內容";
            content_att += "</OBJECT>";
            content_att += "</div>";
    
    
            return content_att;
        }
    
        #endregion
    


    网页播放音乐的实现方法代码


    Shadowと愉快なコード達

    没看懂,url在那里设置呢?
    2011年12月6日 3:36

  • 没看懂,url在那里设置呢?


    补上使用方式

    Literal1.Text = MovieHtml(374,355,档案Url);


    Shadowと愉快なコード達
    • 已标记为答案 VCResearch 2011年12月6日 8:30
    2011年12月6日 4:50

  • 没看懂,url在那里设置呢?


    补上使用方式

    Literal1.Text = MovieHtml(374,355,档案Url);


    Shadowと愉快なコード達

    谢谢。
    2011年12月6日 8:29