i using castcompanionlibrary-android chromecast integration.
i going show few methods of chromecast integration
first 1 configuration initalization in application cast
private void initchromecast() { string applicationid = getstring(r.string.app_id); // build castconfiguration object , initialize videocastmanager castconfiguration options = new castconfiguration.builder(applicationid) .enableautoreconnect() .enablecaptionmanagement() .enabledebug() .enablelockscreen() .enablenotification() .enablewifireconnection() .setcastcontrollerimmersive(true) .setlaunchoptions(false, locale.getdefault()) .setnextprevvisibilitypolicy(castconfiguration.next_prev_visibility_policy_disabled) .addnotificationaction(castconfiguration.notification_action_rewind, false) .addnotificationaction(castconfiguration.notification_action_play_pause, true) .addnotificationaction(castconfiguration.notification_action_disconnect, true) .setforwardstep(10) .build(); videocastmanager.initialize(this, options); }
and pass meta data
private void loadremotemedia(int position, boolean autoplay) { mediametadata mediametadata = new mediametadata(mediametadata.media_type_music_track); mediametadata.putstring(mediametadata.key_title, title); mediainfo mediainfo = new mediainfo.builder( path) .setcontenttype("application/x-mpegurl") .setstreamtype(mediainfo.stream_type_live) .setmetadata(mediametadata) .setstreamduration(mediainfo.unknown_duration) .build(); mcastmanager.startvideocastcontrolleractivity(getactivity(), mediainfo, position, autoplay); }
now question in below cod when pass castcompanion sample id 4f8b3483 ,i can cast of videos when put sample application reciver id of videos works id not work mine.
for example http://iptvcanales.com/xw/peliculas.php?movie=006 url works castcompanion reciver id not mine id in code.
Comments
Post a Comment