Permalink
Browse files

Add STEMtv to supported webcasts

  • Loading branch information...
1 parent ff8e39a commit 04994e0e1131b3e263a1b240ad65fda9fe135607 @fangeugene fangeugene committed Sep 19, 2015
@@ -19,6 +19,7 @@
LIVESTREAM,
IFRAME,
HTML5,
+ STEMTV,
NONE;
public String render(Context context) {
@@ -35,6 +36,8 @@ public String render(Context context) {
return context.getString(R.string.webcast_type_gameday); // watch on web GameDay
case HTML5:
return context.getString(R.string.webcast_type_html5);
+ case STEMTV:
+ return context.getString(R.string.webcast_type_stemtv);
default:
return "";
}
@@ -55,6 +58,8 @@ public static TYPE getType(String typeString) {
return TYPE.IFRAME;
case "html5":
return TYPE.HTML5;
+ case "stemtv":
+ return TYPE.STEMTV;
default:
return TYPE.NONE;
}
@@ -72,6 +77,8 @@ public static Intent getIntentForWebcast(Context context, String eventKey, TYPE
return getWebIntentForUrl(context.getString(R.string.webcast_livestream_embed_pattern, params.get("channel").getAsString(), params.get("file").getAsString()));
case HTML5:
return new Intent(Intent.ACTION_VIEW).setDataAndType(Uri.parse(params.get("channel").getAsString()), "video/*");
+ case STEMTV:
+ return new Intent(Intent.ACTION_VIEW).setDataAndType(Uri.parse(context.getString(R.string.webcast_stemtv_embed_pattern, params.get("channel").getAsString())), "video/*");
default:
case IFRAME:
return getWebIntentForUrl(context.getString(R.string.webcast_gameday_pattern, eventKey, number));
@@ -16,6 +16,9 @@
<!-- Web GameDay format (with eventKey, number) -->
<string name="webcast_gameday_pattern">http://www.thebluealliance.com/gameday#layout=0&amp;view_0=%1$s-%2$d</string>
+ <!-- STEMtv format (with channel ID, event ID) -->
+ <string name="webcast_stemtv_embed_pattern">http://player.cloud.wowza.com/playlist/%1$s.m3u8</string>
+
<string name="no_webcast_data_found">No webcasts found this week</string>
<string name="webcast_type_youtube">Watch on YouTube</string>
@@ -24,6 +27,7 @@
<string name="webcast_type_twitch">Watch on Twitch</string>
<string name="webcast_type_gameday">Watch on GameDay</string>
<string name="webcast_type_html5">Watch</string>
+ <string name="webcast_type_stemtv">Watch</string>
<string name="webcast_event_format">%1$s #%2$d</string>

0 comments on commit 04994e0

Please sign in to comment.