0

Trying to loop only 1 random video in playlist of 4 videos

Hi all,

I'm trying to figure out how to loop the randomly selected video in a playlist of 4 for a fixed schedule.

ie: create playlist, set to "Shuffle", when unit is playing selected video, loop said video until sundown, play next scheduled playlist.

6 comments

  • 0
    Avatar
    Bright Scripters

    Still need assitance?

  • 0
    Avatar
    Fook Siong

    Hi, yup, hope to get some pointers.
    so far did the following :
    (1) googled and tried the random script brs found from the internet, wasn't successful.
    (2) used AI and got to know that Brightsign had built-in random integer generator, (RANDOM 1,4), wasn't successful also.
    (3) Brightsign support responded with a generic HTML way to generate random number, sorry, skill level not there. 8(

    Overall, got better understanding of the workflow.

    create medialist, populate with video, create user variable, populate variable with random number, find a way to trigger playback using conditional actions.

  • 0
    Avatar
    Bright Scripters

    Good job! :)

    I don't fully understand the experience you are trying to create.

    Could you provide more details?

    Also, randomizing the selection of a video might result in selection of a video which just played?

     

  • 0
    Avatar
    Fook Siong

    Roger that, randomizing and playing back same video is expected.

    (1) 1 videowall, 1 XT1145, 1 HDMI used.
    (2) 1 day schedule, 9 to 6, 1 night schedule 6 to 10:30.
    (3) 4 day videos, 4 night videos
    (4) To randomly choose 1 video each time and loop for entire day/night schedule.

    Was looking at "On Demand" also, doing trial and error tests.

    Thanks for the support! Much appreciated!

  • 0
    Avatar
    Bright Scripters

    The number of combinations 4 videos can be arranged is 4! = 4*3*2*1 = 24.

    That is a relatively small number so you can create 24 entries in the On Demand state, with keys like:

    day_1, day_2, ... , day_24

    The order will not be "random" but it would be random enough :)

    Create the following User Variables:

    • Shift - as the values day/night
    • Counter - Incrementing from 1 to 24 and wraps around back to 1
    • Key - A String made of both of the above. {{Shift}}_{{Counter}}

    You then use the value of variable Key to select the video in the On Demand state.

    (The 4 day videos would appear multiple times with different keys)

     

  • 0
    Avatar
    Fook Siong

    Thanks Bright Scripters for this update, will try to get my hands on a test unit to tryout. Have limited resources here. Sorry for the delay in my responses.

Please sign in to leave a comment.