You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CastCompanionLibrary-android is a library project to enable developers integrate Cast capabilities into their applications faster and easier.
4
4
5
5
## Dependencies
6
-
* google-play-services_lib library from the Android SDK (at least version 6.1)
6
+
* google-play-services_lib library from the Android SDK (at least version 7.0+)
7
7
* android-support-v7-appcompat (version 21 or above)
8
8
* android-support-v7-mediarouter (version 20 or above)
9
9
@@ -29,109 +29,58 @@ See LICENSE
29
29
Google Cast Developers Community on Google+ [http://goo.gl/TPLDxj](http://goo.gl/TPLDxj)
30
30
31
31
## Change List
32
-
1.14
32
+
2.0
33
+
#### Notice: this release introduces a restructured and updated code base that has backward-incompatible changes. Most of these changes can be handled by a simple search-and-replace action but there are some changes to the API names and signatures that may need more manual handling. Below you can find a list of changes.
34
+
35
+
* Change in the package name: CCL now has a new package name "com.google.android.libraries.cast.companionlibrary.cast"
36
+
* All string, dimension and color resources now have "ccl_" as prefix. This allows developers to
37
+
work with these resources without any collision with their own apps or other libraries. In addition, some
38
+
unused resources have been removed from the "res/*" directories.
39
+
* CCL no longer needs a reference to your "Activity" context. Instead, only an Application Context
40
+
is adequate when you initialize it. Any API that may need an Activity Context (for example opening the
41
+
VideoCastControllerActivity) will ask for such context as an argument. As a result, it is recommended
42
+
to initialize the library in your Application's onCreate() and access the VideoCastManager singleton
43
+
instance by VideoCastManager.getInstance(). Same applies to DataCastManager.
* BaseCastManager.clearContext() has been removed (see earlier comments)
76
+
* All the "consumer" callbacks used to be wrapped inside a try-catch block inside the library. We have
77
+
now removed this and expect the "consumers" to handle that in the client code; the previous approach was masking
78
+
client issues in the library while they needed to be addressed inside the client itself.
79
+
* BaseCastManager#addMediaRouterButton(MediaRouteButton button) now has no return value (it was redundant)
80
+
* VideoCastConsumer#onApplicationConnectionFailed() no longer returns any value.
81
+
* BaseCastConsumer#onConnectionFailed(() no longer returns any value.
82
+
*[New] There is a new callback "void onMediaLoadResult(int statusCode)" in VideoCastConsumer to
83
+
inform the consumers when a load operation is finished.
84
+
* Updated the build to use the latest gradle binaries.
85
+
* Updated to use the latest versions of Play Services and support libraries.
33
86
34
-
* Wrapped some IllegalStateExceptions for proper handling. This should address issue #144 as well.
35
-
* Fixing an issue that sometimes when a media finishes, start of the next media would result in
36
-
immediate closure of the VideoCastControllerActivity
37
-
* Fixed a corner case where sometimes when the receiver is stopped due to reaching a time out, the
38
-
sender was disconnecting but the cast icon was not reflecting that correctly.
39
-
40
-
1.13
41
-
42
-
* Addressed a NPE in reconnection task (issue #143)
43
-
* Made sure we don't set the duration of a MediaInfo object to a negative number
44
-
* Some internal cleanup
45
-
46
-
1.12
47
-
#### Notice: there are some backward-incompatible changes in this release, please read the change list carefully
48
-
* Changing CCL to use Application Context in most everything. As a result, one does not need to set context for CCL in each
49
-
Activity which should avoid any context leaks and prevent some random NPEs. Consequently, there will be no "dialog" supported by
50
-
CCL unless the caller method provides an explicit context. For various versions of reconnectSessionIfPossible, we now have
51
-
reconnection callbacks that can be used by callers to provide visual feedback, so these methods now have new signatures.
52
-
In addition, now you can initialize Cast Managers in your Application's onCreate().
53
-
There are some backward-incompatible changes so clients need to make adjustments if needed.
54
-
In particular, the noteworthy breaking changes are:
55
-
* Variations of reconnectSessionIfPossible have new arguments
56
-
* Utils.showErrorDialog() has been removed
57
-
* setContext() on Cast Managers is removed
58
-
* CastManagers' getInstance(Context) are removed
59
-
* Updating BaseCastManager, VideoCastManager and DataCastManager to use CopyOnWriteArraySet to manage consumers. Since the number of
60
-
consumers is low, there will be no performance hit and CopyOnWriteArraySet provides a safer data structure.
61
-
* Decoupled dependency between components interested in receiving notifications when the list of active tracks
62
-
changes and the sources that can cause such changes. This also allowed improving the TracksChooserDialog
63
-
to gracefully rebuild itself when needed.
64
-
* Improving VideoCastControllerFragment's behavior when it needs to be closed.
65
-
* Fixing an issue that upon reconstruction of VideoCastControllerActivity/Fragment, it would restart the media.
66
-
* In VideoCastControllerFragment, moved most of the initial work to onActivityCreated() so that a rebuild of the associated activity and fragment doesn't run into a NPE
67
-
* Adding a new API to allow clients set the MediaAuthService directly (VideoCastManager.setMediaAuthService(IMediaAuthService authService))
68
-
* Making sure that the reconnection AsyncTask is using a thread pool regardless of the Android version,
69
-
* Removed "Video Tracks" from Tracks Chooser Dialog since that doesn't make sense to be presented there.
70
-
* Updating the style of Cast dialog for Lollipop to match the respective framework.
71
-
* Adding Toolbar component to the simple cast_activity.xml layout in landscape, this was missed in a previous update where toolbar was introduced.
72
-
* Changing the icon representing "Disconnect" in Lollipop notification
73
-
* Fixing a bug where notification service wouldn't restart if playback was restarted on a different device.
74
-
* Fixing an issue that when a new media was started while another one was casting, the metadata wouldn't update immediately
75
-
in VideoCastControllerActivity to reflect the new media.
76
-
* Updating to the latest version of Gradle suitable for the latest publicly released version of Android Studio,
77
-
* Updating the gradle build to use the latest version of Google Play Services and selectively use cast APIs from Google Play Services.
78
-
* Improving discovery for MediaRouteButton by resetting the count of discovered routes whenever cast discovery is stopped.
0 commit comments