function onPlayOffer(sdpOffer) {
co(function * () {
try {
if (!client) client = yield kurentoClient(args.ws_uri);
pipeline = yield client.create('MediaPipeline');
var webRtc = yield pipeline.create('WebRtcEndpoint');
var player = yield pipeline.create('PlayerEndpoint', { uri: args.file_uri});
yield player.connect(webRtc);
var sdpAnswer = yield webRtc.processOffer(sdpOffer);
webRtcPeer.processSdpAnswer(sdpAnswer);
player.on('EndOfStream', function() {
stop();
});
} catch (e) { onError(e); }
})();
}