Jump to content
You are about to reply to a thread that has been inactive for 1523 days.

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

Recommended Posts

Posted

So I want to host a video watching party at my place and I noticed if I stream the video to a prim, if multiple people come in at different times, we all wont be at the same spot in the video. So I assume the best way for everyone to be at the same spot in the video no matter what time they come in is by using the Parcel media url. Is there a way to script so that it auto switches to different videos from a list after one video is done? Also, will it ask the user each time a video is switched, to click allow media?

Posted (edited)

There's a way to do it, depending on the stream service/source and whether or not you can include a time parameter with the video url.

Suppose you're watching a long youtube clip.  With youtube, you can append &start=[seconds] to the url to indicate how many seconds into the clip to start.  So, when a movie first plays, your script in SL would do a llResetTime().  That resets an internal script timer (not to be confused with the normal timer event).  If a friend comes to the party 30-minutes late, you could program a "re-sync" button on your media player that calls llGetTime() - which would be the time in seconds since the script reset the time when the movie started.  Using that time value, re-request the media url with the added &start=1800 (1800 secs = 30 minutes).  The movie may glitch a bit for everyone else, and maybe replay a second or two, but worth it to have your late-coming friend in-sync with everyone else.

For auto-switching, I think you'd need to either program the run-time for each clip and use the SL script to request a new url when the time is up... or depending on the streaming service, create a playlist on that service and play the playlist as the parcel media url.

Check this link for Youtube's url parameters (note "playlist" and "start"): https://developers.google.com/youtube/player_parameters

Edited by DoteDote Edison
Posted

 

On 9/22/2020 at 10:41 PM, DoteDote Edison said:

With youtube, you can append &start=[seconds] to the url

Good point. Also, you can change the URL for the parcel media for media on a prim. So, if you have a theater, when everyone is in place and it's showtime, you can start everybody's players at the same place. If, of course, they've previously clicked on the screen to start things.

A nice way to do this would be to run a loop of filler material that can be interrupted at any time. The prim shows the filler material until showtime, and then at showtime, the real content starts.

On 9/27/2020 at 4:01 PM, chrixbed said:

Did you guys find a way to start the video automatically without having the need for other people to click on it ?

Does [ PRIM_MEDIA_AUTO_PLAY ] work? I tried. It's still necessary to click the prim once, it seems.

Posted

OK, trying various options with llSetPrimMediaParams.

list params = [PRIM_MEDIA_CURRENT_URL, TESTVIDEO, PRIM_MEDIA_AUTO_PLAY, TRUE,
            PRIM_MEDIA_AUTO_LOOP, TRUE, PRIM_MEDIA_CONTROLS, PRIM_MEDIA_CONTROLS_MINI,
            PRIM_MEDIA_PERMS_CONTROL,PRIM_MEDIA_PERM_NONE];

As far as I can tell, PRIM_MEDIA_AUTO_PLAY does not affect anything. I've tried both TRUE and FALSE. PRIM_MEDIA_AUTO_LOOP set to FALSE won't stop a .mp4 file from repeating. It plays a .MP4 repeatedly after the face is clicked.

 

 

You are about to reply to a thread that has been inactive for 1523 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
×
×
  • Create New...