添加realplay的com组件后。如何实现src的动态获取?
各位大虾帮看哈子。。
感激。

解决方案 »

  1.   

    realPlayer的没搞过,WM的到搞过,不过感觉页面开发的道理应该是一样的,只是流媒体服务器不同罢了。你根据GET过来的ID动态设置SRC
      

  2.   

    lincent(灵心):
    能说具体点么?
    如何用GET过来的ID动态设置SRC??
    谢谢哦
      

  3.   

    你写个A.ASPX?ID=1234
    在页面的SRC放个<%=URL%>
    然后PAGE_LOAD的时候取这个,查库,设置这个URL不就行了吗?
      

  4.   

    /* 程序控制媒体播放器,可控制宽度和高度
        输入参数:媒体文件,帧宽度,帧高度
        用法:Label_MediaPlayer.Text = PlayMedia(MediaFile, Width, Height)
      */public string PlayMedia(string MediaFile , int FrameWidth,int FrameHeight)
    {
        string Str;
        Str = "<object Id='nstv' codeBase='";
        Str += "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab";
        Str += "#Version=5,1,52,701' type='application/x-oleobject' ";
        Str += "height='";
        Str += FrameHeight;
        Str += "' stanDby='Loading Microsoft Windows Media Player components...' ";
        Str += "Width='";
        Str += FrameWidth;
        Str += "' align='mIddle' ";
        Str += "cssclassId='CLSId:22d6f312-b0f6-11d0-94ab-0080c74c7e95' ";
        Str += "VIEWASTEXT>";
        Str += "<PARAM NAME='AudioStream' VALUE='-1'>";
        Str += "<PARAM NAME='AutoSize' VALUE='1'>";
        Str += "<PARAM NAME='AutoStart' VALUE='-1'>";
        Str += "<PARAM NAME='AnimationAtStart' VALUE='-1'>";
        Str += "<PARAM NAME='AllowScan' VALUE='-1'>";
        Str += "<PARAM NAME='AllowChangeDisplaySize' VALUE='1'>";
        Str += "<PARAM NAME='AutoRewind' VALUE='0'>";
        Str += "<PARAM NAME='Balance' VALUE='0'>";
        Str += "<PARAM NAME='BaseURL' VALUE=''>";
        Str += "<PARAM NAME='BufferingTime' VALUE='5'>";
        Str += "<PARAM NAME='CaptioningId' VALUE=''>";
        Str += "<PARAM NAME='ClickToPlay' VALUE='-1'>";
        Str += "<PARAM NAME='CursorType' VALUE='0'>";
        Str += "<PARAM NAME='CurrentPosition' VALUE='-1'>";
        Str += "<PARAM NAME='CurrentMarker' VALUE='0'>";
        Str += "<PARAM NAME='defaultFrame' VALUE=''>";
        Str += "<PARAM NAME='DisplayBackColor' VALUE='0'>";
        Str += "<PARAM NAME='DisplayForeColor' VALUE='16777215'>";
        Str += "<PARAM NAME='DisplayMode' VALUE='0'>";
        Str += "<PARAM NAME='DisplaySize' VALUE='0'>";
        Str += "<PARAM NAME='Enabled' VALUE='-1'>";
        Str += "<PARAM NAME='EnableContextMenu' VALUE='true'>";
        Str += "<PARAM NAME='EnablePositionControls' VALUE='-1'>";
        Str += "<PARAM NAME='EnableFullScreenControls' VALUE='1'>";
        Str += "<PARAM NAME='EnableTracker' VALUE='-1'>";
        Str += "<PARAM NAME='Filename' VALUE='";
        Str += MediaFile;
        Str += "'>";
        Str += "<PARAM NAME='InvokeURLs' VALUE='-1'>";
        Str += "<PARAM NAME='Language' VALUE='-1'>";
        Str += "<PARAM NAME='Mute' VALUE='0'>";
        Str += "<PARAM NAME='PlayCount' VALUE='1'>";
        Str += "<PARAM NAME='PreviewMode' VALUE='0'>";
        Str += "<PARAM NAME='Rate' VALUE='1'>";
        Str += "<PARAM NAME='SAMILang' VALUE=''>";
        Str += "<PARAM NAME='SAMIStyle' VALUE=''>";
        Str += "<PARAM NAME='SAMifileName' VALUE=''>";
        Str += "<PARAM NAME='SelectionStart' VALUE='-1'>";
        Str += "<PARAM NAME='Selection} //' VALUE='-1'>";
        Str += "<PARAM NAME='S} //OpenStateChangeEvents' VALUE='-1'>";
        Str += "<PARAM NAME='S} //WarningEvents' VALUE='-1'>";
        Str += "<PARAM NAME='S} //ErrorEvents' VALUE='-1'>";
        Str += "<PARAM NAME='S} //KeyboardEvents' VALUE='0'>";
        Str += "<PARAM NAME='S} //MouseClickEvents' VALUE='0'>";
        Str += "<PARAM NAME='S} //MouseMoveEvents' VALUE='0'>";
        Str += "<PARAM NAME='S} //PlayStateChangeEvents' VALUE='-1'>";
        Str += "<PARAM NAME='ShowCaptioning' VALUE='0'>";
        Str += "<PARAM NAME='ShowControls' VALUE='-1'>";
        Str += "<PARAM NAME='ShowAudioControls' VALUE='-1'>";
        Str += "<PARAM NAME='ShowDisplay' VALUE='0'>";
        Str += "<PARAM NAME='ShowGotoBar' VALUE='0'>";
        Str += "<PARAM NAME='ShowPositionControls' VALUE='-1'>";
        Str += "<PARAM NAME='ShowStatusBar' VALUE='-1'>";
        Str += "<PARAM NAME='ShowTracker' VALUE='-1'>";
        Str += "<PARAM NAME='TransparentAtStart' VALUE='0'>";
        Str += "<PARAM NAME='VIdeoBorderWidth' VALUE='0'>";
        Str += "<PARAM NAME='VIdeoBorderColor' VALUE='0'>";
        Str += "<PARAM NAME='VIdeoBorder3D' VALUE='0'>";
        Str += "<PARAM NAME='Volume' VALUE='-600'>";
        Str += "<PARAM NAME='WindowlessVIdeo' VALUE='0'>";
        Str += "</object>";
        return Str;
    }
      

  5.   

    <asp:literal id="rm" runat="server" />
    sub page_load(sender as object,e as eventargs)
    literal.text="<object ...>" & request.querystring("fileurl") & "</object")
    end sub