s3auth icon indicating copy to clipboard operation
s3auth copied to clipboard

all works as advertized, except for html5 video

Open albertjmenkveld opened this issue 9 years ago • 9 comments

Dear Yegor:

I am really impressed by what you've built. I managed to set my S3 website up so that it can only be accessed via s3auth.com with a username and password. Thanks for this great work.

The one issue that I was not able to solve is that my videos which are in a subfolder of the website, and embedded w/ html5 video tags do not seem to "stream." The only browser that does seem to support it is Safari. I have tried for some hours now to see if it was something I was able to control, but I was not successful. It all works when I open up the webpage to the world, but when I close it again and only allow access through s3auth.com, the video simply will not play when clicked. I am puzzled as to why this is happening. If you can give me a lead on how to possibly resolve this, I would much appreciate it.

Thanks for all this excellent work!

Best, Albert

albertjmenkveld avatar Dec 24 '15 13:12 albertjmenkveld

@albertjmenkveld thanks for using our service! can you please host some video file in your repository and give me access? I want to test the problem, to understand what's going on. You can send me login/password by email: [email protected]

yegor256 avatar Dec 25 '15 11:12 yegor256

Hi Yegor,

Was there ever any progress on this? I am having a similar issue. Can email you details if you like.

Cheers,

Nathan

nathanpower avatar Mar 09 '16 10:03 nathanpower

Nathan, I moved my site to some hosting company, and use .htaccess to have a password.  FYI. Albert

Sent from iPhone

On Wed, Mar 9, 2016 at 2:40 AM -0800, "Nathan Power" [email protected] wrote:

Hi Yegor,

Was there ever any progress on this? I am having a similar issue. Can email you details if you like.

Cheers,

Nathan

— Reply to this email directly or view it on GitHub.

albertjmenkveld avatar Mar 09 '16 10:03 albertjmenkveld

For me it is working in latest FF, Edge, Safari, just not Chrome.

I get: CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED when I try to play html5 video.

Accessing directly with s3 bucket published as a site works fine in Chrome.

nathanpower avatar Mar 09 '16 12:03 nathanpower

Yes, I had the same issue.  A

Sent from iPhone

On Wed, Mar 9, 2016 at 4:08 AM -0800, "Nathan Power" [email protected] wrote:

For me it is working in latest FF, Edge, Safari, just not Chrome.

I get: CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED when I try to play html5 video.

Accessing directly with s3 bucket published as a site works fine in Chrome.

— Reply to this email directly or view it on GitHub.

albertjmenkveld avatar Mar 09 '16 12:03 albertjmenkveld

Also having this same issue. Both with mp3 and mp4. Our issue runs a little deeper. We landed on s3auth because we're trying to create a private podcast feed for the many media files we're hosting on S3. The only way to secure a podcast feed is with HTTP Auth. Our test feed isn't working in most apps to stream. Some will allow us to download the episode. Also get the same behavior as @nathanpower in the mentioned browsers when trying to access the protected files directly outside of the feed.

One thing I noticed is that when Chrome opens mp3s on S3, they come in as 2 separate requests. Maybe it's relevant? screen shot 2018-03-23 at 13 13 29

We have 2 CNAMEs set up pointing at the same bucket. One through S3Auth and one that accesses the bucket directly (some folders are protected, some aren't). I have tried accessing the same (unprotected) file using the two CNAMEs. Attached are the different response headers in Chrome Dev Tools for the two URLs, for the two requests:

Through S3Auth:

Accept-Ranges: bytes
Age: 0
Cache-Control: must-revalidate
Content-Length: 26696812
Content-Type: audio/mpeg
Date: Fri, 23 Mar 2018 10:17:56 +0000
ETag: 8e7eb5ae359388af558453aac23616d0
Last-Modified: Fri, 23 Mar 2018 09:59:18 GMT
Server: relay.s3auth.com, 1.0-SNAPSHOT/717c55c built on ${maven.build.timestamp}
X-S3auth-Time: 0

Accept-Ranges: bytes
Age: 0
Cache-Control: must-revalidate
Content-Length: 26696812
Content-Range: bytes 0-9223372036854775807/26696812
Content-Type: audio/mpeg
Date: Fri, 23 Mar 2018 10:17:57 +0000
ETag: 8e7eb5ae359388af558453aac23616d0
Last-Modified: Fri, 23 Mar 2018 09:59:18 GMT
Server: relay.s3auth.com, 1.0-SNAPSHOT/717c55c built on ${maven.build.timestamp}
X-S3auth-Time: 1

Directly to S3:

Content-Length: 26696812
Content-Type: audio/mpeg
Date: Fri, 23 Mar 2018 10:02:50 GMT
ETag: "8e7eb5ae359388af558453aac23616d0"
Last-Modified: Fri, 23 Mar 2018 09:59:18 GMT
Server: AmazonS3
x-amz-id-2: 938bq8nO17KVOsuz/TEJ7QW/oakArvHWVrhI33jF1q6bUKh29upU0aDt6bQd6rSppWEul8CbR1s=
x-amz-meta-gid: 0
x-amz-meta-mode: 33188
x-amz-meta-mtime: 1294965309
x-amz-meta-uid: 0
x-amz-request-id: 9CDD5F5455E9039B

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,he;q=0.8
Cache-Control: max-age=0
Connection: keep-alive
Cookie: __cfduid=d235694ceacf637c7d4dcd443c05988921517419134; _ga=GA1.2.2070922792.1517508229
Host: media.thelivingtree.org
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36

I hope some of this is helpful. Would be amazing if S3Auth could help us get us the set up we'd like to have.

iraweissman avatar Mar 23 '18 10:03 iraweissman

Another few clues: Both in Podcast Apps and in Chrome, you can download the media file. ie, in Chrome, if you go to Save Page As, it'll successfully download the mp3 as a file. Same thing in BeyondPod. It won't stream the files, but it'll download them.

iraweissman avatar Mar 23 '18 10:03 iraweissman

Follow up to my earlier comments: our podcast issues were unrelated to the Chrome streaming issues. Some podcast apps just don't stream password protected files (but do allow downloading). Some do. We tested this with known commercial password protected premium podcasts and they exhibited the same behavior as our test podcast protected by s3auth.

iraweissman avatar Mar 25 '18 10:03 iraweissman

@albertjmenkveld @nathanpower I'm sorry this bug is still not fixed. We didn't have enough funds/time to work on the project. However, recently we received some donations from our grateful users and will continue to fix issues and introduce new features. Would be great if you can also donate -- to help us move forward faster. Here is the link: https://www.0crat.com/contrib/C3RP1J1CH

yegor256 avatar Mar 27 '18 10:03 yegor256