latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Ulrich Peise


My Latest Replies (From Various Topics)

Viewing 9 replies - 26 through 34 (of 34 total)
Author Replies
Author Replies
Posted: Wednesday Sep 5th, 2012 at 9:43 pm #24244
Ulrich Peise
Username: tony72

Philly, thanks so much for all your help – it works like a charm now.

Again, I really appreciate your guidance here! Thanks!

Posted: Wednesday Sep 5th, 2012 at 9:28 pm #24240
Ulrich Peise
Username: tony72

Philly,

Yes it is in a sub-sub folder of the bucket.

As for the code snippet: where would I add it exactly? At the end, beginning, or some specific place within the existing code?

Thanks.

Posted: Wednesday Sep 5th, 2012 at 8:55 pm #24235
Ulrich Peise
Username: tony72

Oh, I forgot the /code tag! Also, I removed the access restriction (sorry about that):

<?php
// Configuration.
$s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory.
$s2_jw_config["mp4_video_file_name"] = "lesson1.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.
?>

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script>

<?php /* A direct URL to the RTMP source; counting the file against the current User in real-time. */
$cfg = array ("file_download" => $s2_jw_config["mp4_video_file_name"], "url_to_storage_source" => true, "count_against_user" => true); ?>

<?php /* API Function `s2member_file_download_url()` returns false if access is denied to the current User. */
if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>

    <script type="text/javascript">
        jwplayer("jw-container").setup({modes: /* JW Player®. */
        [
            /* First try real-time streaming with Flash® player. */
            {type: "flash", provider: "rtmp", src: "<?php echo $s2_jw_config["jwplayer"]; ?>player.swf",
                config: {streamer: "<?php echo $mp4["streamer"]; ?>", file: "<?php echo $mp4["file"]; ?>"}},
        
            /* Else, try an HTML5 video tag. */
            {type: "html5", provider: "video",
                config: {file: "<?php echo $mp4["url"]; ?>"}},
        
            /* Else, this is a safe fallback. */
            {type: "download", /* Download the file. */
                config: {file: "<?php echo $mp4["url"]; ?>"}}
        ],
        /* Set video dimensions. */ width: 480, height: 270
        });
    </script>

<?php } else /* Access is denied to the current User. */ { ?>
    Sorry, you do NOT have access to this file.
<?php } ?>
  • This reply was modified 4 years, 4 months ago by  Ulrich Peise.
  • This reply was modified 4 years, 4 months ago by  Ulrich Peise.
Posted: Wednesday Sep 5th, 2012 at 8:42 pm #24230
Ulrich Peise
Username: tony72

Here is the code:

JW Player® appears here.
<script type="text/javascript" src="jwplayer.js”>

$s2_jw_config[“mp4_video_file_name”], “url_to_storage_source” => true, “count_against_user” => true); ?>

jwplayer(“jw-container”).setup({modes: /* JW Player®. */
[
/* First try real-time streaming with Flash® player. */
{type: “flash”, provider: “rtmp”, src: “player.swf”,
config: {streamer: “”, file: “”}},

/* Else, try an HTML5 video tag. */
{type: “html5”, provider: “video”,
config: {file: “”}},

/* Else, this is a safe fallback. */
{type: “download”, /* Download the file. */
config: {file: “”}}
],
/* Set video dimensions. */ width: 480, height: 270
});

Sorry, you do NOT have access to this file.

Link to the video:

http://guitaringenuity.com/guitar-courses/beginners-guitar-course/resource-section/lesson-1

Thanks a lot for all your help!

Posted: Wednesday Sep 5th, 2012 at 8:29 pm #24226
Ulrich Peise
Username: tony72

Okay, I updated the settings and I can now actually see the window/player. However, the video doesn’t start.

Anything you can think of?

Thanks.

Posted: Wednesday Sep 5th, 2012 at 8:12 pm #24223
Ulrich Peise
Username: tony72

Philly,

No, I should have read your first reply more carefully – you clearly said Basic Download Restrictions. And no, I did not even look at this section yet. I’m still a little overwhelmed, sorry.

I will familiarize with this section now and see if I can figure it out…

I’ll let you know – thanks!

Ulrich

Posted: Wednesday Sep 5th, 2012 at 8:00 pm #24221
Ulrich Peise
Username: tony72

Philly, thanks for the quick reply.

Yes, I did. Access keys, secret key cloud front key pair, etc… and I think it worked because when I look over at amazon s3, I see the two delivery methods being active and enabled.

Posted: Tuesday Sep 4th, 2012 at 10:16 am #24031
Ulrich Peise
Username: tony72

Hi Raam,

Thank you for the fast and clear answer – I appreciate it.

Dieter

Posted: Monday Sep 3rd, 2012 at 4:47 pm #23963
Ulrich Peise
Username: tony72

Okay, I actually figured it out. I’m good now – thanks.

Viewing 9 replies - 26 through 34 (of 34 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.