Jump to content

Automatic Media URL Replace


L33TCrew
 Share

You are about to reply to a thread that has been inactive for 3673 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts


L33TCrew wrote:

Hi

 

i want to create a script that automatic replace the url on my media prim when i click on a youtube video.

the default url looks like this "
and it
is to be changed
by
script
automatically
on
"

is there anyone who can help me with this?

 

Sorry for my Bad English^^

A script can obtain a media prim's current media URL using either llGetLInkMedia or llGetPrimMediaParams. 

A new current media URL can be set using either llSetLinkMedia or llSetPrimMediaParams.

Link to comment
Share on other sites

- Clicking on the media face of the prim will NOT trigger a touch event

- You can not read what url the viewer is on. you can only readout the url for the media face but thats the one you have set yourself - so that does not give you any new info.

- The visible contents of the media prim face is NOT on the prim face. The built in browser loaded the contents directly from the web site. SL, the sim, the prim are not involved and have no knowledge what the user sees.

- Even if you change the url for the media prim and force an update - that will only work if the user has automatic showing of prim media activated in the viewer. Many - if not most - will have that "feature" switched off.

 

Link to comment
Share on other sites


Nova Convair wrote:

- Clicking on the media face of the prim will NOT trigger a touch event

- You can not read what url the viewer is on. you can only readout the url for the media face but that's the one you have set yourself - so that does not give you any new info.

- The visible contents of the media prim face is NOT on the prim face. The built in browser loaded the contents directly from the web site. SL, the sim, the prim are not involved and have no knowledge what the user sees.

- Even if you change the url for the media prim and force an update - that will only work if the user has automatic showing of prim media activated in the viewer. Many - if not most - will have that "feature" switched off.

 

Well... I'm certain there's much I don't know of about media prims. An example is your point about not being able to touch a media face and have the touch detected.   Not knowing that - yesterday I modified my media prim to llOwnerSay the current media URL when I touched it.  Worked fine for me.  Of course the trick is to right click the media face and then select 'touch'   Left clicking the media face is ignored.  Nothing is simple.

Now to your second point.  My media prim script uses the llGetLInkMedia function to obtain the current media URL.  To test your theory I had my ALT change the URL (so I didn't know what it was.)  Then I touched the prim and my script told me the current URL that my ALT had set.   I admit I had a clue because we were both seeing the YouTube video page he had switched to.

Regarding your third point - it's true that if people often have media settings that make it difficult to serve them changed content.  For those set up to see it there are tools that work.

Of course there are many ways to tell a script to check the current media URL and revise it if it's not in the preferred watch_popup format.  Those who can't touch a media face can, for example, touch another face. 

Link to comment
Share on other sites

Of course you can use one of many ways to trigger an event. Clicking a link will NOT trigger anything and thats what is interesting for the OP.

I took a short look at a MOAP prim. Some things are different than I memorize from last time - I think - but thats not important for the op.
You can NOT share a stream - everybody needs to get their own and have to trigger their own conection to the stream server by clicking it. I didn't see a stream url since youtube doesnt share that info it seems - so that will be a problem. Same for everything that needs a login. Can't be shared too.

The Youtube in my country even refuses to use the viewers browser and MOAP but the american Youtube works here - for now.

I would make some tests with MOAP but I'm still not interested in that so thats all about MOAP from me.

Link to comment
Share on other sites

Wouldn't clicking a link trigger a changed event?

The user could then retrieve the url and change it to be the popup version,

Of course that would trigger another chagned event, so the user would need to code the necessary logic in the changed event to deal with that so as not to end up in an endless "loop"

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3673 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...