-
Notifications
You must be signed in to change notification settings - Fork 52
Web Application Configuration
Paul Gregoire edited this page Jun 12, 2015
·
1 revision
The web.xml for your application must have the following servlets defined, which will provide the requested playlist and segments.
<servlet>
<description>Serves an HTTP streaming playlist</description>
<display-name>PlayList</display-name>
<servlet-name>PlayList</servlet-name>
<servlet-class>org.red5.stream.http.servlet.PlayList</servlet-class>
<init-param>
<param-name>minimumSegmentCount</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>startStreamOnRequest</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet>
<description>Serves a segment</description>
<display-name>TransportSegment</display-name>
<servlet-name>TransportSegment</servlet-name>
<servlet-class>org.red5.stream.http.servlet.TransportSegment</servlet-class>
</servlet>
Additionally, if the playlist and segments mime types are not defined in the primary web.xml for the server they will need to be defined in your application web.xml as follows:
<mime-mapping>
<extension>m3u8</extension>
<mime-type>application/x-mpegURL</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ts</extension>
<mime-type>video/MP2T</mime-type>
</mime-mapping>
Example web.xml: https://github.com/Red5/red5-hls-plugin/blob/master/example/src/main/webapp/WEB-INF/web.xml