Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion html5 video not working with node.js

Received: by 10.66.84.98 with SMTP id x2mr1588832pay.15.1352800870330;
        Tue, 13 Nov 2012 02:01:10 -0800 (PST)
X-BeenThere: nodejs@googlegroups.com
Received: by 10.68.75.70 with SMTP id a6ls28864983pbw.5.gmail; Tue, 13 Nov
 2012 02:00:54 -0800 (PST)
Received: by 10.68.143.74 with SMTP id sc10mr4867129pbb.5.1352800854706;
        Tue, 13 Nov 2012 02:00:54 -0800 (PST)
Date: Tue, 13 Nov 2012 02:00:53 -0800 (PST)
From: Yash Girdhar <yash.gird...@gmail.com>
To: nodejs@googlegroups.com
Message-Id: <62d8e428-2b56-4cef-a3fb-43ba344cd0e5@googlegroups.com>
In-Reply-To: <3013261A-B76B-49F8-81B7-760C8C870055@ryandesign.com>
References: <355ec35a-4494-4e0d-93b1-8528772384db@googlegroups.com> <CACrj35H5yCF9HT0QfQ49ctXrKKU9r+uEpzpsQvhSYDVqJjmBmg@mail.gmail.com> <8e80bfd7-21d3-46c7-a2db-377ee89842ed@googlegroups.com> <CAN5MXoe93_uqrNxkVd4DCJ3BtQ6s=nZev1x7L1K3ftYwbLe1BA@mail.gmail.com>
 <3013261A-B76B-49F8-81B7-760C8C870055@ryandesign.com>
Subject: Re: [nodejs] html5 video not working with node.js
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1485_3493335.1352800853598"

------=_Part_1485_3493335.1352800853598
Content-Type: multipart/alternative; 
	boundary="----=_Part_1486_25788470.1352800853598"

------=_Part_1486_25788470.1352800853598
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit


So, how can I serve the video in the same way as I am serving the file, 
i.e. defining a route for that.
right now, I am just giving the path of the video in the src attribute of 
video tag
On Tuesday, 13 November 2012 05:27:00 UTC+5:30, ryandesign wrote:
>
>
> On Nov 12, 2012, at 16:32, Nathan Rajlich <nat...@tootallnate.net<javascript:>> 
> wrote: 
>
> > Are you implementing the static file serving yourself? 
>
> The only route defined in app.js is: 
>
> app.get('/', function (req, res) { 
>   res.sendfile(__dirname + '/index.html'); 
> }); 
>
> Therefore "/" is the only route that will be served. If you also want to 
> serve "/test.mp4", then you will need to define a route for that, or hook 
> up some static middleware as Nate said. 
>
>
>
------=_Part_1486_25788470.1352800853598
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<br>So, how can I serve the video in the same way as I am serving the file, i.e. defining a route for that.<br>right now, I am just giving the path of the video in the src attribute of video tag<br>On Tuesday, 13 November 2012 05:27:00 UTC+5:30, ryandesign  wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>On Nov 12, 2012, at 16:32, Nathan Rajlich &lt;<a href="javascript:" target="_blank" gdf-obfuscated-mailto="oVkBa0J8KYwJ">nat...@tootallnate.net</a>&gt; wrote:
<br>
<br>&gt; Are you implementing the static file serving yourself?
<br>
<br>The only route defined in app.js is:
<br>
<br>app.get('/', function (req, res) {
<br>&nbsp; res.sendfile(__dirname + '/index.html');
<br>});
<br>
<br>Therefore "/" is the only route that will be served. If you also want to serve "/test.mp4", then you will need to define a route for that, or hook up some static middleware as Nate said.
<br>
<br>
<br></blockquote>
------=_Part_1486_25788470.1352800853598--

------=_Part_1485_3493335.1352800853598--