2***@public.gmane.org
2013-11-09 10:20:24 UTC
The video player with my rails app is working fine when the video is public
inside of amazon s3. However i need the videos to be private.
I have added to my uploader the next code to protect the video:
class VideoUploader < CarrierWave::Uploader::Base
.
.
.
.
.
def fog_public
false
end
def fog_authenticated_url_expiration
5.minutes # in seconds from now, (default is 10.minutes)
end
end
The url is something like:
1.9.3p448 :011 > lesson.video
=>
https://mybucket.s3.amazonaws.com/videos/lesson_video/video/527cc9781d41c86d88000001/527cc9781d41c86d88000001_0b87bf02542675eb364d.mp4?AWSAccessKeyId=AKIAIDX34WHYKB3ZKFVA&Signature=USvjtADBRAiLf3sZgTf6PAc%2FRCQ%3D&Expires=1383911661
The current player can not play the file with this kind of urls.
I've tried with jwplayer, but does not work. Also. I've tried with
flowplayer, this is the flowplayer code:
<%= lesson.lesson_video.video.url %>
<div id="player" style="display:block;width:640px;height:300px;"></div>
<script>
$f("player",
"http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
clip: {
url: "<%= lesson.video.url %>",
autoPlay: true,
type: "video/mp4"
}
});
</script>
**Someone knows a player that can play private videos from amazon s3?**
**Or else I'm doing something wrong?**
inside of amazon s3. However i need the videos to be private.
I have added to my uploader the next code to protect the video:
class VideoUploader < CarrierWave::Uploader::Base
.
.
.
.
.
def fog_public
false
end
def fog_authenticated_url_expiration
5.minutes # in seconds from now, (default is 10.minutes)
end
end
The url is something like:
1.9.3p448 :011 > lesson.video
=>
https://mybucket.s3.amazonaws.com/videos/lesson_video/video/527cc9781d41c86d88000001/527cc9781d41c86d88000001_0b87bf02542675eb364d.mp4?AWSAccessKeyId=AKIAIDX34WHYKB3ZKFVA&Signature=USvjtADBRAiLf3sZgTf6PAc%2FRCQ%3D&Expires=1383911661
The current player can not play the file with this kind of urls.
I've tried with jwplayer, but does not work. Also. I've tried with
flowplayer, this is the flowplayer code:
<%= lesson.lesson_video.video.url %>
<div id="player" style="display:block;width:640px;height:300px;"></div>
<script>
$f("player",
"http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
clip: {
url: "<%= lesson.video.url %>",
autoPlay: true,
type: "video/mp4"
}
});
</script>
**Someone knows a player that can play private videos from amazon s3?**
**Or else I'm doing something wrong?**
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.