Jump to content
Xtreme .Net Talk

Can the url or src of an embedded mediaplayer object be added dynamically at runtime?


Recommended Posts

Posted

I have a Sharepoint aspx page that I want to play a media file which is determined by the link that is clicked to navigate to the page.

So, if the user clicks the first link, it navigates to video_sandbox.aspx?pathtovideo.wmv

On the sharepoint page (video_sandbox.aspx) I use request.querystring to retrieve the path of the file and I want to then insert it as the src or url of the mediaplayer object. This doesn't seem to be working. I've tried writing it both via javascript and vbscript. I don't have access to the masterpage that the video page is based on so I can't put it in a script of that master. Any suggestions? I have posted the versions of my code below:

 

Javascript:

<Code>

// This works

var path = "/Videos/" + Request.QueryString("vid");

// this does Not work

document.all.vid.url = path;

 

</Code>

 

VBScript:

<Code>

Dim path

' This works

path = "/Videos/" & Request.QueryString("vid")

' this does Not work

document.all.vid.url = path

 

</Code>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...