this(context, null);
this.mContext = mContext; this.mRender = (mEventHandler == null); this.mEventHandler = mEventHandler;
if (mRender && mRenderingWidget == null) { mRenderingWidget = new WebVttRenderingWidget(mContext); } if (mRender) { return new SRTTrack(mRenderingWidget, format); } else { return new SRTTrack(mEventHandler, format); }
if (format.containsKey(MediaFormat.KEY_MIME)) { if (!format.getString(MediaFormat.KEY_MIME) .equals(MediaPlayer.MEDIA_MIMETYPE_TEXT_SUBRIP)) { return false; }; return mRender == (format.getInteger(MediaFormat.KEY_IS_TIMED_TEXT, 0) == 0); } return false;