Hi Adam,

To simplify your code, you could just do this in your application's
constructor:

getMetadataService().addExtension("webm", MediaType.valueOf("video/webm"));

Then, check the response media type with a raw HTTP client to make sure it
is properly set. If it still doesn't work, it might not be Restlet related.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel





2013/4/22 Adam Mc <a...@cs.miami.edu>

> Hi,
>
> I am trying to get HTML5 *.webm videos to play from a restlet server.  I
> am using the latest stable with Jetty standalone with the FILE protocol on
> a directory.  Other types of HTML5 videos play fine, but not webm videos,
> so I suppose it is a meida type problem.
>
> Looking at my old tomcat setup (videos played fine under tomcat), I see
> the following:
>
> <mime-mapping>
>    <extension>webm</extension>
>    <mime-type>video/webm</mime-type>
> </mime-mapping>
>
> So, I tried to translate this to restlet with the following code, but it
> is still not working.  Any ideas?
>
> public synchronized Restlet createInboundRoot() {
>    MetadataService ms = new MetadataService();
>    ms.addCommonExtensions();
>    ms.addExtension("webm", new MediaType("video/webm"));
>    ms.setEnabled(true);
>    this.setMetadataService(ms);
>
>   Router router = new Router(getContext());
>   // route codes here
>    return router;
> }
>
> Thanks,
> -Adam
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3053895
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3053946

Reply via email to