use of com.zype.android.webapi.model.player.Advertising in project zype-android by zype.
the class VideoDetailActivity method handleVideoPlayer.
@Subscribe
public void handleVideoPlayer(PlayerVideoEvent event) {
Logger.d("handlePlayer");
String url = event.getEventData().getModelData().getResponse().getBody().getFiles().get(0).getUrl();
DataHelper.saveVideoPlayerLink(getContentResolver(), mVideoId, url);
Advertising advertising = event.getEventData().getModelData().getResponse().getBody().getAdvertising();
Analytics analytics = event.getEventData().getModelData().getResponse().getBody().getAnalytics();
if (advertising != null) {
List<AdvertisingSchedule> schedule = advertising.getSchedule();
DataHelper.updateAdSchedule(getContentResolver(), mVideoId, schedule);
// in the 'VideoList' table. But we do this now because the tags are the same for all ad cue points
if (schedule != null && !schedule.isEmpty()) {
String adTag = advertising.getSchedule().get(0).getTag();
DataHelper.saveAdVideoTag(getContentResolver(), mVideoId, adTag);
}
}
if (analytics != null) {
String beacon = analytics.getBeacon();
AnalyticsDimensions dimensions = analytics.getDimensions();
if (beacon != null && dimensions != null) {
DataHelper.updateAnalytics(getContentResolver(), beacon, dimensions);
}
}
mType = PlayerFragment.TYPE_VIDEO_WEB;
changeFragment(isChromecastConntected());
hideProgress();
}
Aggregations