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.

Sorry, you do NOT have access to this file…

Home › Forums › Community Forum › Sorry, you do NOT have access to this file…

This topic contains 13 replies, has 2 voices. Last updated by  Ulrich Peise 4 years, 4 months ago.

Topic Author Topic
Posted: Wednesday Sep 5th, 2012 at 7:49 pm #24219
Ulrich Peise
Username: tony72

Hi there,

I just worked my way through the whole Amazon S3 thing, CloudFront Delivery and RTMP protocol. Everything worked well up until the last step – I now get this message when viewing my updated page:

JW Player® appears here.
Sorry, you do NOT have access to this file.

I suspect this could be due to a multitude of reasons – however, I figure you guys might have some pointers for me to narrow done the cause of this issue.

Thanks a lot.

Ulrich

List Of Topic Replies

Viewing 13 replies - 1 through 13 (of 13 total)
Author Replies
Author Replies
Posted: Wednesday Sep 5th, 2012 at 7:56 pm #24220

Hello Ulrich,

Have you setup your download restrictions yet?

WordPress => Dashboard => s2Member => Download Options => Basic Download Restrictions

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: Wednesday Sep 5th, 2012 at 8:06 pm #24222

Sorry Ulrich,

I mean the settings which dictate how many files a user can view/download.

They are located =>

WordPress => Dashboard => s2Member => Download Options => Basic Download Restrictions

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: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:38 pm #24229

Could you paste the code your using here or provide a link please

Thanks

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:51 pm #24233

Can you post the code again in tags please

and make that page non-protected

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 9:16 pm #24238

That code looks good.

As a test can you paste the following code into that page please

[s2File download="lesson1.mp4" url_to_storage_source="true" get_streamer_json="true" download_key="true" /]

And is the lesson1.mp4 file in a folder in your bucket?

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 9:32 pm #24241

Thank you.

In that case you need to be more specific in the code like so

$s2_jw_config["mp4_video_file_name"] = "sub-folder-name/sub-folder-name/lesson1.mp4";

Let me know how you get on.

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!

Viewing 13 replies - 1 through 13 (of 13 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.