如果我想使用ccl和android示例视频广告应用作为打开默认YouTube接收器应用的基础,那么CastApplication.java
中的APPLICATION_ID使用什么值我的用例是我的主要列表中有一个MediaInfo的预定集合视频,其中包括亚马逊上的一些视频和Youtube上的一些视频。看起来我需要单独的VideoCastManager会话,具体取决于我想用Play类型命令控制的接收器应用程序。我只需使用Android中的默认“CastVideos”应用程序并构建亚马逊托管的videoUrls的MediaInfo列表即可播放亚马逊视频。但是,当我尝试切换到Youtube时,我正在初始化VideoCastManager时出错。
我已经阅读了这个answer,但它似乎是在MediaRouter api中,我不知道“session.start()”与ccl和VideoCastManager实例的使用有什么关系?
我相信“Allcast”具有类似的功能,但在建立任何连接之前都会显示相应的来源(netflix,roku,amazon ......)。我希望尽可能交错MediaInfo集合,而不是维护由实际媒体数据源中的域隔离的单独MediaInfo集合。
- EDIT-- 查看端口9222上的远程调试器,我看到有一个加载元数据错误......
cast.receiver.MediaManager]加载元数据错误
所以,我将查看用于将元数据加载到MediaInfo实例中的gdata / youtube条目,以确保它是连贯的。我完全不理解接收器在尝试加载元数据时抛出ERROR级别的东西。网络调用接收者在“youtube.com/tv ...”上显示的实际网址显示RC为200.
- endof edit--
当我尝试使用“Youtube”作为appID值启动并加载youtube网址时出现Logcat错误。
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
答案 0 :(得分:1)
您无法使用自己的应用启动YT应用(如果您的应用基于官方Cast SDK)。