If i want to use ccl and android sample videocast app as a basis to open the default YouTube receiver app, what value to use for APPLICATION_ID in CastApplication.java
My use case is that i have an intended collection of MediaInfo in my main listView of videos that includes some videos hosted on amazon and some videos from Youtube. It looks like I will need separate VideoCastManager sessions depending on the receiver app that i want to control with Play type commands. I can play the amazon videos just by using the default "CastVideos" app in android and building my MediaInfo list of amazon hosted videoUrls. But, when i try to switch over to Youtube, im getting errors initializing the VideoCastManager.
I've read this answer but it seems to be in the MediaRouter api and i do not get how the "session.start()" relates to ccl and to the use of VideoCastManager instance?
I believe "Allcast" has similar functionality but displays the respective sources ( netflix, roku, amazon... ) well before any connection is made. I want to interleave the MediaInfo collection if possible , not maintain separate MediaInfo collections segregated by the domain(s) in the actual media datasources.
--EDIT-- looked at the remote debugger on port 9222 and i see there a load metadata error...
cast.receiver.MediaManager] Load metadata error
so, i will review the gdata/youtube entry being used to load the metadata into the MediaInfo instance to make sure that it is coherent. I totally don't understand the receiver throwing ERROR level stuff when trying to load metadata. The Network calls that the receiver makes to the actual URL at "youtube.com/tv..." are showing RC of 200.
--endof edit--
Logcat error when i try to Init and load a youtube url using "Youtube" as the appID value.
D/LocalPlayerActivity(23107): Setting url of the VideoView to:
https://www.youtube.com/tv?v=Id6wz_TPiNI D/LocalPlayerActivity(23107):
onStart was called D/LocalPlayerActivity(23107): onResume() was called
D/ccl_BaseCastManager(23107): Successfully added the new
BaseCastConsumer listener
com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity$1@4263e890
D/ccl_VideoCastManager(23107): Successfully added the new CastConsumer
listener
com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity$1@4263e890
D/ccl_BaseCastManager(23107): UI is visible I/ActivityManager( 756):
Displayed
com.google.sample.cast.refplayer/.mediaplayer.LocalPlayerActivity:
+156ms D/ccl_BaseCastManager(23107): UI is visible D/YouTube (23138): apps.youtube.common.e.j.e:170 Scheduling task
com.google.android.apps.youtube.datalib.offline.p with
ScheduledExecutorService for repeating execution. D/YouTube (23138):
apps.youtube.common.e.j.e:170 Scheduling task
com.google.android.apps.youtube.datalib.offline.r with
ScheduledExecutorService for repeating execution.
V/LoaderManager(23107): Stopping in LoaderManager{425e9428 in
VideoBrowserActivity{4260a878}} V/LoaderManager(23107): Stopping:
LoaderInfo{425ea998 #0 : VideoItemLoader{425eb4a0}} W/SurfaceFlinger(
183): couldn't log to binary event log: overflow.
D/ccl_BaseCastManager(23107): setPlay to true I/ActivityManager(
756): START u0
{cmp=com.google.sample.cast.refplayer/com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity
(has extras)} from pid 23107 D/LocalPlayerActivity(23107): onPause()
was called D/ccl_BaseCastManager(23107): Successfully removed the
existing BaseCastConsumer listener
com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity$1@4263e890
D/ccl_VideoCastManager(23107): Updated context to:
com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity
D/ccl_VideoCastManager(23107): loadMedia:
com.google.android.gms.cast.MediaInfo@fb6585fd
D/ccl_VideoCastControlle(23107): Stopped TrickPlay Timer
D/ccl_VideoCastControlle(23107): Restarted TrickPlay Timer
D/ccl_VideoCastControlle(23107): onResume() was called
D/ccl_VideoCastManager(23107): Updated context to:
com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity
D/ccl_BaseCastManager(23107): Successfully added the new
BaseCastConsumer listener
com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity$MyCastConsumer@427a8e20
D/ccl_VideoCastManager(23107): Successfully added the new CastConsumer
listener
com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity$MyCastConsumer@427a8e20
D/ccl_BaseCastManager(23107): UI is visible I/ActivityManager( 756):
Displayed
com.google.sample.cast.refplayer/com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity:
+88ms D/ccl_BaseCastManager(23107): UI is visible D/LocalPlayerActivity(23107): onStop() was called
D/LocalPlayerActivity(23107): onDestroy() is called
D/LocalPlayerActivity(23107): Stopped TrickPlay Timer
W/SurfaceFlinger( 183): couldn't log to binary event log: overflow.
D/ccl_VideoCastManager(23107): onApplicationStatusChanged() reached:
Now Casting: Marcel Hirscher at 16 years old
D/ccl_VideoCastManager(23107): onFailed: Failed to load media on the
cast device, code: 1 D/ccl_BaseCastManager(23107): onFailed() was
called with statusCode: 1
You cannot start YT app using your own app (if your app is based on the official Cast SDK).