Jump to content
  • Advertisement
Sign in to follow this  
grizzlebee

[web] programmatically controlling real player

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want to have linkbuttons on my page so that when the user clicks them they forward the current real player embedded video to that time. I have the player in my html and its working with this clip:
<OBJECT id="rPlayer" type="audio/x-pn-realaudio-plugin" height="240" width="320" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
							VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="8467">
<PARAM NAME="_ExtentY" VALUE="6350">
<PARAM NAME="AUTOSTART" VALUE="-1">
<PARAM NAME="SHUFFLE" VALUE="0">
<PARAM NAME="PREFETCH" VALUE="0">
<PARAM NAME="NOLABELS" VALUE="0">
<PARAM NAME="SRC" VALUE="http://example.ram">
<PARAM NAME="CONTROLS" VALUE="ImageWindow">
<PARAM NAME="CONSOLE" VALUE="Clip1">
<PARAM NAME="LOOP" VALUE="0">
<PARAM NAME="NUMLOOP" VALUE="0">
<PARAM NAME="CENTER" VALUE="0">
<PARAM NAME="MAINTAINASPECT" VALUE="0">
<PARAM NAME="BACKGROUNDCOLOR" VALUE="#000000">

</OBJECT>



In the .vb code I capture the linkbutton click
Public Sub gPlay(ByVal Sender As Object, ByVal e As DataGridCommandEventArgs)
        Dim gTime As DateTime
        ' forward the player to the proper timestamp and play
        Session("RowIndex") = e.Item.ItemIndex
        gTime = Session("dsItems").Tables(0).Rows.Item(Session("RowIndex")).Item(1)

End Sub



The problem is that im not sure how to move the player to the time in the click. Can anyone help? Even a link to a tutorial on programmatically manipulating media players in asp .NET would be great. Ive been looking everywhere. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Realplayer is a client-side plugin.

ASPNET is a server-side environment.

You can't get ASPNET to control Realplayer, because it's not in the right place. Try using javascript instead.

Mark

Share this post


Link to post
Share on other sites
Quote:
Original post by markr
Realplayer is a client-side plugin.

ASPNET is a server-side environment.

You can't get ASPNET to control Realplayer, because it's not in the right place. Try using javascript instead.

Mark



Ooooo sometimes when you look so hard at the wrong thing you miss the obvious! Thank you so much!! I rated you good :)

I am still new to the ASP .NET environment. Do you think that I can do a javascript in the ASP event when they click to forward the player? I have tried this and it doesnt seem to work. I may have to do everything in the javascript code.

I was thinking something like this:


Public Sub gPlay(ByVal Sender As Object, ByVal e As DataGridCommandEventArgs)
Dim gTime As DateTime
' forward the player to the proper timestamp and play
Session("RowIndex") = e.Item.ItemIndex
gTime = Session("dsItems").Tables(0).Rows.Item(Session("RowIndex")).Item(1)
' Ill convert gTime to milliseconds here then

Response.Write("<SCRIPT LANGUAGE=""javascript"">
window.opener.document.rPlayer.SetPosition(gTime)
</SCRIPT> ")

End Sub





But I need to programmatically fast foward the player. I dont want to reload it:/ Thanks for all the help so far you definitely put me on the right track.

[Edited by - grizzlebee on November 22, 2005 2:14:24 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Out of curiosity, what's with using RealPlayer in the first place? There are other options that don't suck quite as badly.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!