-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ooyala/stable
update stable with Latest
- Loading branch information
Showing
182 changed files
with
4,094 additions
and
1,401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ allprojects { | |
|
||
ext { | ||
vendorDir = new File(projectDir, '../vendor') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.ooyala.sample"> | ||
|
||
<!--<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="19" />--> | ||
<!--<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="23" />--> | ||
|
||
package="com.ooyala.sample"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
|
||
<application | ||
android:name=".utils.SampleApplication" | ||
android:icon="@drawable/ic_launcher" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.AppCompat" > | ||
<meta-data | ||
android:name="com.google.android.gms.version" | ||
android:value="@integer/google_play_services_version" /> | ||
|
||
<activity android:name=".lists.ChromecastListActivity" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:label="@string/app_name" android:textColor="#ffffff" | ||
android:launchMode="singleTop"> | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:name=".SampleApplication" | ||
android:theme="@style/Theme.CastVideosTheme"> | ||
<activity android:name=".ChromecastListActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".players.ChromecastPlayerActivity" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:label="@string/app_name" android:textColor="#ffffff" | ||
android:parentActivityName=".lists.ChromecastListActivity" | ||
android:launchMode="singleTop"> | ||
<activity android:name=".ChromecastPlayerActivity" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:label="@string/app_name" android:textColor="#ffffff" | ||
android:launchMode="singleTop"/> | ||
<meta-data | ||
android:name="android.support.PARENT_ACTIVITY" | ||
android:value=".lists.ChromecastListActivity"/> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".players.ChromecastBarebonesPlayerActivity" | ||
android:configChanges="keyboardHidden|orientation|screenSize" | ||
android:label="@string/app_name" android:textColor="#ffffff" | ||
android:parentActivityName=".lists.ChromecastListActivity" | ||
android:launchMode="singleTop"> | ||
<meta-data | ||
android:name="android.support.PARENT_ACTIVITY" | ||
android:value=".lists.ChromecastListActivity"/> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
</intent-filter> | ||
</activity> | ||
<receiver android:name="com.google.android.libraries.cast.companionlibrary.remotecontrol.VideoIntentReceiver" > | ||
<intent-filter> | ||
<action android:name="android.media.AUDIO_BECOMING_NOISY" /> | ||
<action android:name="android.intent.action.MEDIA_BUTTON" /> | ||
<action android:name="com.google.android.libraries.cast.companionlibrary.action.toggleplayback" /> | ||
<action android:name="com.google.android.libraries.cast.companionlibrary.action.stop" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<service | ||
android:name="com.google.android.libraries.cast.companionlibrary.notification.VideoCastNotificationService" | ||
android:exported="false" > | ||
<intent-filter> | ||
<action android:name="com.google.android.libraries.cast.companionlibrary.action.notificationvisibility" /> | ||
</intent-filter> | ||
</service> | ||
|
||
<service android:name="com.google.android.libraries.cast.companionlibrary.cast.reconnection.ReconnectionService"/> | ||
android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" | ||
android:value="com.ooyala.sample.CastOptionsProvider" /> | ||
|
||
</application> | ||
</manifest> | ||
|
||
</manifest> |
42 changes: 42 additions & 0 deletions
42
ChromecastSampleApp/app/src/main/java/com/ooyala/sample/CastOptionsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
package com.ooyala.sample; | ||
|
||
import android.content.Context; | ||
|
||
import com.google.android.gms.cast.framework.CastOptions; | ||
import com.google.android.gms.cast.framework.OptionsProvider; | ||
import com.google.android.gms.cast.framework.SessionProvider; | ||
import com.google.android.gms.cast.framework.media.CastMediaOptions; | ||
import com.google.android.gms.cast.framework.media.NotificationOptions; | ||
|
||
import java.util.List; | ||
|
||
|
||
/** | ||
* It is used to provide google cast options by manifest. | ||
*/ | ||
public class CastOptionsProvider implements OptionsProvider { | ||
private final String APP_ID = "4172C76F"; | ||
|
||
@Override | ||
public CastOptions getCastOptions(Context context) { | ||
NotificationOptions notificationOptions = new NotificationOptions.Builder() | ||
.setPlayDrawableResId(R.drawable.ic_media_play_light) | ||
.setPauseDrawableResId(R.drawable.ic_media_pause_light) | ||
.build(); | ||
CastMediaOptions mediaOptions = new CastMediaOptions.Builder() | ||
.setNotificationOptions(notificationOptions) | ||
.setExpandedControllerActivityClassName(ChromecastPlayerActivity.class.getName()) | ||
.build(); | ||
|
||
return new CastOptions.Builder() | ||
.setReceiverApplicationId(APP_ID) | ||
.setCastMediaOptions(mediaOptions) | ||
.build(); | ||
} | ||
|
||
@Override | ||
public List<SessionProvider> getAdditionalSessionProviders(Context context) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.