package com.viaccessorca.voplayerdemo.casting;

import com.viaccessorca.voplayerdemo.R;
import com.viaccessorca.voplayer.VOPlayer;
import com.viaccessorca.voplayerdemo.AppConfig;
import com.viaccessorca.voplayerdemo.Constants;
import com.viaccessorca.voplayerdemo.activities.MediaListActivity;

import com.google.android.gms.cast.framework.CastOptions;
import com.google.android.gms.cast.framework.OptionsProvider;
import com.google.android.gms.cast.framework.SessionProvider;
import com.google.android.gms.cast.framework.media.CastMediaOptions;
import com.google.android.gms.cast.framework.media.NotificationOptions;

import android.content.Context;

import java.util.List;


public class CastOptionsProvider implements OptionsProvider {

    public CastOptions getCastOptions(Context context) {

        NotificationOptions notificationOptions = new NotificationOptions.Builder()
                .setTargetActivityClassName(MediaListActivity.class.getName())
                .build();

        CastMediaOptions mediaOptions = new CastMediaOptions.Builder()
                .setNotificationOptions(notificationOptions)
                .build();

        return new CastOptions.Builder()
                .setReceiverApplicationId(context.getString(R.string.custom_receiver_id))
                .setCastMediaOptions(mediaOptions)
                .build();
    }

    @Override
    public List<SessionProvider> getAdditionalSessionProviders(Context context) {
        return null;
    }
}
