Reputation: 56914
I am planning on building a Java web app that will have lots of integrated video (original content) being streamed from our backend. I'm having a difficult time seeing the forest through the trees: I want all non-media, client-side content (HTML, CSS, JS, etc.) to be served from my Tomcat server, but I want the media content (videos) to be served from an actual media server like Red5 or Wowza.
So my problem is: on the backend, how do you make 1 request for http://myapp.example.org/videos/vid2449
return content from 2 servers (Tomcat and the media server)?
Upvotes: 1
Views: 1480
Reputation: 9793
You didn't specify the type of media being served except in one comment you mention m3u8 which indicates HLS. Your tags indicate you're going to stream Flash media. Red5 includes an embedded tomcat server, so everything can be served from one server. Your given url could be handled with JavaScript and a swf player; simply read the video id and pass it to the player.
Upvotes: 0
Reputation: 6289
Req #1 returns stuff for views etc from TC. This response includes ffollowing
Link on where to get media meta data bound to that session/request. A collection of playables
Link on where to get a session Mgr player
JS on client does follow with response
Bootstrap player
Marshall media info is links to streams
Bootstrap wrapper for player state ( Idle Paused PLaying Buffering )
Start player on a stream from list of links which will require a second network connection ( http stream )
Manage player state
Manage socket stream
Manage player ui controls events
Player callbacks
--EDIT--
if your media is self hosted as opposed to coming from the cloud, you can use apache 'ajp' connectors or whatever and have single server running Apache in front of the connectors and infront of TC. Apache will stream the static media files while TC handles other stuff and it all runs from the some domain host.
Upvotes: 1
Reputation: 12347
Web page generated from http://yourserver.com/videos
returns
<html>
<a href="http://yourserver.com:1935/app/stream/video.m3u8">Link to stream</a>
<!-- or you can embed a player and feed it
</html>
Upvotes: 1