private RendererBuilder getRendererBuilder() { String userAgent = Util.getUserAgent(this, "ExoPlayerDemo"); switch (contentType) { case TYPE_SS: return new SmoothStreamingRendererBuilder(this, userAgent, contentUri.toString(), new SmoothStreamingTestMediaDrmCallback()); case TYPE_DASH: return new DashRendererBuilder(this, userAgent, contentUri.toString(), new WidevineTestMediaDrmCallback(contentId)); case TYPE_HLS: return new HlsRendererBuilder(this, userAgent, contentUri.toString()); case TYPE_OTHER: return new ExtractorRendererBuilder(this, userAgent, contentUri); default: throw new IllegalStateException("Unsupported type: " + contentType); } }
private RendererBuilder getRendererBuilder() { String userAgent = Util.getUserAgent(this, "ExoPlayerDemo"); switch (contentType) { case TYPE_SS: return new SmoothStreamingRendererBuilder(this, userAgent, contentUri.toString(), new SmoothStreamingTestMediaDrmCallback()); case TYPE_DASH: return new DashRendererBuilder(this, userAgent, contentUri.toString(), new WidevineTestMediaDrmCallback(contentId), audioCapabilities); case TYPE_HLS: return new HlsRendererBuilder(this, userAgent, contentUri.toString(), audioCapabilities); case TYPE_OTHER: return new ExtractorRendererBuilder(this, userAgent, contentUri); default: throw new IllegalStateException("Unsupported type: " + contentType); } }
private RendererBuilder getRendererBuilder() { String userAgent = DemoUtil.getUserAgent(this); switch (contentType) { case DemoUtil.TYPE_SS: return new SmoothStreamingRendererBuilder(userAgent, contentUri.toString(), contentId, new SmoothStreamingTestMediaDrmCallback(), debugTextView); case DemoUtil.TYPE_DASH: return new DashRendererBuilder(userAgent, contentUri.toString(), contentId, new WidevineTestMediaDrmCallback(contentId), debugTextView); case DemoUtil.TYPE_HLS: return new HlsRendererBuilder(userAgent, contentUri.toString(), contentId); case DemoUtil.TYPE_RAW_HTTP_TS: case DemoUtil.TYPE_RAW_HTTP_MP4: try { System.out.println(">>>> PlayerActivity.getRendererBuilder()ACTIVE_VLC_TEST_BUILDER = "+ACTIVE_VLC_TEST_BUILDER); if (ACTIVE_VLC_TEST_BUILDER) { Properties p = new Properties(); p.put(com.exovlc.demo.VLCRendererBuilder.SURFACE_VIEW_RES_ID_PROP, Integer.valueOf(R.id.surface_view) ); return new com.exovlc.demo.VLCRendererBuilder(this, contentUri ,p); } return new RawHttpRendererBuilder(this, userAgent, contentUri.toString(), debugTextView, contentType); } catch (ExoPlaybackException e) { // TODO Auto-generated catch block e.printStackTrace(); } case DemoUtil.TYPE_UDP: return new UdpMulticastRendererBuilder(this, userAgent, contentUri.toString(), debugTextView, contentType); case DemoUtil.TYPE_RTP: return new UdpRtpRendererBuilder(this, userAgent, contentUri.toString(), debugTextView, contentType); case DemoUtil.TYPE_UDP_UNICAST: return new UdpUnicastRendererBuilder(this, userAgent, contentUri.toString(), debugTextView, contentType); default: return new DefaultRendererBuilder(this, contentUri, debugTextView); } }