Cowboy serve static files [video file] can not fast forward

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
by
Reply | Threaded
Open this post in threaded view
|

Cowboy serve static files [video file] can not fast forward

by
Hi,

I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.

The problem is that the static website has a mp4 file, and I play the video on web page.
It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).

Do I need add some other configurations for this?

Same static files works fine with nginx.

Thanks,
Yao Bao
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

Loïc Hoguin-3
If I recall that's because the static files handler does not support
range requests yet.

On 07/18/2018 05:21 AM, by wrote:

> Hi,
>
> I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
>
> The problem is that the static website has a mp4 file, and I play the video on web page.
> It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
>
> Do I need add some other configurations for this?
>
> Same static files works fine with nginx.
>
> Thanks,
> Yao Bao
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>

--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

Max Lapshin-2
Rather easy to add trivial implementation of Range  (I do not even want to speak about horror with byte numbering in spec =((( ), but full implementation that will not kill server may be much bigger and harder work.

Cowboy itself is as fast as nginx and can serve video from disk on wire speed, so small fix and all will be ok.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
by
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

by
In reply to this post by Loïc Hoguin-3
Well, I see.
Is there any existing resolution about this? Maybe third party handler?
I believe the requirements for serving video liked content is very common.

> 在 2018年7月18日,14:08,Loïc Hoguin <[hidden email]> 写道:
>
> If I recall that's because the static files handler does not support range requests yet.
>
> On 07/18/2018 05:21 AM, by wrote:
>> Hi,
>> I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
>> The problem is that the static website has a mp4 file, and I play the video on web page.
>> It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
>> Do I need add some other configurations for this?
>> Same static files works fine with nginx.
>> Thanks,
>> Yao Bao
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> --
> Loïc Hoguin
> https://ninenines.eu

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

Pierre Fenoll-2
I believe you can create a bounty / pay Loïc to implement this & share it with the whole world.
I'd gladly follow suit.

Cheers,
-- 
Pierre Fenoll



On Wed, 18 Jul 2018 at 08:36, by <[hidden email]> wrote:
Well, I see.
Is there any existing resolution about this? Maybe third party handler?
I believe the requirements for serving video liked content is very common.

> 在 2018年7月18日,14:08,Loïc Hoguin <[hidden email]> 写道:
>
> If I recall that's because the static files handler does not support range requests yet.
>
> On 07/18/2018 05:21 AM, by wrote:
>> Hi,
>> I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
>> The problem is that the static website has a mp4 file, and I play the video on web page.
>> It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
>> Do I need add some other configurations for this?
>> Same static files works fine with nginx.
>> Thanks,
>> Yao Bao
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> --
> Loïc Hoguin
> https://ninenines.eu

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

Bob Ippolito
And if you’re looking for a starting point, other Erlang web servers implement this feature, so you should be able to copy and paste most of an implementation. I know mochiweb has it for sure, but yaws or inets may also implement range requests.
On Tue, Jul 17, 2018 at 23:50 Pierre Fenoll <[hidden email]> wrote:
I believe you can create a bounty / pay Loïc to implement this & share it with the whole world.
I'd gladly follow suit.

Cheers,
-- 
Pierre Fenoll

On Wed, 18 Jul 2018 at 08:36, by <[hidden email]> wrote:
Well, I see.
Is there any existing resolution about this? Maybe third party handler?
I believe the requirements for serving video liked content is very common.

> 在 2018年7月18日,14:08,Loïc Hoguin <[hidden email]> 写道:
>
> If I recall that's because the static files handler does not support range requests yet.
>
> On 07/18/2018 05:21 AM, by wrote:
>> Hi,
>> I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
>> The problem is that the static website has a mp4 file, and I play the video on web page.
>> It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
>> Do I need add some other configurations for this?
>> Same static files works fine with nginx.
>> Thanks,
>> Yao Bao
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> --
> Loïc Hoguin
> https://ninenines.eu

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

Loïc Hoguin-3
In reply to this post by by
Someone did a partial implementation for cowboy_rest here:
https://github.com/ninenines/cowboy/pull/1059

But you'll have to make your own handler (or a wrapper of cowboy_static).

Adding proper support is currently not prioritized, it's not been
necessary for customers yet and I still have a few more important tasks
to do (better Websocket, better cookies, and CORS support being the next
big three, and of course Ranch 2.0).

On 07/18/2018 08:28 AM, by wrote:

> Well, I see.
> Is there any existing resolution about this? Maybe third party handler?
> I believe the requirements for serving video liked content is very common.
>
>> 在 2018年7月18日,14:08,Loïc Hoguin <[hidden email]> 写道:
>>
>> If I recall that's because the static files handler does not support range requests yet.
>>
>> On 07/18/2018 05:21 AM, by wrote:
>>> Hi,
>>> I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
>>> The problem is that the static website has a mp4 file, and I play the video on web page.
>>> It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
>>> Do I need add some other configurations for this?
>>> Same static files works fine with nginx.
>>> Thanks,
>>> Yao Bao
>>> _______________________________________________
>>> erlang-questions mailing list
>>> [hidden email]
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>> --
>> Loïc Hoguin
>> https://ninenines.eu
>

--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
by
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

by
OK
I will try cowboy_rest.
Thanks

> 在 2018年7月18日,15:59,Loïc Hoguin <[hidden email]> 写道:
>
> Someone did a partial implementation for cowboy_rest here: https://github.com/ninenines/cowboy/pull/1059
>
> But you'll have to make your own handler (or a wrapper of cowboy_static).
>
> Adding proper support is currently not prioritized, it's not been necessary for customers yet and I still have a few more important tasks to do (better Websocket, better cookies, and CORS support being the next big three, and of course Ranch 2.0).
>
> On 07/18/2018 08:28 AM, by wrote:
>> Well, I see.
>> Is there any existing resolution about this? Maybe third party handler?
>> I believe the requirements for serving video liked content is very common.
>>> 在 2018年7月18日,14:08,Loïc Hoguin <[hidden email]> 写道:
>>>
>>> If I recall that's because the static files handler does not support range requests yet.
>>>
>>> On 07/18/2018 05:21 AM, by wrote:
>>>> Hi,
>>>> I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
>>>> The problem is that the static website has a mp4 file, and I play the video on web page.
>>>> It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
>>>> Do I need add some other configurations for this?
>>>> Same static files works fine with nginx.
>>>> Thanks,
>>>> Yao Bao
>>>> _______________________________________________
>>>> erlang-questions mailing list
>>>> [hidden email]
>>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>> --
>>> Loïc Hoguin
>>> https://ninenines.eu
>
> --
> Loïc Hoguin
> https://ninenines.eu

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Cowboy serve static files [video file] can not fast forward

Marc Worrell
We (Zotonic) also implemented range requests in cowmachine.


Cowmachine is the Webmachine variant for the new version of Zotonic.
It uses Cowboy instead of Mochiweb, and simplified the controller callbacks.

- Marc


On 18 Jul 2018, at 10:06, by <[hidden email]> wrote:

OK
I will try cowboy_rest.
Thanks

在 2018年7月18日,15:59,Loïc Hoguin <[hidden email]> 写道:

Someone did a partial implementation for cowboy_rest here: https://github.com/ninenines/cowboy/pull/1059

But you'll have to make your own handler (or a wrapper of cowboy_static).

Adding proper support is currently not prioritized, it's not been necessary for customers yet and I still have a few more important tasks to do (better Websocket, better cookies, and CORS support being the next big three, and of course Ranch 2.0).

On 07/18/2018 08:28 AM, by wrote:
Well, I see.
Is there any existing resolution about this? Maybe third party handler?
I believe the requirements for serving video liked content is very common.
在 2018年7月18日,14:08,Loïc Hoguin <[hidden email]> 写道:

If I recall that's because the static files handler does not support range requests yet.

On 07/18/2018 05:21 AM, by wrote:
Hi,
I am trying to serve a static website via Cowboy, and I followed the guide, it seems works fine.
The problem is that the static website has a mp4 file, and I play the video on web page.
It can play, but when I try to click the progress bar to do fast forward, it keeps play on the normal way(not work).
Do I need add some other configurations for this?
Same static files works fine with nginx.
Thanks,
Yao Bao
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

--
Loïc Hoguin
https://ninenines.eu

--
Loïc Hoguin
https://ninenines.eu

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions