Package com.kurento.kmf.media

Examples of com.kurento.kmf.media.MediaElement


public class PlayerLiveWebRtc extends HttpPlayerHandler {

  @Override
  public void onContentRequest(HttpPlayerSession session) throws Exception {
    String contentId = session.getContentId();
    MediaElement mediaElement = null;
    if (contentId.equals("faceoverlay")) {
      mediaElement = WebRtcFaceOverlayLoopback.filter;
    } else if (contentId.equals("jackvader")) {
      mediaElement = WebRtcJackVaderLoopback.filter;
    } else if (contentId.equals("loopback")) {
      mediaElement = WebRtcLoopback.webRtcEndpoint;
    }
    if (mediaElement == null) {
      session.terminate(400, "WebRTC source is not running");
    } else {
      MediaPipeline mp = mediaElement.getMediaPipeline();
      HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint()
          .terminateOnEOS().build();
      mediaElement.connect(httpEndpoint);
      session.start(httpEndpoint);
    }
  }
View Full Code Here

TOP

Related Classes of com.kurento.kmf.media.MediaElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.