Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorfusen
    • CommentTimeAug 29th 2008 edited
     
    in /code/settings.php

    after the line

    <input type=checkbox name="display_mp3" id="display_mp3" <?php if( isset($prefs_struct['display_mp3']) && $prefs_struct['display_mp3']==1 ) { echo 'checked="true"';} ?>>Display direct MP3 links on mixtape<br />


    add this;

    <input type=checkbox name="shuffle_mp3" id="shuffle_mp3" <?php if( isset($prefs_struct['shuffle_mp3']) && $prefs_struct['shuffle_mp3']==1 ) { echo 'checked="true"';} ?>>Enable shuffle MP3 playback on mixtape<br />

    after this block of code;

    if($('display_mp3')) {
    $('display_mp3').addEvent('change',function(){
    ajax.send('command=set_option&args='+JSON.encode({display_mp3:$('display_mp3').checked}));
    });
    }

    add this;

    if($('shuffle_mp3')) {
    $('shuffle_mp3').addEvent('change',function(){
    ajax.send('command=set_option&args='+JSON.encode({shuffle_mp3:$('shuffle_mp3').checked}));
    });
    }

    now on /code/mixtape.php

    change the line on 35 from;

    shuffle: "false",

    to

    shuffle: "<?php if (isset($prefs_struct['shuffle_mp3']) && ($prefs_struct['shuffle_mp3'] == 1)) { echo "true"; } else { echo "false"; } ?>",

    now you can select to enable or disable shuffled playback from the admin panel
    • CommentAuthoropentape
    • CommentTimeAug 30th 2008
     
    Shuffle support should be a client option, so when someone views the mixtape they should have the ability to turn it on or off.

    Having it as a admin/publisher option unnecessarily forces shuffling upon the listener... not that cool..
    • CommentAuthorfusen
    • CommentTimeAug 30th 2008
     
    the flash player doesn't let you change the flashvar settings after the page has loaded so it'd be as simple as adding a link on the page somewhere for /opentape/?shuffle=true

    and then checking $_GET['shuffle'];
    • CommentAuthoropentape
    • CommentTimeAug 30th 2008
     
    fusen that's a good solution, it'd just reload the pg with the ?shuffle=true, yea
    • CommentAuthorfusen
    • CommentTimeAug 30th 2008
     
    shuffle: "<?php
    if (isset($_GET['shuffle']) && ($_GET['shuffle'] == "true")) {
    echo "true";
    } elseif (isset($_GET['shuffle']) && ($_GET['shuffle'] == "false")) {
    echo "false";
    } elseif (isset($prefs_struct['shuffle_mp3']) && ($prefs_struct['shuffle_mp3'] == 1)) {
    echo "true";
    } else {
    echo "false";
    } ?>",

    you can now load up he page as /opentape/?shuffle=false and turn on or off the shuffle clientside
    • CommentAuthorTozetre
    • CommentTimeSep 10th 2008
     
    Shorter, though possibly not simpler to read (assuming you want non-shuffle to be the default);

    shuffle: "<?php
    if ((isset($_GET['shuffle']) && ($_GET['shuffle'] == "true")) or (isset($prefs_struct['shuffle_mp3']) && ($prefs_struct['shuffle_mp3'] == 1))) {
    echo "true";
    } else {
    echo "false";
    } ?>",

    If, otoh, you wanted shuffle to be the default you'd use;

    shuffle: "<?php
    } if (isset($_GET['shuffle']) && ($_GET['shuffle'] == "false")) {
    echo "false";
    } else {
    echo "true";
    } ?>",

    I presume shuffle shouldn't be the default, and therefore that you'd prefer the first, but there might be some crazy shuffle-loving opentapers out there.
    (Above code not tested, no warranty expressed or implied, use at your own risk, ymmv, omgwtfpwnies)
  1.  
    I ain't crazy, but having a link or button to switch/reload the page into a shuffle mode, would be great!

    I also don't see why the track listing displayed would have to change, just provide a shuffle button that is visually engaged or not (depressed, or not), and if engaged, the track advance would jump around at random, instead of sequentially. Ideally, you could start the list from the top, let it play down in order for a few songs, decide you want to shuffle now, click the button, and the next advance will jump to a random track.

    Realize also, that we're getting away from the simplicity of design here, and more importantly, the history and ethos of the actual, linear mag' tape "mix tape", in which the creator determines the order of the tracks, and orders them a certain way on purpose. So if this feature is offered, it should also be something only the admin login can offer/engage, or not offer (to display the shuffle button, or not.) Ol' skewl says, "mixtapes don't shuffle." That's the way it was, by technical and artistic design. Mixtapes came well before CD's and digital files and players, and linear tape on a reel couldn't really be shuffled, at all.

    We're trying to intermingle the Muxtape simplicity and mixtape tradition, along with all the features offered in every other digital audio player out there, from Winamp to iTunes. Heck, there was already some kind of little proprietary PHP code package (product) you could drop into your own site, that would provide an MP3 player "widget", which would either play in order, or shuffle, etc. The trial would allow just a few songs in the list, but the paid version was unrestricted. Had a short name, one word, I played with it and it worked flawlessly. This was like 18 months or two years ago. (Ahhh, thank you Google - "Wimpy" http://www.wimpyplayer.com )

    And, here's this: http://musicplayer.sourceforge.net/ but it looks like development stopped some time ago, though I've seen this widget on all kinds of pages, everywhere, to this day.

    See also: http://en.wikipedia.org/wiki/Mix_tape
    • CommentAuthorTozetre
    • CommentTimeSep 15th 2008
     
    I agree with the desire for simplicity, and screw the person who says that more bells, whistles, and chrome help the project. On the other hand, FOSS exists to scratch itches- if someone wants a more featureful OpenTape, they can fork it. I agree OpenTape will probably see more success if it stays simple and easy to install- but I think that adding some features isn't a sin, if they do fit in with that mixtape ethos. Which features do that is up to the project maintainer, though.